0. Introduction
This is the largest lake for many ready-to-use SOTA models.
- Models: Trained state-of-the-art models for various vision tasks in ONNXRuntime backend
- No-Code Modules: Easy interface to use those models for both prediction and visualizing output. No coding is needed. The interface is universal among all models in this library.
- Extentiability: Customizable modules to use it for applications such as realtime inference and web application.
1. Installation
Install directly from this repository.
Warning
Downloading from pip server is currently suspended in order to simplify dependency requirements. We will update it soon.
2. Usage
No matter which model you use, these interface is the same.
import BiWAKO
# 1. Initialize Model
model = BiWAKO.MiDAS(model="mono_depth_small")
# 2. Feed Image (accept cv2 image or path to the image)
prediction = model.predict(image_or_image_path)
# 3. Visiualize result as a cv2 image
result_img = model.render(prediction, image_or_image_path)
More specifically...
- Instantiate model with
BiWAKO.ModelName(weight)
. TheModelName
andweight
corresponding to the task you want to work on can be found at the table in the next section. Weight file is automaticaly downloaded. - call
predict(image)
.image
can be either path to the image or cv2 image array. - call
render(prediction, image)
.prediction
is the return value ofpredict()
method andimage
is the same as above. Some model takes optional arguments to control details in the output.
2-2 High Level APIs
We also provides some APIs to even accelerate productions. See API page for further details/
4. Models
The following list is the current availability of models with weight variations.
Click the link at the model column for futher documentation.
Task | Model | Weights |
---|---|---|
Mono Depth Prediction | MiDAS | mono_depth_small mono_depth_large |
Salient Object Detection | U2Net | mobile basic human_seg portrait |
Super Resolution | RealESRGAN | super_resolution4864 super_resolution6464 |
Object Detection | YOLO2/YOLO | Please refer to docs for details |
Emotion Prediction | FerPlus | ferplus8 |
Human Parsing | HumanParsing | human_attribute |
Denoise | HINet | denoise_320_480 |
Face Detection | YuNet | yunet_120_160 |
Style Transfer | AnimeGAN | animeGAN512 |
Image Classification | ResNetV2 | resnet18v2 resnet50v2 resnet101v2 resnet152v2 |
Human Portrait Segmentation | MODNet | modnet_256 |
Semantic Segmentation | FastSCNN | fast_scnn384 fast_scnn7681344 |
Diver's View Segmentation | SUIMNet | suim_net_3248 suim_rsb_72128 suim_vgg_25632 suim_vgg_72128 |
5. Deployment
It is extremely easy to use BiWAKO at application layer.
1. Real Time Prediction
Any model can be used in the same way to run real-time inference.
2. FastAPI Implementation
Like the above example, you can build simple Backend API for inference on web server.
We have prepared sample deployment of the library with FastAPI.Read this for details.
3. Video Prediction
We also provides pre-defined video prediction API. Read this for details