https://github.com/kazuhito00/nsfw_model_onnx_sample
NSFW判定モデルのGantMan/nsfw_modelのPythonでのONNX推論サンプル
https://github.com/kazuhito00/nsfw_model_onnx_sample
colaboratory nsfw-recognition onnx python
Last synced: 7 months ago
JSON representation
NSFW判定モデルのGantMan/nsfw_modelのPythonでのONNX推論サンプル
- Host: GitHub
- URL: https://github.com/kazuhito00/nsfw_model_onnx_sample
- Owner: Kazuhito00
- License: mit
- Created: 2024-08-16T06:28:42.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-16T08:36:44.000Z (about 1 year ago)
- Last Synced: 2025-03-15T22:51:40.633Z (7 months ago)
- Topics: colaboratory, nsfw-recognition, onnx, python
- Language: Jupyter Notebook
- Homepage:
- Size: 86.3 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nsfw_model_onnx_sample
NSFW判定モデルの[GantMan/nsfw_model](https://github.com/GantMan/nsfw_model)のPythonでのONNX推論サンプルです。
変換自体を試したい方は、Google Colaboratory上で[Convert2ONNX.ipynb](Convert2ONNX.ipynb)を使用ください。
# Requirement
* OpenCV 4.5.3.56 or later
* onnxruntime 1.11.0 or later# Convert
[](https://colab.research.google.com/github/Kazuhito00/nsfw_model_onnx_sample/blob/main/Convert2ONNX.ipynb)
Colaboratoryでノートブックを開き、上から順に実行してください。# Demo
デモの実行方法は以下です。
```bash
python demo_onnx.py
```
* --image
画像パスの指定
デフォルト:sample.jpg
* --model
ロードするモデルの格納パス
デフォルト:model/nsfw_mobilenet2_224x224.onnx# Reference
* [GantMan/nsfw_model](https://github.com/GantMan/nsfw_model)# Author
高橋かずひと(https://twitter.com/KzhtTkhs)
# License
nsfw_model_onnx_sample is under [MIT License](LICENSE).# Note
サンプルの画像は[ぱくたそ](https://www.pakutaso.com/)様の「[こちらを見上げる子猫](https://www.pakutaso.com/20240119016post-50296.html)」を使用しています。