提交 bdbc7519 编写于 作者: Y Yuantao Feng 提交者: GitHub

Renaming model files to have more information on architecture, training data and more (#7)

* add suffix of training dataset, arch & upload time to each model

* update DB-IC15 benchmark results
上级 6a77fd6e
......@@ -5,6 +5,12 @@ A zoo for models tuned for OpenCV DNN with benchmarks on different platforms.
Guidelines:
- To clone this repo, please install [git-lfs](https://git-lfs.github.com/), run `git lfs install` and use `git lfs clone https://github.com/opencv/opencv_zoo`.
- To run benchmark on your hardware settings, please refer to [benchmark/README](./benchmark/README.md).
- Understand model filename: `<topic>_<model_name>_<dataset>_<arch>_<upload_time>`
- `<topic>`: research topics, such as `face detection` etc.
- `<model_name>`: exact model names.
- `<dataset>`: (Optional) the dataset that the model is trained with.
- `<arch>`: (Optional) the backbone architecture of the model.
- `<upload_time>`: the time when the model is uploaded, meaning the latest version of this model unless specified.
## Models & Benchmarks
......@@ -16,19 +22,19 @@ Hardware Setup:
***Important Notes***:
- The time data that shown on the following table presents the time elapsed from preprocess (resize is excluded), to a forward pass of a network, and postprocess to get final results.
- The time data that shown on the following table is the median of 10 runs. Different metrics may be applied to some specific models.
- Batch size is 1 for all benchmark results.
- View [benchmark/config](./benchmark/config) for more details on benchmarking different models.
| Model | Input Size | CPU x86_64 (ms) | CPU ARM (ms) | GPU CUDA (ms)* |
| Model | Input Size | CPU x86_64 (ms) | CPU ARM (ms) | GPU CUDA (ms) |
|-------|------------|-----------------|--------------|---------------|
| [YuNet](./models/face_detection_yunet) | 160x120 | 1.45 | 6.22 | 12.18 |
| [DB](./models/text_detection_db) | 640x480 | 137.38 | 2780.78 | 220.52 |
| [DB-IC15](./models/text_detection_db) | 640x480 | 142.91 | 2835.91 | 208.41 |
| [DB-TD500](./models/text_detection_db) | 640x480 | 142.91 | 2841.71 | 210.51 |
| [CRNN](./models/text_recognition_crnn) | 100x32 | 50.21 | 234.32 | 196.15 |
| [SFace](./models/face_recognition_sface) | 112x112 | 8.65 | 99.20 | 24.88 |
| [PP-ResNet](./models/image_classification_ppresnet) | 224x224 | 56.05 | 602.58 | 98.64 |
| [PP-HumanSeg](./models/human_segmentation_pphumanseg) | 192x192 | 19.92 | 105.32 | 67.97 |
*: Batch size is 1.
## License
OpenCV Zoo is licensed under the [Apache 2.0 license](./LICENSE). Please refer to licenses of different models.
......@@ -16,7 +16,7 @@ Benchmark:
Model:
name: "YuNet"
modelPath: "models/face_detection_yunet/face_detection_yunet.onnx"
modelPath: "models/face_detection_yunet/face_detection_yunet_2021sep.onnx"
confThreshold: 0.6
nmsThreshold: 0.3
topK: 5000
\ No newline at end of file
......@@ -14,4 +14,4 @@ Benchmark:
Model:
name: "SFace"
modelPath: "models/face_recognition_sface/face_recognition_sface.onnx"
\ No newline at end of file
modelPath: "models/face_recognition_sface/face_recognition_sface_2021sep.onnx"
\ No newline at end of file
......@@ -15,4 +15,4 @@ Benchmark:
Model:
name: "PPHumanSeg"
modelPath: "models/human_segmentation_pphumanseg/human_segmentation_pphumanseg.onnx"
\ No newline at end of file
modelPath: "models/human_segmentation_pphumanseg/human_segmentation_pphumanseg_2021oct.onnx"
\ No newline at end of file
......@@ -16,5 +16,5 @@ Benchmark:
Model:
name: "PPResNet"
modelPath: "models/image_classification_ppresnet/image_classification_ppresnet50.onnx"
modelPath: "models/image_classification_ppresnet/image_classification_ppresnet50_2021oct.onnx"
labelPath: "models/image_classification_ppresnet/imagenet_labels.txt"
\ No newline at end of file
......@@ -15,7 +15,7 @@ Benchmark:
Model:
name: "DB"
modelPath: "models/text_detection_db/text_detection_db.onnx"
modelPath: "models/text_detection_db/text_detection_DB_TD500_resnet18_2021sep.onnx"
binaryThreshold: 0.3
polygonThreshold: 0.5
maxCandidates: 200
......
......@@ -14,4 +14,4 @@ Benchmark:
Model:
name: "CRNN"
modelPath: "models/text_recognition_crnn/text_recognition_crnn.onnx"
\ No newline at end of file
modelPath: "models/text_recognition_crnn/text_recognition_CRNN_VGG_BiLSTM_CTC_2021sep.onnx"
\ No newline at end of file
......@@ -2,6 +2,10 @@
YuNet is a light-weight, fast and accurate face detection model, which achieves 0.834(AP_easy), 0.824(AP_medium), 0.708(AP_hard) on the WIDER Face validation set.
Notes:
- Model source: [here](https://github.com/ShiqiYu/libfacedetection.train/blob/a61a428929148171b488f024b5d6774f93cdbc13/tasks/task1/onnx/yunet.onnx).
- For details on training this model, please visit https://github.com/ShiqiYu/libfacedetection.train.
## Demo
Run the following command to try the demo:
......
......@@ -2,15 +2,15 @@
SFace: Sigmoid-Constrained Hypersphere Loss for Robust Face Recognition
SFace is contributed by [Yaoyao Zhong](https://github.com/zhongyy/SFace). [face_recognition_sface.onnx](./face_recognition_sface.onnx) is converted from the model from https://github.com/zhongyy/SFace thanks to [Chengrui Wang](https://github.com/crywang).
Note:
- There is [a PR for OpenCV adding this model](https://github.com/opencv/opencv/pull/20422) to work with OpenCV DNN in C++ implementation.
- Support 5-landmark warp for now.
- `demo.py` requires [../face_detection_yunet](../face_detection_yunet) to run.
- SFace is contributed by [Yaoyao Zhong](https://github.com/zhongyy/SFace).
- [face_recognition_sface_2021sep.onnx](./face_recognition_sface_2021sep.onnx) is converted from the model from https://github.com/zhongyy/SFace thanks to [Chengrui Wang](https://github.com/crywang).
- Support 5-landmark warpping for now (2021sep)
## Demo
***NOTE***: This demo uses [../face_detection_yunet](../face_detection_yunet) as face detector, which supports 5-landmark detection for now (2021sep).
Run the following command to try the demo:
```shell
# recognize on images
......
......@@ -2,7 +2,11 @@
Real-time Scene Text Detection with Differentiable Binarization
`text_detection_db.onnx` is trained on [TD500 dataset](http://www.iapr-tc11.org/mediawiki/index.php/MSRA_Text_Detection_500_Database_(MSRA-TD500)), which can detect both English & Chinese instances. It is obtained from [here](https://docs.opencv.org/master/d4/d43/tutorial_dnn_text_spotting.html) and renamed from `DB_TD500_resnet18.onnx`.
Note:
- Models source: [here](https://drive.google.com/drive/folders/1qzNCHfUJOS0NEUOIKn69eCtxdlNPpWbq).
- `IC15` in the filename means the model is trained on [IC15 dataset](https://rrc.cvc.uab.es/?ch=4&com=introduction), which can detect English text instances only.
- `TD500` in the filename means the model is trained on [TD500 dataset](http://www.iapr-tc11.org/mediawiki/index.php/MSRA_Text_Detection_500_Database_(MSRA-TD500)), which can detect both English & Chinese instances.
- Visit https://docs.opencv.org/master/d4/d43/tutorial_dnn_text_spotting.html for more information.
## Demo
......
......@@ -21,7 +21,7 @@ def str2bool(v):
parser = argparse.ArgumentParser(description='Real-time Scene Text Detection with Differentiable Binarization (https://arxiv.org/abs/1911.08947).')
parser.add_argument('--input', '-i', type=str, help='Path to the input image. Omit for using default camera.')
parser.add_argument('--model', '-m', type=str, default='text_detection_db.onnx', help='Path to the model.')
parser.add_argument('--model', '-m', type=str, default='text_detection_DB_TD500_resnet18.onnx', help='Path to the model.')
parser.add_argument('--width', type=int, default=736,
help='Preprocess input image by resizing to a specific width. It should be multiple by 32.')
parser.add_argument('--height', type=int, default=736,
......
......@@ -2,11 +2,13 @@
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
`text_recognition_crnn.onnx` is trained using the code from https://github.com/zihaomu/deep-text-recognition-benchmark, which can only recognize english words. It is obtained from https://drive.google.com/drive/folders/1cTbQ3nuZG-EKWak6emD_s8_hHXWz7lAr and renamed from `CRNN_VGG_BiLSTM_CTC.onnx`. Visit https://docs.opencv.org/4.5.2/d9/d1e/tutorial_dnn_OCR.html for more information.
Note:
- Model source: https://docs.opencv.org/4.5.2/d9/d1e/tutorial_dnn_OCR.html.
- For details on training this model, please visit https://github.com/zihaomu/deep-text-recognition-benchmark, which can only recognize english words.
## Demo
***NOTE**: This demo use [text_detection_db](../text_detection_db) as text detector.
***NOTE***: This demo uses [text_detection_db](../text_detection_db) as text detector.
Run the following command to try the demo:
```shell
......
......@@ -26,7 +26,7 @@ def str2bool(v):
parser = argparse.ArgumentParser(
description="An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition (https://arxiv.org/abs/1507.05717)")
parser.add_argument('--input', '-i', type=str, help='Path to the input image. Omit for using default camera.')
parser.add_argument('--model', '-m', type=str, default='text_recognition_crnn.onnx', help='Path to the model.')
parser.add_argument('--model', '-m', type=str, default='text_recognition_CRNN_VGG_BiLSTM_CTC.onnx', help='Path to the model.')
parser.add_argument('--width', type=int, default=736,
help='The width of input image being sent to the text detector.')
parser.add_argument('--height', type=int, default=736,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册