add benchmark results for object detection (#106)
Browse files- README.md +11 -3
- benchmark/config/object_detection_nanodet.yaml +21 -0
- benchmark/config/object_detection_yolox.yaml +22 -0
- benchmark/download_data.py +4 -0
- models/__init__.py +5 -0
- models/object_detection_nanodet/README.md +3 -1
- models/object_detection_nanodet/nanodet.py +1 -1
- models/object_detection_yolox/README.md +1 -4
README.md
CHANGED
@@ -15,11 +15,13 @@ Guidelines:
|
|
15 |
|
16 |
## Models & Benchmark Results
|
17 |
|
18 |
-
| Model
|
19 |
-
|
|
20 |
| [YuNet](./models/face_detection_yunet) | Face Detection | 160x120 | 1.45 | 6.22 | 12.18 | 4.04 | 86.69 |
|
21 |
| [SFace](./models/face_recognition_sface) | Face Recognition | 112x112 | 8.65 | 99.20 | 24.88 | 46.25 | --- |
|
22 |
-
| [LPD-YuNet](./models/license_plate_detection_yunet/) | License Plate Detection | 320x240 | --- | 168.03 | 56.12 | 29.53 |
|
|
|
|
|
23 |
| [DB-IC15](./models/text_detection_db) | Text Detection | 640x480 | 142.91 | 2835.91 | 208.41 | --- | --- |
|
24 |
| [DB-TD500](./models/text_detection_db) | Text Detection | 640x480 | 142.91 | 2841.71 | 210.51 | --- | --- |
|
25 |
| [CRNN-EN](./models/text_recognition_crnn) | Text Recognition | 100x32 | 50.21 | 234.32 | 196.15 | 125.30 | --- |
|
@@ -68,6 +70,12 @@ Some examples are listed below. You can find more in the directory of each model
|
|
68 |
|
69 |

|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
### Object Tracking with [DaSiamRPN](./models/object_tracking_dasiamrpn/)
|
72 |
|
73 |

|
|
|
15 |
|
16 |
## Models & Benchmark Results
|
17 |
|
18 |
+
| Model | Task | Input Size | INTEL-CPU (ms) | RPI-CPU (ms) | JETSON-GPU (ms) | KV3-NPU (ms) | D1-CPU (ms) |
|
19 |
+
| ------------------------------------------------------- | ----------------------------- | ---------- | -------------- | ------------ | --------------- | ------------ | ----------- |
|
20 |
| [YuNet](./models/face_detection_yunet) | Face Detection | 160x120 | 1.45 | 6.22 | 12.18 | 4.04 | 86.69 |
|
21 |
| [SFace](./models/face_recognition_sface) | Face Recognition | 112x112 | 8.65 | 99.20 | 24.88 | 46.25 | --- |
|
22 |
+
| [LPD-YuNet](./models/license_plate_detection_yunet/) | License Plate Detection | 320x240 | --- | 168.03 | 56.12 | 29.53 | --- |
|
23 |
+
| [YOLOX](./models/object_detection_yolox/) | Object Detection | 640x640 | 176.68 | 1496.70 | 388.95 | 420.98 | --- |
|
24 |
+
| [NanoDet](./models/object_detection_nanodet/) | Object Detection | 416x416 | 157.91 | 220.36 | 64.94 | 116.64 | --- |
|
25 |
| [DB-IC15](./models/text_detection_db) | Text Detection | 640x480 | 142.91 | 2835.91 | 208.41 | --- | --- |
|
26 |
| [DB-TD500](./models/text_detection_db) | Text Detection | 640x480 | 142.91 | 2841.71 | 210.51 | --- | --- |
|
27 |
| [CRNN-EN](./models/text_recognition_crnn) | Text Recognition | 100x32 | 50.21 | 234.32 | 196.15 | 125.30 | --- |
|
|
|
70 |
|
71 |

|
72 |
|
73 |
+
### Object Detection with [NanoDet](./models/object_detection_nanodet/) & [YOLOX](./models/object_detection_yolox/)
|
74 |
+
|
75 |
+

|
76 |
+
|
77 |
+

|
78 |
+
|
79 |
### Object Tracking with [DaSiamRPN](./models/object_tracking_dasiamrpn/)
|
80 |
|
81 |

|
benchmark/config/object_detection_nanodet.yaml
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Benchmark:
|
2 |
+
name: "Object Detection Benchmark"
|
3 |
+
type: "Detection"
|
4 |
+
data:
|
5 |
+
path: "benchmark/data/object_detection"
|
6 |
+
files: ["1.png", "2.png", "3.png"]
|
7 |
+
sizes:
|
8 |
+
- [416, 416]
|
9 |
+
metric:
|
10 |
+
warmup: 30
|
11 |
+
repeat: 10
|
12 |
+
reduction: "median"
|
13 |
+
backend: "default"
|
14 |
+
target: "cpu"
|
15 |
+
|
16 |
+
Model:
|
17 |
+
name: "NanoDet"
|
18 |
+
modelPath: "models/object_detection_nanodet/object_detection_nanodet_2022nov.onnx"
|
19 |
+
prob_threshold: 0.35
|
20 |
+
iou_threshold: 0.6
|
21 |
+
|
benchmark/config/object_detection_yolox.yaml
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Benchmark:
|
2 |
+
name: "Object Detection Benchmark"
|
3 |
+
type: "Detection"
|
4 |
+
data:
|
5 |
+
path: "benchmark/data/object_detection"
|
6 |
+
files: ["1.png", "2.png", "3.png"]
|
7 |
+
sizes:
|
8 |
+
- [640, 640]
|
9 |
+
metric:
|
10 |
+
warmup: 30
|
11 |
+
repeat: 10
|
12 |
+
reduction: "median"
|
13 |
+
backend: "default"
|
14 |
+
target: "cpu"
|
15 |
+
|
16 |
+
Model:
|
17 |
+
name: "YoloX"
|
18 |
+
modelPath: "models/object_detection_yolox/object_detection_yolox_2022nov.onnx"
|
19 |
+
confThreshold: 0.35
|
20 |
+
nmsThreshold: 0.5
|
21 |
+
objThreshold: 0.5
|
22 |
+
|
benchmark/download_data.py
CHANGED
@@ -205,6 +205,10 @@ data_downloaders = dict(
|
|
205 |
url='https://drive.google.com/u/0/uc?id=1cf9MEyUqMMy8lLeDGd1any6tM_SsSmny&export=download',
|
206 |
sha='997acb143ddc4531e6e41365fb7ad4722064564c',
|
207 |
filename='license_plate_detection.zip'),
|
|
|
|
|
|
|
|
|
208 |
)
|
209 |
|
210 |
if __name__ == '__main__':
|
|
|
205 |
url='https://drive.google.com/u/0/uc?id=1cf9MEyUqMMy8lLeDGd1any6tM_SsSmny&export=download',
|
206 |
sha='997acb143ddc4531e6e41365fb7ad4722064564c',
|
207 |
filename='license_plate_detection.zip'),
|
208 |
+
object_detection=Downloader(name='object_detection',
|
209 |
+
url='https://drive.google.com/u/0/uc?id=1LUUrQIWYYtiGoNAL_twZvdw5NkC39Swe&export=download',
|
210 |
+
sha='4161a5cd3b0be1f51484abacf19dc9a2231e9894',
|
211 |
+
filename='object_detection.zip'),
|
212 |
)
|
213 |
|
214 |
if __name__ == '__main__':
|
models/__init__.py
CHANGED
@@ -12,6 +12,8 @@ from .image_classification_mobilenet.mobilenet_v2 import MobileNetV2
|
|
12 |
from .palm_detection_mediapipe.mp_palmdet import MPPalmDet
|
13 |
from .handpose_estimation_mediapipe.mp_handpose import MPHandPose
|
14 |
from .license_plate_detection_yunet.lpd_yunet import LPD_YuNet
|
|
|
|
|
15 |
|
16 |
class Registery:
|
17 |
def __init__(self, name):
|
@@ -39,3 +41,6 @@ MODELS.register(MobileNetV2)
|
|
39 |
MODELS.register(MPPalmDet)
|
40 |
MODELS.register(MPHandPose)
|
41 |
MODELS.register(LPD_YuNet)
|
|
|
|
|
|
|
|
12 |
from .palm_detection_mediapipe.mp_palmdet import MPPalmDet
|
13 |
from .handpose_estimation_mediapipe.mp_handpose import MPHandPose
|
14 |
from .license_plate_detection_yunet.lpd_yunet import LPD_YuNet
|
15 |
+
from .object_detection_nanodet.nanodet import NanoDet
|
16 |
+
from .object_detection_yolox.yolox import YoloX
|
17 |
|
18 |
class Registery:
|
19 |
def __init__(self, name):
|
|
|
41 |
MODELS.register(MPPalmDet)
|
42 |
MODELS.register(MPHandPose)
|
43 |
MODELS.register(LPD_YuNet)
|
44 |
+
MODELS.register(NanoDet)
|
45 |
+
MODELS.register(YoloX)
|
46 |
+
|
models/object_detection_nanodet/README.md
CHANGED
@@ -24,7 +24,9 @@ Here are some of the sample results that were observed using the model,
|
|
24 |
|
25 |

|
26 |

|
27 |
-
|
|
|
|
|
28 |
Video inference result,
|
29 |

|
30 |
|
|
|
24 |
|
25 |

|
26 |

|
27 |
+
|
28 |
+
Check [benchmark/download_data.py](../../benchmark/download_data.py) for the original images.
|
29 |
+
|
30 |
Video inference result,
|
31 |

|
32 |
|
models/object_detection_nanodet/nanodet.py
CHANGED
@@ -37,7 +37,7 @@ class NanoDet:
|
|
37 |
def name(self):
|
38 |
return self.__class__.__name__
|
39 |
|
40 |
-
def setBackend(self,
|
41 |
self.backend_id = backendId
|
42 |
self.net.setPreferableBackend(self.backend_id)
|
43 |
|
|
|
37 |
def name(self):
|
38 |
return self.__class__.__name__
|
39 |
|
40 |
+
def setBackend(self, backendId):
|
41 |
self.backend_id = backendId
|
42 |
self.net.setPreferableBackend(self.backend_id)
|
43 |
|
models/object_detection_yolox/README.md
CHANGED
@@ -33,10 +33,7 @@ Here are some of the sample results that were observed using the model (**yolox_
|
|
33 |

|
34 |

|
35 |
|
36 |
-
|
37 |
-
Video inference result,
|
38 |
-

|
39 |
-
-->
|
40 |
|
41 |
## Model metrics:
|
42 |
|
|
|
33 |

|
34 |

|
35 |
|
36 |
+
Check [benchmark/download_data.py](../../benchmark/download_data.py) for the original images.
|
|
|
|
|
|
|
37 |
|
38 |
## Model metrics:
|
39 |
|