Skip to content
/ BiWAKO Public

The largest freshwater lake. The home of onnx models.

License

Notifications You must be signed in to change notification settings

NMZ0429/BiWAKO

Repository files navigation

The home of moduled onnx models

PyPI - Python Version PyPI version PyPI Status license onnx Code Smells


BiWAKO

Docs

Refer to the docs

This README is the copy of the front page of the docs site and some sections are not properly rendered.

Model/Feature Requests

I am more than welcome to work for adding new models or features! If you have a model in pytorch or tensorflow, feel free to create an issue or new discussion stating which model or what feature you want from this repository!

For model addition, links to the implementation or some working inference code definitely helps me to add the model and inference code.

0. Introduction

This repository offers

  1. Models: Trained state-of-the-art models for various vision tasks in ONNXRuntime backend
  2. 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.
  3. Extentiability: Customizable modules to use it for applications such as realtime inference.

1. Installation

Install directly from this repository.

$cd BiWAKO
$pip install -e .

!!! warning Downloading from pip server is currently suspended in order to protect weight files. 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...

  1. Instantiate model with BiWAKO.ModelName(weight). The ModelName and weight corresponding to the task you want to work on can be found at the table in the next section. Weight file is automaticaly downloaded.
  2. call predict(image). image can be either path to the image or cv2 image array.
  3. call render(prediction, image). prediction is the return value of predict() method and image 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

About

The largest freshwater lake. The home of onnx models.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published