Awesome
Neural Network Libraries - Examples
This repository contains working examples of Neural Network Libraries. Before running any of the examples in this repository, you must install the Python package for Neural Network Libraries. The Python install guide can be found here.
Before running an example, also run the following command inside the example directory, to install additional dependencies:
cd example_directory
pip install -r requirements.txt
Docker workflow
- Our Docker workflow offers an easy installation and setup of running environments of our examples.
- See this page.
nnabla-examples-utils (neu)
neu
can now be installed as a python package. It provides a wide range of utility functions. For installation and usage, check utils
Interactive Demos
We have prepared interactive demos, where you can play around without having to worry about the codes and the internal mechanism. You can run it directly on Colab from the links in the table below.
Vision: Generation, Enhancement, Animation
Name | Notebook | Task | Example |
---|---|---|---|
SLE-GAN | Image Generation | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/image-generation/slegan/example.png" align="center" height="90" ></a> | |
First Order Motion Model | Facial Motion Transfer | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/facial-motion-transfer/first-order-model/imgs/sample_fake.gif" align="center" height="90" ></a> | |
Zooming Slow-Mo | Video Super-Resolution | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/frame-interpolation/zooming-slow-mo/demo/original.gif" align="center" height="90"></a> <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/frame-interpolation/zooming-slow-mo/demo/zooming_slomo.gif" align="center" height="90" ></a> | |
StyleGAN2 | Image Generation | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/image-generation/stylegan2/images/sample.png" align="center" height="90" ></a> | |
Deep-Exemplar-based-Video-Colorization | Video Colorization | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/video-colorization/deep-exemplar-based-video-colorization/images/examples/mov1.gif" align="center" height="90"></a> <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/video-colorization/deep-exemplar-based-video-colorization/images/examples/out1.gif" align="center" height="90" ></a> | |
TecoGAN | Video Super-Resolution | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/video-superresolution/tecogan/results/cropped_lr_city.gif" align="center" height="90"></a> <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/video-superresolution/tecogan/results/cropped_sr_city.gif" align="center" height="90" ></a> | |
ESR-GAN | Super-Resolution | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/image-superresolution/esrgan/results/comic.png" align="center" height="90"></a> <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/image-superresolution/esrgan/results/comic_SR.png" align="center" height="90" ></a> | |
Self-Attention GAN | Image Generation | <a href="url"><img src="https://camo.githubusercontent.com/afa86e7d0ccdb2ba75c273070f8dc8d50bda5d2821ebacbf1fc40a2dc0059b7c/68747470733a2f2f626c6f672e6e6e61626c612e6f72672f77702d636f6e74656e742f75706c6f6164732f323031382f31322f30343131303033342f3030303938352d333030783330302e706e67" align="center" height="90" ></a> <a href="url"><img src="https://camo.githubusercontent.com/9f829b60f2b53bfb77111f55997e6ed0f160f8b04437c046754a32503f90a1ba/68747470733a2f2f626c6f672e6e6e61626c612e6f72672f77702d636f6e74656e742f75706c6f6164732f323031382f31322f30343131303034322f3030303933332d333030783330302e706e67" align="center" height="90" ></a> | |
StarGAN | Image Translation | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/image-translation/stargan/imgs/sample_black_haired_female.png" align="center" height="90" ></a><a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/image-translation/stargan/imgs/sample_blond_haired_female.png" align="center" height="90" ></a> | |
DCGAN | Image Generation |
Vision & Language
Name | Notebook | Task | Example |
---|---|---|---|
CLIP | Zero-shot image classification | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/vision-and-language/clip/CLIP.png" align="center" height="90" ></a> |
Vision: Recognition
Name | Notebook | Task | Example |
---|---|---|---|
CenterNet | Object Detection | <a href="url"><img src="https://blog.nnabla.org/wp-content/uploads/sites/2/2021/02/02093255/centernet_result_resized.jpg" align="center" height="90" ></a> | |
PSMNet | Stereo Depth Estimation | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/stereo-depth/PSMnet/results/0006.png" align="center" height="90" ></a> <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/stereo-depth/PSMnet/results/depth_sceneflow.png" align="center" height="90"></a> | |
Face Alignment Network | Facial Keypoint Detection | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/facial-keypoint-detection/face-alignment/results/example1.png" align="center" height="90" ></a><a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/facial-keypoint-detection/face-alignment/results/example2.png" align="center" height="90" ></a> | |
YOLO v2 | Object Detection | ||
ResNet/ResNeXt/SENet | Image Classification | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/image-classification/imagenet/results/rn50-mp-cos90-loss.png" align="center" height="90" ></a> |
Audio
Name | Notebook | Task | Example |
---|---|---|---|
D3Net | Music Source Separation | ||
X-UMX | Music Source Separation | <a href="url"><img src="https://github.com/sony/ai-research-code/raw/master/x-umx/imgs/umx-network-vs-x-umx-network.png" align="center" height="90" ></a> |
Machine Learning
Name | Notebook | Task | Example |
---|---|---|---|
Out-of-Core training | Out-of-Core training | <a href="url"><img src="https://github.com/sony/ai-research-code/blob/master/out-of-core-training/imgs/overview.png?raw=true" align="center" height="90" ></a> | |
MixUp / CutMix / VH-Mixup | Data Augmentation | <a href="url"><img src="https://blog.nnabla.org/wp-content/uploads/sites/2/2020/04/07131002/mixuped_img.png" align="center" height="90" ></a> <a href="url"><img src="https://blog.nnabla.org/wp-content/uploads/sites/2/2020/04/07131130/cutmixed_img.png" align="center" height="90" ></a> | |
Virtual Adversarial Training | Semi-Supervised Learning | ||
SiameseNet | Feature Embedding | ||
Variational Auto-encoder | Unsupervised Learning |
eXplainable AI
Name | Notebook | Task | Example |
---|---|---|---|
Grad-CAM | Visualization | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/responsible_ai/gradcam/images/sample.png" align="center" height="90" ></a> | |
SHAP | Visualization | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/responsible_ai/shap/images/sample.png" align="center" height="90" ></a> | |
Attention Branch Network | Visualization | <a href="url"><img src="responsible_ai/attention_branch_network/images/attention_branch_network.png" align="center" height="90" ></a> |
Fairness of Machine Learning
Name | Notebook | Task | Example |
---|---|---|---|
Demographic parity <br> Disparate Impact <br> Equal opportunity <br> Equalised odds | [Metrics tutorial] <br> Dataset/Model Bias Check | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/responsible_ai/fairness_metrics/images/fairness_metrics.PNG" align="center" height="90" ></a> | |
Reweighing | [Pre-processing tutorial] <br> Dataset/Model Bias Check and Mitigation by Reweighing | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/responsible_ai/gender_bias_mitigation/images/fairness.png" align="center" height="90" ></a> | |
Massage Data | [Pre-processing tutorial] <br> Dataset/Model Bias Check and Mitigation by Massage Data | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/responsible_ai/massage_data/images/massage_data_workflow_diagram.png" align="center" height="90" ></a> | |
Preferential Sampling | [Pre-processing tutorial] <br> Dataset/Model Bias Check and Mitigation by Preferential Sampling | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/responsible_ai/preferential_sampling/images/preferential_sampling_workflow_diagram.png" align="center" height="90" ></a> | |
GAN Data Debiasing | [Pre-processing tutorial] <br> Dataset/Model Bias Check and Mitigation by GAN | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/responsible_ai/gan_data_debiased/images/gan_data_debiasing_workflow.png" align="center" height="90" ></a> | |
Prejudice Remover Regularizer | [In-processing tutorial] <br> Model Bias Check and Mitigation by Prejudice Removal Technique | <a href="url"><img src="https://github.com/sony/nnabla-examples/blob/master/responsible_ai/prejudice_remover_regularizer/images/Prejudice_Remover_Regularizer_Equation.png" align="center" height="90" ></a> | |
Prejudice Remover Regularizer for Images | [In-processing tutorial] <br> Model Bias Check and Mitigation by Prejudice Removal Technique for Images | <a href="url"><img src="https://github.com/sony/nnabla-examples/blob/master/responsible_ai/prejudice_remover_regularizer_images/images/Prejudice_Remover_Regularizer_Equation.png" align="center" height="90" ></a> | |
Adversarial Debiasing Tutorial | [In-processing tutorial] <br> Model Bias Check and Mitigation by Adversarial Debiasing | <a href="url"><img src="https://github.com/sony/nnabla-examples/blob/master/responsible_ai/adversarial_debiasing/images/adversarial_debiasing_training.png" align="center" height="90" ></a> | |
Adversarial Debiasing for Images | [In-processing tutorial] <br> Model Bias Check and Mitigation by Adversarial Debiasing for Images | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/responsible_ai/adversarial_debiasing_images/images/adversarial_debiasing_workflow_diagram.png" align="center" height="90" ></a> | |
Rejection Option based Classification | [Post-processing tutorial] <br> Prediction Bias Check and Mitigation by ROC | <a href="url"><img src="https://github.com/sony/nnabla-examples/blob/master/responsible_ai/rejection_option_based_classification/images/roc.png" align="center" height="90" ></a> | |
Rejection Option based Classification for Images | [Post-processing tutorial] <br> Prediction Bias Check and Mitigation by ROC for Images | <a href="url"><img src="https://github.com/sony/nnabla-examples/blob/master/responsible_ai/rejection_option_based_classification_images/images/roc_workflow_diagram.png" align="center" height="90" ></a> | |
Skin color (Masked Images) | Facial evaluation for skin color | <a href="url"><img src="https://github.com/sony/nnabla-examples/raw/master/responsible_ai/face_evaluation/Masked_Images.png" align="center" height="90" ></a> |
Model Quantization
Name | Notebook | Task | Example |
---|---|---|---|
Post-training quantization | Post-training quantization |