ytfeng commited on
Commit
39d77a4
·
1 Parent(s): 7b1c8cc

Add model file collector, fix some bugs and add some features (#123)

Browse files

add model path searcher and remove hardwritten file paths from benchmark configs; pack ppresnet, mobilenet & crnn with labels; fix palm det data; add flags to enable models of different precision separately (#123)

Files changed (37) hide show
  1. benchmark/README.md +12 -14
  2. benchmark/benchmark.py +27 -18
  3. benchmark/config/face_detection_yunet.yaml +1 -3
  4. benchmark/config/face_recognition_sface.yaml +1 -2
  5. benchmark/config/facial_expression_recognition.yaml +1 -2
  6. benchmark/config/handpose_estimation_mediapipe.yaml +1 -2
  7. benchmark/config/human_segmentation_pphumanseg.yaml +1 -2
  8. benchmark/config/{image_classification_mobilenetv1.yaml → image_classification_mobilenet.yaml} +2 -4
  9. benchmark/config/image_classification_mobilenetv2.yaml +0 -20
  10. benchmark/config/image_classification_ppresnet.yaml +1 -3
  11. benchmark/config/license_plate_detection_yunet.yaml +1 -2
  12. benchmark/config/object_detection_nanodet.yaml +1 -3
  13. benchmark/config/object_detection_yolox.yaml +1 -3
  14. benchmark/config/object_tracking_dasiamrpn.yaml +1 -4
  15. benchmark/config/palm_detection_mediapipe.yaml +1 -3
  16. benchmark/config/person_reid_youtureid.yaml +1 -2
  17. benchmark/config/qrcode_wechatqrcode.yaml +1 -5
  18. benchmark/config/text_detection_db.yaml +2 -3
  19. benchmark/config/{text_recognition_crnn_en.yaml → text_recognition_crnn.yaml} +1 -3
  20. benchmark/config/text_recognition_crnn_cn.yaml +0 -17
  21. benchmark/download_data.py +3 -3
  22. models/__init__.py +52 -7
  23. models/image_classification_mobilenet/demo.py +11 -14
  24. models/image_classification_mobilenet/{imagenet_labels.txt → mobilenet.py} +81 -2
  25. models/image_classification_mobilenet/mobilenet_v1.py +0 -81
  26. models/image_classification_mobilenet/mobilenet_v2.py +0 -81
  27. models/image_classification_ppresnet/demo.py +1 -3
  28. models/image_classification_ppresnet/imagenet_labels.txt +0 -1000
  29. models/image_classification_ppresnet/ppresnet.py +1002 -8
  30. models/object_tracking_dasiamrpn/dasiamrpn.py +1 -1
  31. models/object_tracking_dasiamrpn/demo.py +3 -3
  32. models/text_recognition_crnn/charset_36_EN.txt +0 -36
  33. models/text_recognition_crnn/charset_3944_CN.txt +0 -3944
  34. models/text_recognition_crnn/charset_94_CH.txt +0 -94
  35. models/text_recognition_crnn/crnn.py +4092 -10
  36. models/text_recognition_crnn/demo.py +1 -2
  37. tools/eval/eval.py +59 -59
benchmark/README.md CHANGED
@@ -1,11 +1,9 @@
1
  # OpenCV Zoo Benchmark
2
 
3
- Benchmarking different models in the zoo.
4
 
5
  Data for benchmarking will be downloaded and loaded in [data](./data) based on given config.
6
 
7
- Time is measured from data preprocess (resize is excluded), to a forward pass of a network, and postprocess to get final results. The final time data presented is averaged from a 100-time run.
8
-
9
  ## Preparation
10
 
11
  1. Install `python >= 3.6`.
@@ -13,29 +11,29 @@ Time is measured from data preprocess (resize is excluded), to a forward pass of
13
  3. Download data for benchmarking.
14
  1. Download all data: `python download_data.py`
15
  2. Download one or more specified data: `python download_data.py face text`. Available names can be found in `download_data.py`.
16
- 3. If download fails, you can download all data from https://pan.baidu.com/s/18sV8D4vXUb2xC9EG45k7bg (code: pvrw). Please place and extract data packages under [./data](./data).
17
 
18
  ## Benchmarking
19
 
20
- Run the following command to benchmark on a given config:
21
 
22
  ```shell
23
  export PYTHONPATH=$PYTHONPATH:..
24
  python benchmark.py --cfg ./config/face_detection_yunet.yaml
25
  ```
26
 
27
- If you are a Windows user and wants to run in CMD/PowerShell, use this command instead:
28
  - CMD
29
- ```shell
30
- set PYTHONPATH=%PYTHONPATH%;..
31
- python benchmark.py --cfg ./config/face_detection_yunet.yaml
32
- ```
33
 
34
  - PowerShell
35
- ```shell
36
- $env:PYTHONPATH=$env:PYTHONPATH+";.."
37
- python benchmark.py --cfg ./config/face_detection_yunet.yaml
38
- ```
39
  <!--
40
  Omit `--cfg` if you want to benchmark all included models:
41
  ```shell
 
1
  # OpenCV Zoo Benchmark
2
 
3
+ Benchmarking the speed of OpenCV DNN inferring different models in the zoo. Result of each model includes the time of its preprocessing, inference and postprocessing stages.
4
 
5
  Data for benchmarking will be downloaded and loaded in [data](./data) based on given config.
6
 
 
 
7
  ## Preparation
8
 
9
  1. Install `python >= 3.6`.
 
11
  3. Download data for benchmarking.
12
  1. Download all data: `python download_data.py`
13
  2. Download one or more specified data: `python download_data.py face text`. Available names can be found in `download_data.py`.
14
+ 3. You can also download all data from https://pan.baidu.com/s/18sV8D4vXUb2xC9EG45k7bg (code: pvrw). Please place and extract data packages under [./data](./data).
15
 
16
  ## Benchmarking
17
 
18
+ **Linux**:
19
 
20
  ```shell
21
  export PYTHONPATH=$PYTHONPATH:..
22
  python benchmark.py --cfg ./config/face_detection_yunet.yaml
23
  ```
24
 
25
+ **Windows**:
26
  - CMD
27
+ ```shell
28
+ set PYTHONPATH=%PYTHONPATH%;..
29
+ python benchmark.py --cfg ./config/face_detection_yunet.yaml
30
+ ```
31
 
32
  - PowerShell
33
+ ```shell
34
+ $env:PYTHONPATH=$env:PYTHONPATH+";.."
35
+ python benchmark.py --cfg ./config/face_detection_yunet.yaml
36
+ ```
37
  <!--
38
  Omit `--cfg` if you want to benchmark all included models:
39
  ```shell
benchmark/benchmark.py CHANGED
@@ -11,6 +11,9 @@ from utils import METRICS, DATALOADERS
11
  parser = argparse.ArgumentParser("Benchmarks for OpenCV Zoo.")
12
  parser.add_argument('--cfg', '-c', type=str,
13
  help='Benchmarking on the given config.')
 
 
 
14
  args = parser.parse_args()
15
 
16
  def build_from_cfg(cfg, registery, key=None, name=None):
@@ -24,14 +27,6 @@ def build_from_cfg(cfg, registery, key=None, name=None):
24
  else:
25
  raise NotImplementedError()
26
 
27
- def prepend_pythonpath(cfg):
28
- for k, v in cfg.items():
29
- if isinstance(v, dict):
30
- prepend_pythonpath(v)
31
- else:
32
- if 'path' in k.lower():
33
- cfg[k] = os.path.join(os.environ['PYTHONPATH'].split(os.pathsep)[-1], v)
34
-
35
  class Benchmark:
36
  def __init__(self, **kwargs):
37
  self._type = kwargs.pop('type', None)
@@ -115,16 +110,30 @@ if __name__ == '__main__':
115
  with open(args.cfg, 'r') as f:
116
  cfg = yaml.safe_load(f)
117
 
118
- # prepend PYTHONPATH to each path
119
- prepend_pythonpath(cfg)
120
-
121
- # Instantiate benchmarking
122
  benchmark = Benchmark(**cfg['Benchmark'])
123
 
124
  # Instantiate model
125
- model = build_from_cfg(cfg=cfg['Model'], registery=MODELS, key='name')
126
-
127
- # Run benchmarking
128
- print('Benchmarking {}:'.format(model.name))
129
- benchmark.run(model)
130
- benchmark.printResults()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  parser = argparse.ArgumentParser("Benchmarks for OpenCV Zoo.")
12
  parser.add_argument('--cfg', '-c', type=str,
13
  help='Benchmarking on the given config.')
14
+ parser.add_argument("--fp32", action="store_true", help="Runs models of float32 precision only.")
15
+ parser.add_argument("--fp16", action="store_true", help="Runs models of float16 precision only.")
16
+ parser.add_argument("--int8", action="store_true", help="Runs models of int8 precision only.")
17
  args = parser.parse_args()
18
 
19
  def build_from_cfg(cfg, registery, key=None, name=None):
 
27
  else:
28
  raise NotImplementedError()
29
 
 
 
 
 
 
 
 
 
30
  class Benchmark:
31
  def __init__(self, **kwargs):
32
  self._type = kwargs.pop('type', None)
 
110
  with open(args.cfg, 'r') as f:
111
  cfg = yaml.safe_load(f)
112
 
113
+ # Instantiate benchmark
 
 
 
114
  benchmark = Benchmark(**cfg['Benchmark'])
115
 
116
  # Instantiate model
117
+ model_config = cfg['Model']
118
+ model_handler, model_paths = MODELS.get(model_config.pop('name'))
119
+
120
+ _model_paths = []
121
+ if args.fp32 or args.fp16 or args.int8:
122
+ if args.fp32:
123
+ _model_paths += model_paths['fp32']
124
+ if args.fp16:
125
+ _model_paths += model_paths['fp16']
126
+ if args.int8:
127
+ _model_paths += model_paths['int8']
128
+ else:
129
+ _model_paths = model_paths['fp32'] + model_paths['fp16'] + model_paths['int8']
130
+
131
+ for model_path in _model_paths:
132
+ model = model_handler(*model_path, **model_config)
133
+ # Format model_path
134
+ for i in range(len(model_path)):
135
+ model_path[i] = model_path[i].split('/')[-1]
136
+ print('Benchmarking {} with {}'.format(model.name, model_path))
137
+ # Run benchmark
138
+ benchmark.run(model)
139
+ benchmark.printResults()
benchmark/config/face_detection_yunet.yaml CHANGED
@@ -2,7 +2,7 @@ Benchmark:
2
  name: "Face Detection Benchmark"
3
  type: "Detection"
4
  data:
5
- path: "benchmark/data/face_detection"
6
  files: ["group.jpg", "concerts.jpg", "dance.jpg"]
7
  sizes: # [[w1, h1], ...], Omit to run at original scale
8
  - [160, 120]
@@ -16,8 +16,6 @@ Benchmark:
16
 
17
  Model:
18
  name: "YuNet"
19
- modelPath: "models/face_detection_yunet/face_detection_yunet_2022mar.onnx"
20
  confThreshold: 0.6
21
  nmsThreshold: 0.3
22
  topK: 5000
23
-
 
2
  name: "Face Detection Benchmark"
3
  type: "Detection"
4
  data:
5
+ path: "data/face_detection"
6
  files: ["group.jpg", "concerts.jpg", "dance.jpg"]
7
  sizes: # [[w1, h1], ...], Omit to run at original scale
8
  - [160, 120]
 
16
 
17
  Model:
18
  name: "YuNet"
 
19
  confThreshold: 0.6
20
  nmsThreshold: 0.3
21
  topK: 5000
 
benchmark/config/face_recognition_sface.yaml CHANGED
@@ -2,7 +2,7 @@ Benchmark:
2
  name: "Face Recognition Benchmark"
3
  type: "Recognition"
4
  data:
5
- path: "benchmark/data/face_recognition"
6
  files: ["Aaron_Tippin_0001.jpg", "Alvaro_Uribe_0028.jpg", "Alvaro_Uribe_0029.jpg", "Jose_Luis_Rodriguez_Zapatero_0001.jpg"]
7
  metric: # 'sizes' is omitted since this model requires input of fixed size
8
  warmup: 30
@@ -13,4 +13,3 @@ Benchmark:
13
 
14
  Model:
15
  name: "SFace"
16
- modelPath: "models/face_recognition_sface/face_recognition_sface_2021dec.onnx"
 
2
  name: "Face Recognition Benchmark"
3
  type: "Recognition"
4
  data:
5
+ path: "data/face_recognition"
6
  files: ["Aaron_Tippin_0001.jpg", "Alvaro_Uribe_0028.jpg", "Alvaro_Uribe_0029.jpg", "Jose_Luis_Rodriguez_Zapatero_0001.jpg"]
7
  metric: # 'sizes' is omitted since this model requires input of fixed size
8
  warmup: 30
 
13
 
14
  Model:
15
  name: "SFace"
 
benchmark/config/facial_expression_recognition.yaml CHANGED
@@ -2,7 +2,7 @@ Benchmark:
2
  name: "Facial Expression Recognition Benchmark"
3
  type: "Recognition"
4
  data:
5
- path: "benchmark/data/facial_expression_recognition/fer_evaluation"
6
  files: ["RAF_test_0_61.jpg", "RAF_test_0_30.jpg", "RAF_test_6_25.jpg"]
7
  metric: # 'sizes' is omitted since this model requires input of fixed size
8
  warmup: 30
@@ -13,4 +13,3 @@ Benchmark:
13
 
14
  Model:
15
  name: "FacialExpressionRecog"
16
- modelPath: "models/facial_expression_recognition/facial_expression_recognition_mobilefacenet_2022july.onnx"
 
2
  name: "Facial Expression Recognition Benchmark"
3
  type: "Recognition"
4
  data:
5
+ path: "data/facial_expression_recognition/fer_evaluation"
6
  files: ["RAF_test_0_61.jpg", "RAF_test_0_30.jpg", "RAF_test_6_25.jpg"]
7
  metric: # 'sizes' is omitted since this model requires input of fixed size
8
  warmup: 30
 
13
 
14
  Model:
15
  name: "FacialExpressionRecog"
 
benchmark/config/handpose_estimation_mediapipe.yaml CHANGED
@@ -2,7 +2,7 @@ Benchmark:
2
  name: "Hand Pose Estimation Benchmark"
3
  type: "Recognition"
4
  data:
5
- path: "benchmark/data/palm_detection"
6
  files: ["palm1.jpg", "palm2.jpg", "palm3.jpg"]
7
  sizes: # [[w1, h1], ...], Omit to run at original scale
8
  - [256, 256]
@@ -15,5 +15,4 @@ Benchmark:
15
 
16
  Model:
17
  name: "MPHandPose"
18
- modelPath: "models/handpose_estimation_mediapipe/handpose_estimation_mediapipe_2022may.onnx"
19
  confThreshold: 0.9
 
2
  name: "Hand Pose Estimation Benchmark"
3
  type: "Recognition"
4
  data:
5
+ path: "data/palm_detection_20230125"
6
  files: ["palm1.jpg", "palm2.jpg", "palm3.jpg"]
7
  sizes: # [[w1, h1], ...], Omit to run at original scale
8
  - [256, 256]
 
15
 
16
  Model:
17
  name: "MPHandPose"
 
18
  confThreshold: 0.9
benchmark/config/human_segmentation_pphumanseg.yaml CHANGED
@@ -2,7 +2,7 @@ Benchmark:
2
  name: "Human Segmentation Benchmark"
3
  type: "Base"
4
  data:
5
- path: "benchmark/data/human_segmentation"
6
  files: ["messi5.jpg", "100040721_1.jpg", "detect.jpg"]
7
  sizes: [[192, 192]]
8
  toRGB: True
@@ -15,4 +15,3 @@ Benchmark:
15
 
16
  Model:
17
  name: "PPHumanSeg"
18
- modelPath: "models/human_segmentation_pphumanseg/human_segmentation_pphumanseg_2021oct.onnx"
 
2
  name: "Human Segmentation Benchmark"
3
  type: "Base"
4
  data:
5
+ path: "data/human_segmentation"
6
  files: ["messi5.jpg", "100040721_1.jpg", "detect.jpg"]
7
  sizes: [[192, 192]]
8
  toRGB: True
 
15
 
16
  Model:
17
  name: "PPHumanSeg"
 
benchmark/config/{image_classification_mobilenetv1.yaml → image_classification_mobilenet.yaml} RENAMED
@@ -2,7 +2,7 @@ Benchmark:
2
  name: "Image Classification Benchmark"
3
  type: "Classification"
4
  data:
5
- path: "benchmark/data/image_classification"
6
  files: ["coffee_mug.jpg", "umbrella.jpg", "wall_clock.jpg"]
7
  sizes: [[256, 256]]
8
  toRGB: True
@@ -15,6 +15,4 @@ Benchmark:
15
  target: "cpu"
16
 
17
  Model:
18
- name: "MobileNetV1"
19
- modelPath: "models/image_classification_mobilenet/image_classification_mobilenetv1_2022apr.onnx"
20
-
 
2
  name: "Image Classification Benchmark"
3
  type: "Classification"
4
  data:
5
+ path: "data/image_classification"
6
  files: ["coffee_mug.jpg", "umbrella.jpg", "wall_clock.jpg"]
7
  sizes: [[256, 256]]
8
  toRGB: True
 
15
  target: "cpu"
16
 
17
  Model:
18
+ name: "MobileNet"
 
 
benchmark/config/image_classification_mobilenetv2.yaml DELETED
@@ -1,20 +0,0 @@
1
- Benchmark:
2
- name: "Image Classification Benchmark"
3
- type: "Classification"
4
- data:
5
- path: "benchmark/data/image_classification"
6
- files: ["coffee_mug.jpg", "umbrella.jpg", "wall_clock.jpg"]
7
- sizes: [[256, 256]]
8
- toRGB: True
9
- centerCrop: 224
10
- metric:
11
- warmup: 30
12
- repeat: 10
13
- reduction: "median"
14
- backend: "default"
15
- target: "cpu"
16
-
17
- Model:
18
- name: "MobileNetV2"
19
- modelPath: "models/image_classification_mobilenet/image_classification_mobilenetv2_2022apr.onnx"
20
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
benchmark/config/image_classification_ppresnet.yaml CHANGED
@@ -2,7 +2,7 @@ Benchmark:
2
  name: "Image Classification Benchmark"
3
  type: "Classification"
4
  data:
5
- path: "benchmark/data/image_classification"
6
  files: ["coffee_mug.jpg", "umbrella.jpg", "wall_clock.jpg"]
7
  sizes: [[256, 256]]
8
  toRGB: True
@@ -16,5 +16,3 @@ Benchmark:
16
 
17
  Model:
18
  name: "PPResNet"
19
- modelPath: "models/image_classification_ppresnet/image_classification_ppresnet50_2022jan.onnx"
20
-
 
2
  name: "Image Classification Benchmark"
3
  type: "Classification"
4
  data:
5
+ path: "data/image_classification"
6
  files: ["coffee_mug.jpg", "umbrella.jpg", "wall_clock.jpg"]
7
  sizes: [[256, 256]]
8
  toRGB: True
 
16
 
17
  Model:
18
  name: "PPResNet"
 
 
benchmark/config/license_plate_detection_yunet.yaml CHANGED
@@ -2,7 +2,7 @@ Benchmark:
2
  name: "License Plate Detection Benchmark"
3
  type: "Detection"
4
  data:
5
- path: "benchmark/data/license_plate_detection"
6
  files: ["1.jpg", "2.jpg", "3.jpg", "4.jpg"]
7
  sizes: # [[w1, h1], ...], Omit to run at original scale
8
  - [320, 240]
@@ -15,7 +15,6 @@ Benchmark:
15
 
16
  Model:
17
  name: "LPD_YuNet"
18
- modelPath: "models/license_plate_detection_yunet/license_plate_detection_lpd_yunet_2022may.onnx"
19
  confThreshold: 0.8
20
  nmsThreshold: 0.3
21
  topK: 5000
 
2
  name: "License Plate Detection Benchmark"
3
  type: "Detection"
4
  data:
5
+ path: "data/license_plate_detection"
6
  files: ["1.jpg", "2.jpg", "3.jpg", "4.jpg"]
7
  sizes: # [[w1, h1], ...], Omit to run at original scale
8
  - [320, 240]
 
15
 
16
  Model:
17
  name: "LPD_YuNet"
 
18
  confThreshold: 0.8
19
  nmsThreshold: 0.3
20
  topK: 5000
benchmark/config/object_detection_nanodet.yaml CHANGED
@@ -2,7 +2,7 @@ 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]
@@ -15,7 +15,5 @@ Benchmark:
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
-
 
2
  name: "Object Detection Benchmark"
3
  type: "Detection"
4
  data:
5
+ path: "data/object_detection"
6
  files: ["1.png", "2.png", "3.png"]
7
  sizes:
8
  - [416, 416]
 
15
 
16
  Model:
17
  name: "NanoDet"
 
18
  prob_threshold: 0.35
19
  iou_threshold: 0.6
 
benchmark/config/object_detection_yolox.yaml CHANGED
@@ -2,7 +2,7 @@ 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]
@@ -15,8 +15,6 @@ Benchmark:
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
-
 
2
  name: "Object Detection Benchmark"
3
  type: "Detection"
4
  data:
5
+ path: "data/object_detection"
6
  files: ["1.png", "2.png", "3.png"]
7
  sizes:
8
  - [640, 640]
 
15
 
16
  Model:
17
  name: "YoloX"
 
18
  confThreshold: 0.35
19
  nmsThreshold: 0.5
20
  objThreshold: 0.5
 
benchmark/config/object_tracking_dasiamrpn.yaml CHANGED
@@ -3,7 +3,7 @@ Benchmark:
3
  type: "Tracking"
4
  data:
5
  type: "TrackingVideoLoader"
6
- path: "benchmark/data/object_tracking"
7
  files: ["throw_cup.mp4"]
8
  metric:
9
  type: "Tracking"
@@ -13,6 +13,3 @@ Benchmark:
13
 
14
  Model:
15
  name: "DaSiamRPN"
16
- model_path: "models/object_tracking_dasiamrpn/object_tracking_dasiamrpn_model_2021nov.onnx"
17
- kernel_cls1_path: "models/object_tracking_dasiamrpn/object_tracking_dasiamrpn_kernel_cls1_2021nov.onnx"
18
- kernel_r1_path: "models/object_tracking_dasiamrpn/object_tracking_dasiamrpn_kernel_r1_2021nov.onnx"
 
3
  type: "Tracking"
4
  data:
5
  type: "TrackingVideoLoader"
6
+ path: "data/object_tracking"
7
  files: ["throw_cup.mp4"]
8
  metric:
9
  type: "Tracking"
 
13
 
14
  Model:
15
  name: "DaSiamRPN"
 
 
 
benchmark/config/palm_detection_mediapipe.yaml CHANGED
@@ -2,7 +2,7 @@ Benchmark:
2
  name: "Palm Detection Benchmark"
3
  type: "Detection"
4
  data:
5
- path: "benchmark/data/palm_detection"
6
  files: ["palm1.jpg", "palm2.jpg", "palm3.jpg"]
7
  sizes: # [[w1, h1], ...], Omit to run at original scale
8
  - [256, 256]
@@ -15,8 +15,6 @@ Benchmark:
15
 
16
  Model:
17
  name: "MPPalmDet"
18
- modelPath: "models/palm_detection_mediapipe/palm_detection_mediapipe_2022may.onnx"
19
  scoreThreshold: 0.5
20
  nmsThreshold: 0.3
21
  topK: 1
22
-
 
2
  name: "Palm Detection Benchmark"
3
  type: "Detection"
4
  data:
5
+ path: "data/palm_detection_20230125"
6
  files: ["palm1.jpg", "palm2.jpg", "palm3.jpg"]
7
  sizes: # [[w1, h1], ...], Omit to run at original scale
8
  - [256, 256]
 
15
 
16
  Model:
17
  name: "MPPalmDet"
 
18
  scoreThreshold: 0.5
19
  nmsThreshold: 0.3
20
  topK: 1
 
benchmark/config/person_reid_youtureid.yaml CHANGED
@@ -2,7 +2,7 @@ Benchmark:
2
  name: "Person ReID Benchmark"
3
  type: "Base"
4
  data:
5
- path: "benchmark/data/person_reid"
6
  files: ["0030_c1_f0056923.jpg", "0042_c5_f0068994.jpg", "0056_c8_f0017063.jpg"]
7
  sizes: [[128, 256]]
8
  metric:
@@ -14,4 +14,3 @@ Benchmark:
14
 
15
  Model:
16
  name: "YoutuReID"
17
- modelPath: "models/person_reid_youtureid/person_reid_youtu_2021nov.onnx"
 
2
  name: "Person ReID Benchmark"
3
  type: "Base"
4
  data:
5
+ path: "data/person_reid"
6
  files: ["0030_c1_f0056923.jpg", "0042_c5_f0068994.jpg", "0056_c8_f0017063.jpg"]
7
  sizes: [[128, 256]]
8
  metric:
 
14
 
15
  Model:
16
  name: "YoutuReID"
 
benchmark/config/qrcode_wechatqrcode.yaml CHANGED
@@ -2,7 +2,7 @@ Benchmark:
2
  name: "QRCode Detection and Decoding Benchmark"
3
  type: "Detection"
4
  data:
5
- path: "benchmark/data/qrcode"
6
  files: ["opencv.png", "opencv_zoo.png"]
7
  sizes:
8
  - [100, 100]
@@ -16,7 +16,3 @@ Benchmark:
16
 
17
  Model:
18
  name: "WeChatQRCode"
19
- detect_prototxt_path: "models/qrcode_wechatqrcode/detect_2021nov.prototxt"
20
- detect_model_path: "models/qrcode_wechatqrcode/detect_2021nov.caffemodel"
21
- sr_prototxt_path: "models/qrcode_wechatqrcode/sr_2021nov.prototxt"
22
- sr_model_path: "models/qrcode_wechatqrcode/sr_2021nov.caffemodel"
 
2
  name: "QRCode Detection and Decoding Benchmark"
3
  type: "Detection"
4
  data:
5
+ path: "data/qrcode"
6
  files: ["opencv.png", "opencv_zoo.png"]
7
  sizes:
8
  - [100, 100]
 
16
 
17
  Model:
18
  name: "WeChatQRCode"
 
 
 
 
benchmark/config/text_detection_db.yaml CHANGED
@@ -2,7 +2,7 @@ Benchmark:
2
  name: "Text Detection Benchmark"
3
  type: "Detection"
4
  data:
5
- path: "benchmark/data/text"
6
  files: ["1.jpg", "2.jpg", "3.jpg"]
7
  sizes: # [[w1, h1], ...], Omit to run at original scale
8
  - [640, 480]
@@ -15,8 +15,7 @@ Benchmark:
15
 
16
  Model:
17
  name: "DB"
18
- modelPath: "models/text_detection_db/text_detection_DB_TD500_resnet18_2021sep.onnx"
19
  binaryThreshold: 0.3
20
  polygonThreshold: 0.5
21
  maxCandidates: 200
22
- unclipRatio: 2.0
 
2
  name: "Text Detection Benchmark"
3
  type: "Detection"
4
  data:
5
+ path: "data/text"
6
  files: ["1.jpg", "2.jpg", "3.jpg"]
7
  sizes: # [[w1, h1], ...], Omit to run at original scale
8
  - [640, 480]
 
15
 
16
  Model:
17
  name: "DB"
 
18
  binaryThreshold: 0.3
19
  polygonThreshold: 0.5
20
  maxCandidates: 200
21
+ unclipRatio: 2.0
benchmark/config/{text_recognition_crnn_en.yaml → text_recognition_crnn.yaml} RENAMED
@@ -2,7 +2,7 @@ Benchmark:
2
  name: "Text Recognition Benchmark"
3
  type: "Recognition"
4
  data:
5
- path: "benchmark/data/text"
6
  files: ["1.jpg", "2.jpg", "3.jpg"]
7
  metric: # 'sizes' is omitted since this model requires input of fixed size
8
  warmup: 30
@@ -13,5 +13,3 @@ Benchmark:
13
 
14
  Model:
15
  name: "CRNN"
16
- modelPath: "models/text_recognition_crnn/text_recognition_CRNN_EN_2021sep.onnx"
17
- charsetPath: "models/text_recognition_crnn/charset_36_EN.txt"
 
2
  name: "Text Recognition Benchmark"
3
  type: "Recognition"
4
  data:
5
+ path: "data/text"
6
  files: ["1.jpg", "2.jpg", "3.jpg"]
7
  metric: # 'sizes' is omitted since this model requires input of fixed size
8
  warmup: 30
 
13
 
14
  Model:
15
  name: "CRNN"
 
 
benchmark/config/text_recognition_crnn_cn.yaml DELETED
@@ -1,17 +0,0 @@
1
- Benchmark:
2
- name: "Text Recognition Benchmark"
3
- type: "Recognition"
4
- data:
5
- path: "benchmark/data/text"
6
- files: ["1.jpg", "2.jpg", "3.jpg"]
7
- metric: # 'sizes' is omitted since this model requires input of fixed size
8
- warmup: 30
9
- repeat: 10
10
- reduction: "median"
11
- backend: "default"
12
- target: "cpu"
13
-
14
- Model:
15
- name: "CRNN"
16
- modelPath: "models/text_recognition_crnn/text_recognition_CRNN_CN_2021nov.onnx"
17
- charsetPath: "models/text_recognition_crnn/charset_3944_CN.txt"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
benchmark/download_data.py CHANGED
@@ -202,9 +202,9 @@ data_downloaders = dict(
202
  sha='5b741fbf34c1fbcf59cad8f2a65327a5899e66f1',
203
  filename='person_reid.zip'),
204
  palm_detection=Downloader(name='palm_detection',
205
- url='https://drive.google.com/u/0/uc?id=1zYnOsXxYXn-hFIdyIws9louzqjpt8byQ&export=download',
206
- sha='78ed095b685a9bacdd643782716127afe936f366',
207
- filename='palm_detection_20220826.zip'),
208
  license_plate_detection=Downloader(name='license_plate_detection',
209
  url='https://drive.google.com/u/0/uc?id=1cf9MEyUqMMy8lLeDGd1any6tM_SsSmny&export=download',
210
  sha='997acb143ddc4531e6e41365fb7ad4722064564c',
 
202
  sha='5b741fbf34c1fbcf59cad8f2a65327a5899e66f1',
203
  filename='person_reid.zip'),
204
  palm_detection=Downloader(name='palm_detection',
205
+ url='https://drive.google.com/u/0/uc?id=1Z4KvccTZPeZ0qFLZ6saBt_TvcKYyo9JE&export=download',
206
+ sha='4b5bb24a51daab8913957e60245a4eb766c8cf2e',
207
+ filename='palm_detection_20230125.zip'),
208
  license_plate_detection=Downloader(name='license_plate_detection',
209
  url='https://drive.google.com/u/0/uc?id=1cf9MEyUqMMy8lLeDGd1any6tM_SsSmny&export=download',
210
  sha='997acb143ddc4531e6e41365fb7ad4722064564c',
models/__init__.py CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  from .face_detection_yunet.yunet import YuNet
2
  from .text_detection_db.db import DB
3
  from .text_recognition_crnn.crnn import CRNN
@@ -7,8 +11,7 @@ from .human_segmentation_pphumanseg.pphumanseg import PPHumanSeg
7
  from .qrcode_wechatqrcode.wechatqrcode import WeChatQRCode
8
  from .object_tracking_dasiamrpn.dasiamrpn import DaSiamRPN
9
  from .person_reid_youtureid.youtureid import YoutuReID
10
- from .image_classification_mobilenet.mobilenet_v1 import MobileNetV1
11
- 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
@@ -16,18 +19,61 @@ from .object_detection_nanodet.nanodet import NanoDet
16
  from .object_detection_yolox.yolox import YoloX
17
  from .facial_expression_recognition.facial_fer_model import FacialExpressionRecog
18
 
19
- class Registery:
20
  def __init__(self, name):
21
  self._name = name
22
  self._dict = dict()
23
 
 
 
24
  def get(self, key):
 
 
 
 
 
25
  return self._dict[key]
26
 
27
  def register(self, item):
28
- self._dict[item.__name__] = item
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
- MODELS = Registery('Models')
31
  MODELS.register(YuNet)
32
  MODELS.register(DB)
33
  MODELS.register(CRNN)
@@ -37,8 +83,7 @@ MODELS.register(PPHumanSeg)
37
  MODELS.register(WeChatQRCode)
38
  MODELS.register(DaSiamRPN)
39
  MODELS.register(YoutuReID)
40
- MODELS.register(MobileNetV1)
41
- MODELS.register(MobileNetV2)
42
  MODELS.register(MPPalmDet)
43
  MODELS.register(MPHandPose)
44
  MODELS.register(LPD_YuNet)
 
1
+ from pathlib import Path
2
+ import glob
3
+ import os
4
+
5
  from .face_detection_yunet.yunet import YuNet
6
  from .text_detection_db.db import DB
7
  from .text_recognition_crnn.crnn import CRNN
 
11
  from .qrcode_wechatqrcode.wechatqrcode import WeChatQRCode
12
  from .object_tracking_dasiamrpn.dasiamrpn import DaSiamRPN
13
  from .person_reid_youtureid.youtureid import YoutuReID
14
+ from .image_classification_mobilenet.mobilenet import MobileNet
 
15
  from .palm_detection_mediapipe.mp_palmdet import MPPalmDet
16
  from .handpose_estimation_mediapipe.mp_handpose import MPHandPose
17
  from .license_plate_detection_yunet.lpd_yunet import LPD_YuNet
 
19
  from .object_detection_yolox.yolox import YoloX
20
  from .facial_expression_recognition.facial_fer_model import FacialExpressionRecog
21
 
22
+ class ModuleRegistery:
23
  def __init__(self, name):
24
  self._name = name
25
  self._dict = dict()
26
 
27
+ self._base_path = Path(__file__).parent
28
+
29
  def get(self, key):
30
+ '''
31
+ Returns a tuple with:
32
+ - a module handler,
33
+ - a list of model file paths
34
+ '''
35
  return self._dict[key]
36
 
37
  def register(self, item):
38
+ '''
39
+ Registers given module handler along with paths of model files
40
+ '''
41
+ # search for model files
42
+ model_dir = str(self._base_path / item.__module__.split(".")[1])
43
+ fp32_model_paths = []
44
+ fp16_model_paths = []
45
+ int8_model_paths = []
46
+ # onnx
47
+ ret_onnx = sorted(glob.glob(os.path.join(model_dir, "*.onnx")))
48
+ if "object_tracking" in item.__module__:
49
+ # object tracking models usually have multiple parts
50
+ fp32_model_paths = [ret_onnx]
51
+ else:
52
+ for r in ret_onnx:
53
+ if "int8" in r:
54
+ int8_model_paths.append([r])
55
+ elif "fp16" in r: # exclude fp16 for now
56
+ fp16_model_paths.append([r])
57
+ else:
58
+ fp32_model_paths.append([r])
59
+ # caffe
60
+ ret_caffemodel = sorted(glob.glob(os.path.join(model_dir, "*.caffemodel")))
61
+ ret_prototxt = sorted(glob.glob(os.path.join(model_dir, "*.prototxt")))
62
+ caffe_models = []
63
+ for caffemodel, prototxt in zip(ret_caffemodel, ret_prototxt):
64
+ caffe_models += [prototxt, caffemodel]
65
+ if caffe_models:
66
+ fp32_model_paths.append(caffe_models)
67
+
68
+ all_model_paths = dict(
69
+ fp32=fp32_model_paths,
70
+ fp16=fp16_model_paths,
71
+ int8=int8_model_paths,
72
+ )
73
+
74
+ self._dict[item.__name__] = (item, all_model_paths)
75
 
76
+ MODELS = ModuleRegistery('Models')
77
  MODELS.register(YuNet)
78
  MODELS.register(DB)
79
  MODELS.register(CRNN)
 
83
  MODELS.register(WeChatQRCode)
84
  MODELS.register(DaSiamRPN)
85
  MODELS.register(YoutuReID)
86
+ MODELS.register(MobileNet)
 
87
  MODELS.register(MPPalmDet)
88
  MODELS.register(MPHandPose)
89
  MODELS.register(LPD_YuNet)
models/image_classification_mobilenet/demo.py CHANGED
@@ -3,8 +3,7 @@ import argparse
3
  import numpy as np
4
  import cv2 as cv
5
 
6
- from mobilenet_v1 import MobileNetV1
7
- from mobilenet_v2 import MobileNetV2
8
 
9
  def str2bool(v):
10
  if v.lower() in ['on', 'yes', 'true', 'y', 't']:
@@ -26,24 +25,23 @@ try:
26
  except:
27
  print('This version of OpenCV does not support TIM-VX and NPU. Visit https://github.com/opencv/opencv/wiki/TIM-VX-Backend-For-Running-OpenCV-On-NPU for more information.')
28
 
 
 
 
 
 
 
 
29
  parser = argparse.ArgumentParser(description='Demo for MobileNet V1 & V2.')
30
  parser.add_argument('--input', '-i', type=str, help='Usage: Set input path to a certain image, omit if using camera.')
31
- parser.add_argument('--model', '-m', type=str, choices=['v1', 'v2', 'v1-q', 'v2-q'], default='v1', help='Usage: Set model type, defaults to image_classification_mobilenetv1_2022apr.onnx (v1).')
32
  parser.add_argument('--backend', '-b', type=int, default=backends[0], help=help_msg_backends.format(*backends))
33
  parser.add_argument('--target', '-t', type=int, default=targets[0], help=help_msg_targets.format(*targets))
34
- parser.add_argument('--label', '-l', type=str, default='./imagenet_labels.txt', help='Usage: Set path to the different labels that will be used during the detection. Default list found in imagenet_labels.txt')
35
  args = parser.parse_args()
36
 
37
  if __name__ == '__main__':
38
- # Instantiate ResNet
39
- models = {
40
- 'v1': MobileNetV1(modelPath='./image_classification_mobilenetv1_2022apr.onnx', labelPath=args.label, backendId=args.backend, targetId=args.target),
41
- 'v2': MobileNetV2(modelPath='./image_classification_mobilenetv2_2022apr.onnx', labelPath=args.label, backendId=args.backend, targetId=args.target),
42
- 'v1-q': MobileNetV1(modelPath='./image_classification_mobilenetv1_2022apr-int8-quantized.onnx', labelPath=args.label, backendId=args.backend, targetId=args.target),
43
- 'v2-q': MobileNetV2(modelPath='./image_classification_mobilenetv2_2022apr-int8-quantized.onnx', labelPath=args.label, backendId=args.backend, targetId=args.target)
44
-
45
- }
46
- model = models[args.model]
47
 
48
  # Read image and get a 224x224 crop from a 256x256 resized
49
  image = cv.imread(args.input)
@@ -56,4 +54,3 @@ if __name__ == '__main__':
56
 
57
  # Print result
58
  print('label: {}'.format(result))
59
-
 
3
  import numpy as np
4
  import cv2 as cv
5
 
6
+ from mobilenet import MobileNet
 
7
 
8
  def str2bool(v):
9
  if v.lower() in ['on', 'yes', 'true', 'y', 't']:
 
25
  except:
26
  print('This version of OpenCV does not support TIM-VX and NPU. Visit https://github.com/opencv/opencv/wiki/TIM-VX-Backend-For-Running-OpenCV-On-NPU for more information.')
27
 
28
+ all_mobilenets = [
29
+ 'image_classification_mobilenetv1_2022apr.onnx',
30
+ 'image_classification_mobilenetv2_2022apr.onnx',
31
+ 'image_classification_mobilenetv1_2022apr-int8-quantized.onnx',
32
+ 'image_classification_mobilenetv2_2022apr-int8-quantized.onnx'
33
+ ]
34
+
35
  parser = argparse.ArgumentParser(description='Demo for MobileNet V1 & V2.')
36
  parser.add_argument('--input', '-i', type=str, help='Usage: Set input path to a certain image, omit if using camera.')
37
+ parser.add_argument('--model', '-m', type=str, choices=all_mobilenets, default=all_mobilenets[0], help='Usage: Set model type, defaults to image_classification_mobilenetv1_2022apr.onnx (v1).')
38
  parser.add_argument('--backend', '-b', type=int, default=backends[0], help=help_msg_backends.format(*backends))
39
  parser.add_argument('--target', '-t', type=int, default=targets[0], help=help_msg_targets.format(*targets))
 
40
  args = parser.parse_args()
41
 
42
  if __name__ == '__main__':
43
+ # Instantiate MobileNet
44
+ model = MobileNet(modelPath=args.model, backendId=args.backend, targetId=args.target)
 
 
 
 
 
 
 
45
 
46
  # Read image and get a 224x224 crop from a 256x256 resized
47
  image = cv.imread(args.input)
 
54
 
55
  # Print result
56
  print('label: {}'.format(result))
 
models/image_classification_mobilenet/{imagenet_labels.txt → mobilenet.py} RENAMED
@@ -1,4 +1,83 @@
1
- tench
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  goldfish
3
  great white shark
4
  tiger shark
@@ -997,4 +1076,4 @@ earthstar
997
  hen-of-the-woods
998
  bolete
999
  ear
1000
- toilet tissue
 
1
+ import numpy as np
2
+ import cv2 as cv
3
+
4
+ class MobileNet:
5
+ '''
6
+ Works with MobileNet V1 & V2.
7
+ '''
8
+
9
+ def __init__(self, modelPath, topK=1, backendId=0, targetId=0):
10
+ self.model_path = modelPath
11
+ assert topK >= 1
12
+ self.top_k = topK
13
+ self.backend_id = backendId
14
+ self.target_id = targetId
15
+
16
+ self.model = cv.dnn.readNet(self.model_path)
17
+ self.model.setPreferableBackend(self.backend_id)
18
+ self.model.setPreferableTarget(self.target_id)
19
+
20
+ self.input_names = ''
21
+ self.output_names = ''
22
+ self.input_size = [224, 224]
23
+ self.mean=[0.485, 0.456, 0.406]
24
+ self.std=[0.229, 0.224, 0.225]
25
+
26
+ # load labels
27
+ self._labels = self._load_labels()
28
+
29
+ def _load_labels(self):
30
+ return self.LABELS_IMAGENET_1K.splitlines()
31
+
32
+ @property
33
+ def name(self):
34
+ return self.__class__.__name__
35
+
36
+ def setBackend(self, backendId):
37
+ self.backend_id = backendId
38
+ self.model.setPreferableBackend(self.backend_id)
39
+
40
+ def setTarget(self, targetId):
41
+ self.target_id = targetId
42
+ self.model.setPreferableTarget(self.target_id)
43
+
44
+ def _preprocess(self, image):
45
+ input_blob = (image / 255.0 - self.mean) / self.std
46
+ input_blob = input_blob.transpose(2, 0, 1)
47
+ input_blob = input_blob[np.newaxis, :, :, :]
48
+ input_blob = input_blob.astype(np.float32)
49
+ return input_blob
50
+
51
+ def infer(self, image):
52
+ # Preprocess
53
+ input_blob = self._preprocess(image)
54
+
55
+ # Forward
56
+ self.model.setInput(input_blob, self.input_names)
57
+ output_blob = self.model.forward(self.output_names)
58
+
59
+ # Postprocess
60
+ results = self._postprocess(output_blob)
61
+
62
+ return results
63
+
64
+ def _postprocess(self, output_blob):
65
+ batched_class_id_list = []
66
+ for o in output_blob:
67
+ class_id_list = o.argsort()[::-1][:self.top_k]
68
+ batched_class_id_list.append(class_id_list)
69
+ if len(self._labels) > 0:
70
+ batched_predicted_labels = []
71
+ for class_id_list in batched_class_id_list:
72
+ predicted_labels = []
73
+ for class_id in class_id_list:
74
+ predicted_labels.append(self._labels[class_id])
75
+ batched_predicted_labels.append(predicted_labels)
76
+ return batched_predicted_labels
77
+ else:
78
+ return batched_class_id_list
79
+
80
+ LABELS_IMAGENET_1K = '''tench
81
  goldfish
82
  great white shark
83
  tiger shark
 
1076
  hen-of-the-woods
1077
  bolete
1078
  ear
1079
+ toilet tissue'''
models/image_classification_mobilenet/mobilenet_v1.py DELETED
@@ -1,81 +0,0 @@
1
- import numpy as np
2
- import cv2 as cv
3
-
4
- class MobileNetV1:
5
- def __init__(self, modelPath, labelPath=None, topK=1, backendId=0, targetId=0):
6
- self.model_path = modelPath
7
- self.label_path = labelPath
8
- assert topK >= 1
9
- self.top_k = topK
10
- self.backend_id = backendId
11
- self.target_id = targetId
12
-
13
- self.model = cv.dnn.readNet(self.model_path)
14
- self.model.setPreferableBackend(self.backend_id)
15
- self.model.setPreferableTarget(self.target_id)
16
-
17
- self.input_names = ''
18
- self.output_names = ''
19
- self.input_size = [224, 224]
20
- self.mean=[0.485, 0.456, 0.406]
21
- self.std=[0.229, 0.224, 0.225]
22
-
23
- # load labels
24
- self._labels = self._load_labels()
25
-
26
- def _load_labels(self):
27
- labels = []
28
- if self.label_path is not None:
29
- with open(self.label_path, 'r') as f:
30
- for line in f:
31
- labels.append(line.strip())
32
- return labels
33
-
34
- @property
35
- def name(self):
36
- return self.__class__.__name__
37
-
38
- def setBackend(self, backendId):
39
- self.backend_id = backendId
40
- self.model.setPreferableBackend(self.backend_id)
41
-
42
- def setTarget(self, targetId):
43
- self.target_id = targetId
44
- self.model.setPreferableTarget(self.target_id)
45
-
46
- def _preprocess(self, image):
47
- input_blob = (image / 255.0 - self.mean) / self.std
48
- input_blob = input_blob.transpose(2, 0, 1)
49
- input_blob = input_blob[np.newaxis, :, :, :]
50
- input_blob = input_blob.astype(np.float32)
51
- return input_blob
52
-
53
- def infer(self, image):
54
- # Preprocess
55
- input_blob = self._preprocess(image)
56
-
57
- # Forward
58
- self.model.setInput(input_blob, self.input_names)
59
- output_blob = self.model.forward(self.output_names)
60
-
61
- # Postprocess
62
- results = self._postprocess(output_blob)
63
-
64
- return results
65
-
66
- def _postprocess(self, output_blob):
67
- batched_class_id_list = []
68
- for o in output_blob:
69
- class_id_list = o.argsort()[::-1][:self.top_k]
70
- batched_class_id_list.append(class_id_list)
71
- if len(self._labels) > 0:
72
- batched_predicted_labels = []
73
- for class_id_list in batched_class_id_list:
74
- predicted_labels = []
75
- for class_id in class_id_list:
76
- predicted_labels.append(self._labels[class_id])
77
- batched_predicted_labels.append(predicted_labels)
78
- return batched_predicted_labels
79
- else:
80
- return batched_class_id_list
81
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
models/image_classification_mobilenet/mobilenet_v2.py DELETED
@@ -1,81 +0,0 @@
1
- import numpy as np
2
- import cv2 as cv
3
-
4
- class MobileNetV2:
5
- def __init__(self, modelPath, labelPath=None, topK=1, backendId=0, targetId=0):
6
- self.model_path = modelPath
7
- self.label_path = labelPath
8
- assert topK >= 1
9
- self.top_k = topK
10
- self.backend_id = backendId
11
- self.target_id = targetId
12
-
13
- self.model = cv.dnn.readNet(self.model_path)
14
- self.model.setPreferableBackend(self.backend_id)
15
- self.model.setPreferableTarget(self.target_id)
16
-
17
- self.input_names = ''
18
- self.output_names = ''
19
- self.input_size = [224, 224]
20
- self.mean=[0.485, 0.456, 0.406]
21
- self.std=[0.229, 0.224, 0.225]
22
-
23
- # load labels
24
- self._labels = self._load_labels()
25
-
26
- def _load_labels(self):
27
- labels = []
28
- if self.label_path is not None:
29
- with open(self.label_path, 'r') as f:
30
- for line in f:
31
- labels.append(line.strip())
32
- return labels
33
-
34
- @property
35
- def name(self):
36
- return self.__class__.__name__
37
-
38
- def setBackend(self, backendId):
39
- self.backend_id = backendId
40
- self.model.setPreferableBackend(self.backend_id)
41
-
42
- def setTarget(self, targetId):
43
- self.target_id = targetId
44
- self.model.setPreferableTarget(self.target_id)
45
-
46
- def _preprocess(self, image):
47
- input_blob = (image / 255.0 - self.mean) / self.std
48
- input_blob = input_blob.transpose(2, 0, 1)
49
- input_blob = input_blob[np.newaxis, :, :, :]
50
- input_blob = input_blob.astype(np.float32)
51
- return input_blob
52
-
53
- def infer(self, image):
54
- # Preprocess
55
- input_blob = self._preprocess(image)
56
-
57
- # Forward
58
- self.model.setInput(input_blob, self.input_names)
59
- output_blob = self.model.forward(self.output_names)
60
-
61
- # Postprocess
62
- results = self._postprocess(output_blob)
63
-
64
- return results
65
-
66
- def _postprocess(self, output_blob):
67
- batched_class_id_list = []
68
- for o in output_blob:
69
- class_id_list = o.argsort()[::-1][:self.top_k]
70
- batched_class_id_list.append(class_id_list)
71
- if len(self._labels) > 0:
72
- batched_predicted_labels = []
73
- for class_id_list in batched_class_id_list:
74
- predicted_labels = []
75
- for class_id in class_id_list:
76
- predicted_labels.append(self._labels[class_id])
77
- batched_predicted_labels.append(predicted_labels)
78
- return batched_predicted_labels
79
- else:
80
- return batched_class_id_list
81
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
models/image_classification_ppresnet/demo.py CHANGED
@@ -36,12 +36,11 @@ parser.add_argument('--input', '-i', type=str, help='Usage: Set input path to a
36
  parser.add_argument('--model', '-m', type=str, default='image_classification_ppresnet50_2022jan.onnx', help='Usage: Set model path, defaults to image_classification_ppresnet50_2022jan.onnx.')
37
  parser.add_argument('--backend', '-b', type=int, default=backends[0], help=help_msg_backends.format(*backends))
38
  parser.add_argument('--target', '-t', type=int, default=targets[0], help=help_msg_targets.format(*targets))
39
- parser.add_argument('--label', '-l', type=str, default='./imagenet_labels.txt', help='Usage: Set path to the different labels that will be used during the detection. Default list found in imagenet_labels.txt')
40
  args = parser.parse_args()
41
 
42
  if __name__ == '__main__':
43
  # Instantiate ResNet
44
- model = PPResNet(modelPath=args.model, labelPath=args.label, backendId=args.backend, targetId=args.target)
45
 
46
  # Read image and get a 224x224 crop from a 256x256 resized
47
  image = cv.imread(args.input)
@@ -54,4 +53,3 @@ if __name__ == '__main__':
54
 
55
  # Print result
56
  print('label: {}'.format(result))
57
-
 
36
  parser.add_argument('--model', '-m', type=str, default='image_classification_ppresnet50_2022jan.onnx', help='Usage: Set model path, defaults to image_classification_ppresnet50_2022jan.onnx.')
37
  parser.add_argument('--backend', '-b', type=int, default=backends[0], help=help_msg_backends.format(*backends))
38
  parser.add_argument('--target', '-t', type=int, default=targets[0], help=help_msg_targets.format(*targets))
 
39
  args = parser.parse_args()
40
 
41
  if __name__ == '__main__':
42
  # Instantiate ResNet
43
+ model = PPResNet(modelPath=args.model, backendId=args.backend, targetId=args.target)
44
 
45
  # Read image and get a 224x224 crop from a 256x256 resized
46
  image = cv.imread(args.input)
 
53
 
54
  # Print result
55
  print('label: {}'.format(result))
 
models/image_classification_ppresnet/imagenet_labels.txt DELETED
@@ -1,1000 +0,0 @@
1
- tench
2
- goldfish
3
- great white shark
4
- tiger shark
5
- hammerhead
6
- electric ray
7
- stingray
8
- cock
9
- hen
10
- ostrich
11
- brambling
12
- goldfinch
13
- house finch
14
- junco
15
- indigo bunting
16
- robin
17
- bulbul
18
- jay
19
- magpie
20
- chickadee
21
- water ouzel
22
- kite
23
- bald eagle
24
- vulture
25
- great grey owl
26
- European fire salamander
27
- common newt
28
- eft
29
- spotted salamander
30
- axolotl
31
- bullfrog
32
- tree frog
33
- tailed frog
34
- loggerhead
35
- leatherback turtle
36
- mud turtle
37
- terrapin
38
- box turtle
39
- banded gecko
40
- common iguana
41
- American chameleon
42
- whiptail
43
- agama
44
- frilled lizard
45
- alligator lizard
46
- Gila monster
47
- green lizard
48
- African chameleon
49
- Komodo dragon
50
- African crocodile
51
- American alligator
52
- triceratops
53
- thunder snake
54
- ringneck snake
55
- hognose snake
56
- green snake
57
- king snake
58
- garter snake
59
- water snake
60
- vine snake
61
- night snake
62
- boa constrictor
63
- rock python
64
- Indian cobra
65
- green mamba
66
- sea snake
67
- horned viper
68
- diamondback
69
- sidewinder
70
- trilobite
71
- harvestman
72
- scorpion
73
- black and gold garden spider
74
- barn spider
75
- garden spider
76
- black widow
77
- tarantula
78
- wolf spider
79
- tick
80
- centipede
81
- black grouse
82
- ptarmigan
83
- ruffed grouse
84
- prairie chicken
85
- peacock
86
- quail
87
- partridge
88
- African grey
89
- macaw
90
- sulphur-crested cockatoo
91
- lorikeet
92
- coucal
93
- bee eater
94
- hornbill
95
- hummingbird
96
- jacamar
97
- toucan
98
- drake
99
- red-breasted merganser
100
- goose
101
- black swan
102
- tusker
103
- echidna
104
- platypus
105
- wallaby
106
- koala
107
- wombat
108
- jellyfish
109
- sea anemone
110
- brain coral
111
- flatworm
112
- nematode
113
- conch
114
- snail
115
- slug
116
- sea slug
117
- chiton
118
- chambered nautilus
119
- Dungeness crab
120
- rock crab
121
- fiddler crab
122
- king crab
123
- American lobster
124
- spiny lobster
125
- crayfish
126
- hermit crab
127
- isopod
128
- white stork
129
- black stork
130
- spoonbill
131
- flamingo
132
- little blue heron
133
- American egret
134
- bittern
135
- crane
136
- limpkin
137
- European gallinule
138
- American coot
139
- bustard
140
- ruddy turnstone
141
- red-backed sandpiper
142
- redshank
143
- dowitcher
144
- oystercatcher
145
- pelican
146
- king penguin
147
- albatross
148
- grey whale
149
- killer whale
150
- dugong
151
- sea lion
152
- Chihuahua
153
- Japanese spaniel
154
- Maltese dog
155
- Pekinese
156
- Shih-Tzu
157
- Blenheim spaniel
158
- papillon
159
- toy terrier
160
- Rhodesian ridgeback
161
- Afghan hound
162
- basset
163
- beagle
164
- bloodhound
165
- bluetick
166
- black-and-tan coonhound
167
- Walker hound
168
- English foxhound
169
- redbone
170
- borzoi
171
- Irish wolfhound
172
- Italian greyhound
173
- whippet
174
- Ibizan hound
175
- Norwegian elkhound
176
- otterhound
177
- Saluki
178
- Scottish deerhound
179
- Weimaraner
180
- Staffordshire bullterrier
181
- American Staffordshire terrier
182
- Bedlington terrier
183
- Border terrier
184
- Kerry blue terrier
185
- Irish terrier
186
- Norfolk terrier
187
- Norwich terrier
188
- Yorkshire terrier
189
- wire-haired fox terrier
190
- Lakeland terrier
191
- Sealyham terrier
192
- Airedale
193
- cairn
194
- Australian terrier
195
- Dandie Dinmont
196
- Boston bull
197
- miniature schnauzer
198
- giant schnauzer
199
- standard schnauzer
200
- Scotch terrier
201
- Tibetan terrier
202
- silky terrier
203
- soft-coated wheaten terrier
204
- West Highland white terrier
205
- Lhasa
206
- flat-coated retriever
207
- curly-coated retriever
208
- golden retriever
209
- Labrador retriever
210
- Chesapeake Bay retriever
211
- German short-haired pointer
212
- vizsla
213
- English setter
214
- Irish setter
215
- Gordon setter
216
- Brittany spaniel
217
- clumber
218
- English springer
219
- Welsh springer spaniel
220
- cocker spaniel
221
- Sussex spaniel
222
- Irish water spaniel
223
- kuvasz
224
- schipperke
225
- groenendael
226
- malinois
227
- briard
228
- kelpie
229
- komondor
230
- Old English sheepdog
231
- Shetland sheepdog
232
- collie
233
- Border collie
234
- Bouvier des Flandres
235
- Rottweiler
236
- German shepherd
237
- Doberman
238
- miniature pinscher
239
- Greater Swiss Mountain dog
240
- Bernese mountain dog
241
- Appenzeller
242
- EntleBucher
243
- boxer
244
- bull mastiff
245
- Tibetan mastiff
246
- French bulldog
247
- Great Dane
248
- Saint Bernard
249
- Eskimo dog
250
- malamute
251
- Siberian husky
252
- dalmatian
253
- affenpinscher
254
- basenji
255
- pug
256
- Leonberg
257
- Newfoundland
258
- Great Pyrenees
259
- Samoyed
260
- Pomeranian
261
- chow
262
- keeshond
263
- Brabancon griffon
264
- Pembroke
265
- Cardigan
266
- toy poodle
267
- miniature poodle
268
- standard poodle
269
- Mexican hairless
270
- timber wolf
271
- white wolf
272
- red wolf
273
- coyote
274
- dingo
275
- dhole
276
- African hunting dog
277
- hyena
278
- red fox
279
- kit fox
280
- Arctic fox
281
- grey fox
282
- tabby
283
- tiger cat
284
- Persian cat
285
- Siamese cat
286
- Egyptian cat
287
- cougar
288
- lynx
289
- leopard
290
- snow leopard
291
- jaguar
292
- lion
293
- tiger
294
- cheetah
295
- brown bear
296
- American black bear
297
- ice bear
298
- sloth bear
299
- mongoose
300
- meerkat
301
- tiger beetle
302
- ladybug
303
- ground beetle
304
- long-horned beetle
305
- leaf beetle
306
- dung beetle
307
- rhinoceros beetle
308
- weevil
309
- fly
310
- bee
311
- ant
312
- grasshopper
313
- cricket
314
- walking stick
315
- cockroach
316
- mantis
317
- cicada
318
- leafhopper
319
- lacewing
320
- dragonfly
321
- damselfly
322
- admiral
323
- ringlet
324
- monarch
325
- cabbage butterfly
326
- sulphur butterfly
327
- lycaenid
328
- starfish
329
- sea urchin
330
- sea cucumber
331
- wood rabbit
332
- hare
333
- Angora
334
- hamster
335
- porcupine
336
- fox squirrel
337
- marmot
338
- beaver
339
- guinea pig
340
- sorrel
341
- zebra
342
- hog
343
- wild boar
344
- warthog
345
- hippopotamus
346
- ox
347
- water buffalo
348
- bison
349
- ram
350
- bighorn
351
- ibex
352
- hartebeest
353
- impala
354
- gazelle
355
- Arabian camel
356
- llama
357
- weasel
358
- mink
359
- polecat
360
- black-footed ferret
361
- otter
362
- skunk
363
- badger
364
- armadillo
365
- three-toed sloth
366
- orangutan
367
- gorilla
368
- chimpanzee
369
- gibbon
370
- siamang
371
- guenon
372
- patas
373
- baboon
374
- macaque
375
- langur
376
- colobus
377
- proboscis monkey
378
- marmoset
379
- capuchin
380
- howler monkey
381
- titi
382
- spider monkey
383
- squirrel monkey
384
- Madagascar cat
385
- indri
386
- Indian elephant
387
- African elephant
388
- lesser panda
389
- giant panda
390
- barracouta
391
- eel
392
- coho
393
- rock beauty
394
- anemone fish
395
- sturgeon
396
- gar
397
- lionfish
398
- puffer
399
- abacus
400
- abaya
401
- academic gown
402
- accordion
403
- acoustic guitar
404
- aircraft carrier
405
- airliner
406
- airship
407
- altar
408
- ambulance
409
- amphibian
410
- analog clock
411
- apiary
412
- apron
413
- ashcan
414
- assault rifle
415
- backpack
416
- bakery
417
- balance beam
418
- balloon
419
- ballpoint
420
- Band Aid
421
- banjo
422
- bannister
423
- barbell
424
- barber chair
425
- barbershop
426
- barn
427
- barometer
428
- barrel
429
- barrow
430
- baseball
431
- basketball
432
- bassinet
433
- bassoon
434
- bathing cap
435
- bath towel
436
- bathtub
437
- beach wagon
438
- beacon
439
- beaker
440
- bearskin
441
- beer bottle
442
- beer glass
443
- bell cote
444
- bib
445
- bicycle-built-for-two
446
- bikini
447
- binder
448
- binoculars
449
- birdhouse
450
- boathouse
451
- bobsled
452
- bolo tie
453
- bonnet
454
- bookcase
455
- bookshop
456
- bottlecap
457
- bow
458
- bow tie
459
- brass
460
- brassiere
461
- breakwater
462
- breastplate
463
- broom
464
- bucket
465
- buckle
466
- bulletproof vest
467
- bullet train
468
- butcher shop
469
- cab
470
- caldron
471
- candle
472
- cannon
473
- canoe
474
- can opener
475
- cardigan
476
- car mirror
477
- carousel
478
- carpenters kit
479
- carton
480
- car wheel
481
- cash machine
482
- cassette
483
- cassette player
484
- castle
485
- catamaran
486
- CD player
487
- cello
488
- cellular telephone
489
- chain
490
- chainlink fence
491
- chain mail
492
- chain saw
493
- chest
494
- chiffonier
495
- chime
496
- china cabinet
497
- Christmas stocking
498
- church
499
- cinema
500
- cleaver
501
- cliff dwelling
502
- cloak
503
- clog
504
- cocktail shaker
505
- coffee mug
506
- coffeepot
507
- coil
508
- combination lock
509
- computer keyboard
510
- confectionery
511
- container ship
512
- convertible
513
- corkscrew
514
- cornet
515
- cowboy boot
516
- cowboy hat
517
- cradle
518
- crane
519
- crash helmet
520
- crate
521
- crib
522
- Crock Pot
523
- croquet ball
524
- crutch
525
- cuirass
526
- dam
527
- desk
528
- desktop computer
529
- dial telephone
530
- diaper
531
- digital clock
532
- digital watch
533
- dining table
534
- dishrag
535
- dishwasher
536
- disk brake
537
- dock
538
- dogsled
539
- dome
540
- doormat
541
- drilling platform
542
- drum
543
- drumstick
544
- dumbbell
545
- Dutch oven
546
- electric fan
547
- electric guitar
548
- electric locomotive
549
- entertainment center
550
- envelope
551
- espresso maker
552
- face powder
553
- feather boa
554
- file
555
- fireboat
556
- fire engine
557
- fire screen
558
- flagpole
559
- flute
560
- folding chair
561
- football helmet
562
- forklift
563
- fountain
564
- fountain pen
565
- four-poster
566
- freight car
567
- French horn
568
- frying pan
569
- fur coat
570
- garbage truck
571
- gasmask
572
- gas pump
573
- goblet
574
- go-kart
575
- golf ball
576
- golfcart
577
- gondola
578
- gong
579
- gown
580
- grand piano
581
- greenhouse
582
- grille
583
- grocery store
584
- guillotine
585
- hair slide
586
- hair spray
587
- half track
588
- hammer
589
- hamper
590
- hand blower
591
- hand-held computer
592
- handkerchief
593
- hard disc
594
- harmonica
595
- harp
596
- harvester
597
- hatchet
598
- holster
599
- home theater
600
- honeycomb
601
- hook
602
- hoopskirt
603
- horizontal bar
604
- horse cart
605
- hourglass
606
- iPod
607
- iron
608
- jack-o-lantern
609
- jean
610
- jeep
611
- jersey
612
- jigsaw puzzle
613
- jinrikisha
614
- joystick
615
- kimono
616
- knee pad
617
- knot
618
- lab coat
619
- ladle
620
- lampshade
621
- laptop
622
- lawn mower
623
- lens cap
624
- letter opener
625
- library
626
- lifeboat
627
- lighter
628
- limousine
629
- liner
630
- lipstick
631
- Loafer
632
- lotion
633
- loudspeaker
634
- loupe
635
- lumbermill
636
- magnetic compass
637
- mailbag
638
- mailbox
639
- maillot
640
- maillot
641
- manhole cover
642
- maraca
643
- marimba
644
- mask
645
- matchstick
646
- maypole
647
- maze
648
- measuring cup
649
- medicine chest
650
- megalith
651
- microphone
652
- microwave
653
- military uniform
654
- milk can
655
- minibus
656
- miniskirt
657
- minivan
658
- missile
659
- mitten
660
- mixing bowl
661
- mobile home
662
- Model T
663
- modem
664
- monastery
665
- monitor
666
- moped
667
- mortar
668
- mortarboard
669
- mosque
670
- mosquito net
671
- motor scooter
672
- mountain bike
673
- mountain tent
674
- mouse
675
- mousetrap
676
- moving van
677
- muzzle
678
- nail
679
- neck brace
680
- necklace
681
- nipple
682
- notebook
683
- obelisk
684
- oboe
685
- ocarina
686
- odometer
687
- oil filter
688
- organ
689
- oscilloscope
690
- overskirt
691
- oxcart
692
- oxygen mask
693
- packet
694
- paddle
695
- paddlewheel
696
- padlock
697
- paintbrush
698
- pajama
699
- palace
700
- panpipe
701
- paper towel
702
- parachute
703
- parallel bars
704
- park bench
705
- parking meter
706
- passenger car
707
- patio
708
- pay-phone
709
- pedestal
710
- pencil box
711
- pencil sharpener
712
- perfume
713
- Petri dish
714
- photocopier
715
- pick
716
- pickelhaube
717
- picket fence
718
- pickup
719
- pier
720
- piggy bank
721
- pill bottle
722
- pillow
723
- ping-pong ball
724
- pinwheel
725
- pirate
726
- pitcher
727
- plane
728
- planetarium
729
- plastic bag
730
- plate rack
731
- plow
732
- plunger
733
- Polaroid camera
734
- pole
735
- police van
736
- poncho
737
- pool table
738
- pop bottle
739
- pot
740
- potters wheel
741
- power drill
742
- prayer rug
743
- printer
744
- prison
745
- projectile
746
- projector
747
- puck
748
- punching bag
749
- purse
750
- quill
751
- quilt
752
- racer
753
- racket
754
- radiator
755
- radio
756
- radio telescope
757
- rain barrel
758
- recreational vehicle
759
- reel
760
- reflex camera
761
- refrigerator
762
- remote control
763
- restaurant
764
- revolver
765
- rifle
766
- rocking chair
767
- rotisserie
768
- rubber eraser
769
- rugby ball
770
- rule
771
- running shoe
772
- safe
773
- safety pin
774
- saltshaker
775
- sandal
776
- sarong
777
- sax
778
- scabbard
779
- scale
780
- school bus
781
- schooner
782
- scoreboard
783
- screen
784
- screw
785
- screwdriver
786
- seat belt
787
- sewing machine
788
- shield
789
- shoe shop
790
- shoji
791
- shopping basket
792
- shopping cart
793
- shovel
794
- shower cap
795
- shower curtain
796
- ski
797
- ski mask
798
- sleeping bag
799
- slide rule
800
- sliding door
801
- slot
802
- snorkel
803
- snowmobile
804
- snowplow
805
- soap dispenser
806
- soccer ball
807
- sock
808
- solar dish
809
- sombrero
810
- soup bowl
811
- space bar
812
- space heater
813
- space shuttle
814
- spatula
815
- speedboat
816
- spider web
817
- spindle
818
- sports car
819
- spotlight
820
- stage
821
- steam locomotive
822
- steel arch bridge
823
- steel drum
824
- stethoscope
825
- stole
826
- stone wall
827
- stopwatch
828
- stove
829
- strainer
830
- streetcar
831
- stretcher
832
- studio couch
833
- stupa
834
- submarine
835
- suit
836
- sundial
837
- sunglass
838
- sunglasses
839
- sunscreen
840
- suspension bridge
841
- swab
842
- sweatshirt
843
- swimming trunks
844
- swing
845
- switch
846
- syringe
847
- table lamp
848
- tank
849
- tape player
850
- teapot
851
- teddy
852
- television
853
- tennis ball
854
- thatch
855
- theater curtain
856
- thimble
857
- thresher
858
- throne
859
- tile roof
860
- toaster
861
- tobacco shop
862
- toilet seat
863
- torch
864
- totem pole
865
- tow truck
866
- toyshop
867
- tractor
868
- trailer truck
869
- tray
870
- trench coat
871
- tricycle
872
- trimaran
873
- tripod
874
- triumphal arch
875
- trolleybus
876
- trombone
877
- tub
878
- turnstile
879
- typewriter keyboard
880
- umbrella
881
- unicycle
882
- upright
883
- vacuum
884
- vase
885
- vault
886
- velvet
887
- vending machine
888
- vestment
889
- viaduct
890
- violin
891
- volleyball
892
- waffle iron
893
- wall clock
894
- wallet
895
- wardrobe
896
- warplane
897
- washbasin
898
- washer
899
- water bottle
900
- water jug
901
- water tower
902
- whiskey jug
903
- whistle
904
- wig
905
- window screen
906
- window shade
907
- Windsor tie
908
- wine bottle
909
- wing
910
- wok
911
- wooden spoon
912
- wool
913
- worm fence
914
- wreck
915
- yawl
916
- yurt
917
- web site
918
- comic book
919
- crossword puzzle
920
- street sign
921
- traffic light
922
- book jacket
923
- menu
924
- plate
925
- guacamole
926
- consomme
927
- hot pot
928
- trifle
929
- ice cream
930
- ice lolly
931
- French loaf
932
- bagel
933
- pretzel
934
- cheeseburger
935
- hotdog
936
- mashed potato
937
- head cabbage
938
- broccoli
939
- cauliflower
940
- zucchini
941
- spaghetti squash
942
- acorn squash
943
- butternut squash
944
- cucumber
945
- artichoke
946
- bell pepper
947
- cardoon
948
- mushroom
949
- Granny Smith
950
- strawberry
951
- orange
952
- lemon
953
- fig
954
- pineapple
955
- banana
956
- jackfruit
957
- custard apple
958
- pomegranate
959
- hay
960
- carbonara
961
- chocolate sauce
962
- dough
963
- meat loaf
964
- pizza
965
- potpie
966
- burrito
967
- red wine
968
- espresso
969
- cup
970
- eggnog
971
- alp
972
- bubble
973
- cliff
974
- coral reef
975
- geyser
976
- lakeside
977
- promontory
978
- sandbar
979
- seashore
980
- valley
981
- volcano
982
- ballplayer
983
- groom
984
- scuba diver
985
- rapeseed
986
- daisy
987
- yellow ladys slipper
988
- corn
989
-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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
models/image_classification_ppresnet/ppresnet.py CHANGED
@@ -9,9 +9,8 @@ import numpy as np
9
  import cv2 as cv
10
 
11
  class PPResNet:
12
- def __init__(self, modelPath, labelPath=None, topK=1, backendId=0, targetId=0):
13
  self._modelPath = modelPath
14
- self._labelPath = labelPath
15
  assert topK >= 1
16
  self._topK = topK
17
  self._backendId = backendId
@@ -31,12 +30,7 @@ class PPResNet:
31
  self._labels = self._load_labels()
32
 
33
  def _load_labels(self):
34
- labels = []
35
- if self._labelPath is not None:
36
- with open(self._labelPath, 'r') as f:
37
- for line in f:
38
- labels.append(line.strip())
39
- return labels
40
 
41
  @property
42
  def name(self):
@@ -88,3 +82,1003 @@ class PPResNet:
88
  else:
89
  return batched_class_id_list
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  import cv2 as cv
10
 
11
  class PPResNet:
12
+ def __init__(self, modelPath, topK=1, backendId=0, targetId=0):
13
  self._modelPath = modelPath
 
14
  assert topK >= 1
15
  self._topK = topK
16
  self._backendId = backendId
 
30
  self._labels = self._load_labels()
31
 
32
  def _load_labels(self):
33
+ return self.LABELS_IMAGENET_1K.splitlines()
 
 
 
 
 
34
 
35
  @property
36
  def name(self):
 
82
  else:
83
  return batched_class_id_list
84
 
85
+ LABELS_IMAGENET_1K = '''tench
86
+ goldfish
87
+ great white shark
88
+ tiger shark
89
+ hammerhead
90
+ electric ray
91
+ stingray
92
+ cock
93
+ hen
94
+ ostrich
95
+ brambling
96
+ goldfinch
97
+ house finch
98
+ junco
99
+ indigo bunting
100
+ robin
101
+ bulbul
102
+ jay
103
+ magpie
104
+ chickadee
105
+ water ouzel
106
+ kite
107
+ bald eagle
108
+ vulture
109
+ great grey owl
110
+ European fire salamander
111
+ common newt
112
+ eft
113
+ spotted salamander
114
+ axolotl
115
+ bullfrog
116
+ tree frog
117
+ tailed frog
118
+ loggerhead
119
+ leatherback turtle
120
+ mud turtle
121
+ terrapin
122
+ box turtle
123
+ banded gecko
124
+ common iguana
125
+ American chameleon
126
+ whiptail
127
+ agama
128
+ frilled lizard
129
+ alligator lizard
130
+ Gila monster
131
+ green lizard
132
+ African chameleon
133
+ Komodo dragon
134
+ African crocodile
135
+ American alligator
136
+ triceratops
137
+ thunder snake
138
+ ringneck snake
139
+ hognose snake
140
+ green snake
141
+ king snake
142
+ garter snake
143
+ water snake
144
+ vine snake
145
+ night snake
146
+ boa constrictor
147
+ rock python
148
+ Indian cobra
149
+ green mamba
150
+ sea snake
151
+ horned viper
152
+ diamondback
153
+ sidewinder
154
+ trilobite
155
+ harvestman
156
+ scorpion
157
+ black and gold garden spider
158
+ barn spider
159
+ garden spider
160
+ black widow
161
+ tarantula
162
+ wolf spider
163
+ tick
164
+ centipede
165
+ black grouse
166
+ ptarmigan
167
+ ruffed grouse
168
+ prairie chicken
169
+ peacock
170
+ quail
171
+ partridge
172
+ African grey
173
+ macaw
174
+ sulphur-crested cockatoo
175
+ lorikeet
176
+ coucal
177
+ bee eater
178
+ hornbill
179
+ hummingbird
180
+ jacamar
181
+ toucan
182
+ drake
183
+ red-breasted merganser
184
+ goose
185
+ black swan
186
+ tusker
187
+ echidna
188
+ platypus
189
+ wallaby
190
+ koala
191
+ wombat
192
+ jellyfish
193
+ sea anemone
194
+ brain coral
195
+ flatworm
196
+ nematode
197
+ conch
198
+ snail
199
+ slug
200
+ sea slug
201
+ chiton
202
+ chambered nautilus
203
+ Dungeness crab
204
+ rock crab
205
+ fiddler crab
206
+ king crab
207
+ American lobster
208
+ spiny lobster
209
+ crayfish
210
+ hermit crab
211
+ isopod
212
+ white stork
213
+ black stork
214
+ spoonbill
215
+ flamingo
216
+ little blue heron
217
+ American egret
218
+ bittern
219
+ crane
220
+ limpkin
221
+ European gallinule
222
+ American coot
223
+ bustard
224
+ ruddy turnstone
225
+ red-backed sandpiper
226
+ redshank
227
+ dowitcher
228
+ oystercatcher
229
+ pelican
230
+ king penguin
231
+ albatross
232
+ grey whale
233
+ killer whale
234
+ dugong
235
+ sea lion
236
+ Chihuahua
237
+ Japanese spaniel
238
+ Maltese dog
239
+ Pekinese
240
+ Shih-Tzu
241
+ Blenheim spaniel
242
+ papillon
243
+ toy terrier
244
+ Rhodesian ridgeback
245
+ Afghan hound
246
+ basset
247
+ beagle
248
+ bloodhound
249
+ bluetick
250
+ black-and-tan coonhound
251
+ Walker hound
252
+ English foxhound
253
+ redbone
254
+ borzoi
255
+ Irish wolfhound
256
+ Italian greyhound
257
+ whippet
258
+ Ibizan hound
259
+ Norwegian elkhound
260
+ otterhound
261
+ Saluki
262
+ Scottish deerhound
263
+ Weimaraner
264
+ Staffordshire bullterrier
265
+ American Staffordshire terrier
266
+ Bedlington terrier
267
+ Border terrier
268
+ Kerry blue terrier
269
+ Irish terrier
270
+ Norfolk terrier
271
+ Norwich terrier
272
+ Yorkshire terrier
273
+ wire-haired fox terrier
274
+ Lakeland terrier
275
+ Sealyham terrier
276
+ Airedale
277
+ cairn
278
+ Australian terrier
279
+ Dandie Dinmont
280
+ Boston bull
281
+ miniature schnauzer
282
+ giant schnauzer
283
+ standard schnauzer
284
+ Scotch terrier
285
+ Tibetan terrier
286
+ silky terrier
287
+ soft-coated wheaten terrier
288
+ West Highland white terrier
289
+ Lhasa
290
+ flat-coated retriever
291
+ curly-coated retriever
292
+ golden retriever
293
+ Labrador retriever
294
+ Chesapeake Bay retriever
295
+ German short-haired pointer
296
+ vizsla
297
+ English setter
298
+ Irish setter
299
+ Gordon setter
300
+ Brittany spaniel
301
+ clumber
302
+ English springer
303
+ Welsh springer spaniel
304
+ cocker spaniel
305
+ Sussex spaniel
306
+ Irish water spaniel
307
+ kuvasz
308
+ schipperke
309
+ groenendael
310
+ malinois
311
+ briard
312
+ kelpie
313
+ komondor
314
+ Old English sheepdog
315
+ Shetland sheepdog
316
+ collie
317
+ Border collie
318
+ Bouvier des Flandres
319
+ Rottweiler
320
+ German shepherd
321
+ Doberman
322
+ miniature pinscher
323
+ Greater Swiss Mountain dog
324
+ Bernese mountain dog
325
+ Appenzeller
326
+ EntleBucher
327
+ boxer
328
+ bull mastiff
329
+ Tibetan mastiff
330
+ French bulldog
331
+ Great Dane
332
+ Saint Bernard
333
+ Eskimo dog
334
+ malamute
335
+ Siberian husky
336
+ dalmatian
337
+ affenpinscher
338
+ basenji
339
+ pug
340
+ Leonberg
341
+ Newfoundland
342
+ Great Pyrenees
343
+ Samoyed
344
+ Pomeranian
345
+ chow
346
+ keeshond
347
+ Brabancon griffon
348
+ Pembroke
349
+ Cardigan
350
+ toy poodle
351
+ miniature poodle
352
+ standard poodle
353
+ Mexican hairless
354
+ timber wolf
355
+ white wolf
356
+ red wolf
357
+ coyote
358
+ dingo
359
+ dhole
360
+ African hunting dog
361
+ hyena
362
+ red fox
363
+ kit fox
364
+ Arctic fox
365
+ grey fox
366
+ tabby
367
+ tiger cat
368
+ Persian cat
369
+ Siamese cat
370
+ Egyptian cat
371
+ cougar
372
+ lynx
373
+ leopard
374
+ snow leopard
375
+ jaguar
376
+ lion
377
+ tiger
378
+ cheetah
379
+ brown bear
380
+ American black bear
381
+ ice bear
382
+ sloth bear
383
+ mongoose
384
+ meerkat
385
+ tiger beetle
386
+ ladybug
387
+ ground beetle
388
+ long-horned beetle
389
+ leaf beetle
390
+ dung beetle
391
+ rhinoceros beetle
392
+ weevil
393
+ fly
394
+ bee
395
+ ant
396
+ grasshopper
397
+ cricket
398
+ walking stick
399
+ cockroach
400
+ mantis
401
+ cicada
402
+ leafhopper
403
+ lacewing
404
+ dragonfly
405
+ damselfly
406
+ admiral
407
+ ringlet
408
+ monarch
409
+ cabbage butterfly
410
+ sulphur butterfly
411
+ lycaenid
412
+ starfish
413
+ sea urchin
414
+ sea cucumber
415
+ wood rabbit
416
+ hare
417
+ Angora
418
+ hamster
419
+ porcupine
420
+ fox squirrel
421
+ marmot
422
+ beaver
423
+ guinea pig
424
+ sorrel
425
+ zebra
426
+ hog
427
+ wild boar
428
+ warthog
429
+ hippopotamus
430
+ ox
431
+ water buffalo
432
+ bison
433
+ ram
434
+ bighorn
435
+ ibex
436
+ hartebeest
437
+ impala
438
+ gazelle
439
+ Arabian camel
440
+ llama
441
+ weasel
442
+ mink
443
+ polecat
444
+ black-footed ferret
445
+ otter
446
+ skunk
447
+ badger
448
+ armadillo
449
+ three-toed sloth
450
+ orangutan
451
+ gorilla
452
+ chimpanzee
453
+ gibbon
454
+ siamang
455
+ guenon
456
+ patas
457
+ baboon
458
+ macaque
459
+ langur
460
+ colobus
461
+ proboscis monkey
462
+ marmoset
463
+ capuchin
464
+ howler monkey
465
+ titi
466
+ spider monkey
467
+ squirrel monkey
468
+ Madagascar cat
469
+ indri
470
+ Indian elephant
471
+ African elephant
472
+ lesser panda
473
+ giant panda
474
+ barracouta
475
+ eel
476
+ coho
477
+ rock beauty
478
+ anemone fish
479
+ sturgeon
480
+ gar
481
+ lionfish
482
+ puffer
483
+ abacus
484
+ abaya
485
+ academic gown
486
+ accordion
487
+ acoustic guitar
488
+ aircraft carrier
489
+ airliner
490
+ airship
491
+ altar
492
+ ambulance
493
+ amphibian
494
+ analog clock
495
+ apiary
496
+ apron
497
+ ashcan
498
+ assault rifle
499
+ backpack
500
+ bakery
501
+ balance beam
502
+ balloon
503
+ ballpoint
504
+ Band Aid
505
+ banjo
506
+ bannister
507
+ barbell
508
+ barber chair
509
+ barbershop
510
+ barn
511
+ barometer
512
+ barrel
513
+ barrow
514
+ baseball
515
+ basketball
516
+ bassinet
517
+ bassoon
518
+ bathing cap
519
+ bath towel
520
+ bathtub
521
+ beach wagon
522
+ beacon
523
+ beaker
524
+ bearskin
525
+ beer bottle
526
+ beer glass
527
+ bell cote
528
+ bib
529
+ bicycle-built-for-two
530
+ bikini
531
+ binder
532
+ binoculars
533
+ birdhouse
534
+ boathouse
535
+ bobsled
536
+ bolo tie
537
+ bonnet
538
+ bookcase
539
+ bookshop
540
+ bottlecap
541
+ bow
542
+ bow tie
543
+ brass
544
+ brassiere
545
+ breakwater
546
+ breastplate
547
+ broom
548
+ bucket
549
+ buckle
550
+ bulletproof vest
551
+ bullet train
552
+ butcher shop
553
+ cab
554
+ caldron
555
+ candle
556
+ cannon
557
+ canoe
558
+ can opener
559
+ cardigan
560
+ car mirror
561
+ carousel
562
+ carpenters kit
563
+ carton
564
+ car wheel
565
+ cash machine
566
+ cassette
567
+ cassette player
568
+ castle
569
+ catamaran
570
+ CD player
571
+ cello
572
+ cellular telephone
573
+ chain
574
+ chainlink fence
575
+ chain mail
576
+ chain saw
577
+ chest
578
+ chiffonier
579
+ chime
580
+ china cabinet
581
+ Christmas stocking
582
+ church
583
+ cinema
584
+ cleaver
585
+ cliff dwelling
586
+ cloak
587
+ clog
588
+ cocktail shaker
589
+ coffee mug
590
+ coffeepot
591
+ coil
592
+ combination lock
593
+ computer keyboard
594
+ confectionery
595
+ container ship
596
+ convertible
597
+ corkscrew
598
+ cornet
599
+ cowboy boot
600
+ cowboy hat
601
+ cradle
602
+ crane
603
+ crash helmet
604
+ crate
605
+ crib
606
+ Crock Pot
607
+ croquet ball
608
+ crutch
609
+ cuirass
610
+ dam
611
+ desk
612
+ desktop computer
613
+ dial telephone
614
+ diaper
615
+ digital clock
616
+ digital watch
617
+ dining table
618
+ dishrag
619
+ dishwasher
620
+ disk brake
621
+ dock
622
+ dogsled
623
+ dome
624
+ doormat
625
+ drilling platform
626
+ drum
627
+ drumstick
628
+ dumbbell
629
+ Dutch oven
630
+ electric fan
631
+ electric guitar
632
+ electric locomotive
633
+ entertainment center
634
+ envelope
635
+ espresso maker
636
+ face powder
637
+ feather boa
638
+ file
639
+ fireboat
640
+ fire engine
641
+ fire screen
642
+ flagpole
643
+ flute
644
+ folding chair
645
+ football helmet
646
+ forklift
647
+ fountain
648
+ fountain pen
649
+ four-poster
650
+ freight car
651
+ French horn
652
+ frying pan
653
+ fur coat
654
+ garbage truck
655
+ gasmask
656
+ gas pump
657
+ goblet
658
+ go-kart
659
+ golf ball
660
+ golfcart
661
+ gondola
662
+ gong
663
+ gown
664
+ grand piano
665
+ greenhouse
666
+ grille
667
+ grocery store
668
+ guillotine
669
+ hair slide
670
+ hair spray
671
+ half track
672
+ hammer
673
+ hamper
674
+ hand blower
675
+ hand-held computer
676
+ handkerchief
677
+ hard disc
678
+ harmonica
679
+ harp
680
+ harvester
681
+ hatchet
682
+ holster
683
+ home theater
684
+ honeycomb
685
+ hook
686
+ hoopskirt
687
+ horizontal bar
688
+ horse cart
689
+ hourglass
690
+ iPod
691
+ iron
692
+ jack-o-lantern
693
+ jean
694
+ jeep
695
+ jersey
696
+ jigsaw puzzle
697
+ jinrikisha
698
+ joystick
699
+ kimono
700
+ knee pad
701
+ knot
702
+ lab coat
703
+ ladle
704
+ lampshade
705
+ laptop
706
+ lawn mower
707
+ lens cap
708
+ letter opener
709
+ library
710
+ lifeboat
711
+ lighter
712
+ limousine
713
+ liner
714
+ lipstick
715
+ Loafer
716
+ lotion
717
+ loudspeaker
718
+ loupe
719
+ lumbermill
720
+ magnetic compass
721
+ mailbag
722
+ mailbox
723
+ maillot
724
+ maillot
725
+ manhole cover
726
+ maraca
727
+ marimba
728
+ mask
729
+ matchstick
730
+ maypole
731
+ maze
732
+ measuring cup
733
+ medicine chest
734
+ megalith
735
+ microphone
736
+ microwave
737
+ military uniform
738
+ milk can
739
+ minibus
740
+ miniskirt
741
+ minivan
742
+ missile
743
+ mitten
744
+ mixing bowl
745
+ mobile home
746
+ Model T
747
+ modem
748
+ monastery
749
+ monitor
750
+ moped
751
+ mortar
752
+ mortarboard
753
+ mosque
754
+ mosquito net
755
+ motor scooter
756
+ mountain bike
757
+ mountain tent
758
+ mouse
759
+ mousetrap
760
+ moving van
761
+ muzzle
762
+ nail
763
+ neck brace
764
+ necklace
765
+ nipple
766
+ notebook
767
+ obelisk
768
+ oboe
769
+ ocarina
770
+ odometer
771
+ oil filter
772
+ organ
773
+ oscilloscope
774
+ overskirt
775
+ oxcart
776
+ oxygen mask
777
+ packet
778
+ paddle
779
+ paddlewheel
780
+ padlock
781
+ paintbrush
782
+ pajama
783
+ palace
784
+ panpipe
785
+ paper towel
786
+ parachute
787
+ parallel bars
788
+ park bench
789
+ parking meter
790
+ passenger car
791
+ patio
792
+ pay-phone
793
+ pedestal
794
+ pencil box
795
+ pencil sharpener
796
+ perfume
797
+ Petri dish
798
+ photocopier
799
+ pick
800
+ pickelhaube
801
+ picket fence
802
+ pickup
803
+ pier
804
+ piggy bank
805
+ pill bottle
806
+ pillow
807
+ ping-pong ball
808
+ pinwheel
809
+ pirate
810
+ pitcher
811
+ plane
812
+ planetarium
813
+ plastic bag
814
+ plate rack
815
+ plow
816
+ plunger
817
+ Polaroid camera
818
+ pole
819
+ police van
820
+ poncho
821
+ pool table
822
+ pop bottle
823
+ pot
824
+ potters wheel
825
+ power drill
826
+ prayer rug
827
+ printer
828
+ prison
829
+ projectile
830
+ projector
831
+ puck
832
+ punching bag
833
+ purse
834
+ quill
835
+ quilt
836
+ racer
837
+ racket
838
+ radiator
839
+ radio
840
+ radio telescope
841
+ rain barrel
842
+ recreational vehicle
843
+ reel
844
+ reflex camera
845
+ refrigerator
846
+ remote control
847
+ restaurant
848
+ revolver
849
+ rifle
850
+ rocking chair
851
+ rotisserie
852
+ rubber eraser
853
+ rugby ball
854
+ rule
855
+ running shoe
856
+ safe
857
+ safety pin
858
+ saltshaker
859
+ sandal
860
+ sarong
861
+ sax
862
+ scabbard
863
+ scale
864
+ school bus
865
+ schooner
866
+ scoreboard
867
+ screen
868
+ screw
869
+ screwdriver
870
+ seat belt
871
+ sewing machine
872
+ shield
873
+ shoe shop
874
+ shoji
875
+ shopping basket
876
+ shopping cart
877
+ shovel
878
+ shower cap
879
+ shower curtain
880
+ ski
881
+ ski mask
882
+ sleeping bag
883
+ slide rule
884
+ sliding door
885
+ slot
886
+ snorkel
887
+ snowmobile
888
+ snowplow
889
+ soap dispenser
890
+ soccer ball
891
+ sock
892
+ solar dish
893
+ sombrero
894
+ soup bowl
895
+ space bar
896
+ space heater
897
+ space shuttle
898
+ spatula
899
+ speedboat
900
+ spider web
901
+ spindle
902
+ sports car
903
+ spotlight
904
+ stage
905
+ steam locomotive
906
+ steel arch bridge
907
+ steel drum
908
+ stethoscope
909
+ stole
910
+ stone wall
911
+ stopwatch
912
+ stove
913
+ strainer
914
+ streetcar
915
+ stretcher
916
+ studio couch
917
+ stupa
918
+ submarine
919
+ suit
920
+ sundial
921
+ sunglass
922
+ sunglasses
923
+ sunscreen
924
+ suspension bridge
925
+ swab
926
+ sweatshirt
927
+ swimming trunks
928
+ swing
929
+ switch
930
+ syringe
931
+ table lamp
932
+ tank
933
+ tape player
934
+ teapot
935
+ teddy
936
+ television
937
+ tennis ball
938
+ thatch
939
+ theater curtain
940
+ thimble
941
+ thresher
942
+ throne
943
+ tile roof
944
+ toaster
945
+ tobacco shop
946
+ toilet seat
947
+ torch
948
+ totem pole
949
+ tow truck
950
+ toyshop
951
+ tractor
952
+ trailer truck
953
+ tray
954
+ trench coat
955
+ tricycle
956
+ trimaran
957
+ tripod
958
+ triumphal arch
959
+ trolleybus
960
+ trombone
961
+ tub
962
+ turnstile
963
+ typewriter keyboard
964
+ umbrella
965
+ unicycle
966
+ upright
967
+ vacuum
968
+ vase
969
+ vault
970
+ velvet
971
+ vending machine
972
+ vestment
973
+ viaduct
974
+ violin
975
+ volleyball
976
+ waffle iron
977
+ wall clock
978
+ wallet
979
+ wardrobe
980
+ warplane
981
+ washbasin
982
+ washer
983
+ water bottle
984
+ water jug
985
+ water tower
986
+ whiskey jug
987
+ whistle
988
+ wig
989
+ window screen
990
+ window shade
991
+ Windsor tie
992
+ wine bottle
993
+ wing
994
+ wok
995
+ wooden spoon
996
+ wool
997
+ worm fence
998
+ wreck
999
+ yawl
1000
+ yurt
1001
+ web site
1002
+ comic book
1003
+ crossword puzzle
1004
+ street sign
1005
+ traffic light
1006
+ book jacket
1007
+ menu
1008
+ plate
1009
+ guacamole
1010
+ consomme
1011
+ hot pot
1012
+ trifle
1013
+ ice cream
1014
+ ice lolly
1015
+ French loaf
1016
+ bagel
1017
+ pretzel
1018
+ cheeseburger
1019
+ hotdog
1020
+ mashed potato
1021
+ head cabbage
1022
+ broccoli
1023
+ cauliflower
1024
+ zucchini
1025
+ spaghetti squash
1026
+ acorn squash
1027
+ butternut squash
1028
+ cucumber
1029
+ artichoke
1030
+ bell pepper
1031
+ cardoon
1032
+ mushroom
1033
+ Granny Smith
1034
+ strawberry
1035
+ orange
1036
+ lemon
1037
+ fig
1038
+ pineapple
1039
+ banana
1040
+ jackfruit
1041
+ custard apple
1042
+ pomegranate
1043
+ hay
1044
+ carbonara
1045
+ chocolate sauce
1046
+ dough
1047
+ meat loaf
1048
+ pizza
1049
+ potpie
1050
+ burrito
1051
+ red wine
1052
+ espresso
1053
+ cup
1054
+ eggnog
1055
+ alp
1056
+ bubble
1057
+ cliff
1058
+ coral reef
1059
+ geyser
1060
+ lakeside
1061
+ promontory
1062
+ sandbar
1063
+ seashore
1064
+ valley
1065
+ volcano
1066
+ ballplayer
1067
+ groom
1068
+ scuba diver
1069
+ rapeseed
1070
+ daisy
1071
+ yellow ladys slipper
1072
+ corn
1073
+ acorn
1074
+ hip
1075
+ buckeye
1076
+ coral fungus
1077
+ agaric
1078
+ gyromitra
1079
+ stinkhorn
1080
+ earthstar
1081
+ hen-of-the-woods
1082
+ bolete
1083
+ ear
1084
+ toilet tissue'''
models/object_tracking_dasiamrpn/dasiamrpn.py CHANGED
@@ -8,7 +8,7 @@ import numpy as np
8
  import cv2 as cv
9
 
10
  class DaSiamRPN:
11
- def __init__(self, model_path, kernel_cls1_path, kernel_r1_path, backend_id=0, target_id=0):
12
  self._model_path = model_path
13
  self._kernel_cls1_path = kernel_cls1_path
14
  self._kernel_r1_path = kernel_r1_path
 
8
  import cv2 as cv
9
 
10
  class DaSiamRPN:
11
+ def __init__(self, kernel_cls1_path, kernel_r1_path, model_path, backend_id=0, target_id=0):
12
  self._model_path = model_path
13
  self._kernel_cls1_path = kernel_cls1_path
14
  self._kernel_r1_path = kernel_r1_path
models/object_tracking_dasiamrpn/demo.py CHANGED
@@ -52,9 +52,9 @@ def visualize(image, bbox, score, isLocated, fps=None, box_color=(0, 255, 0),tex
52
  if __name__ == '__main__':
53
  # Instantiate DaSiamRPN
54
  model = DaSiamRPN(
55
- model_path=args.model_path,
56
  kernel_cls1_path=args.kernel_cls1_path,
57
- kernel_r1_path=args.kernel_r1_path
 
58
  )
59
 
60
  # Read from args.input
@@ -92,4 +92,4 @@ if __name__ == '__main__':
92
  # Visualize
93
  frame = visualize(frame, bbox, score, isLocated, fps=tm.getFPS())
94
  cv.imshow('DaSiamRPN Demo', frame)
95
- tm.reset()
 
52
  if __name__ == '__main__':
53
  # Instantiate DaSiamRPN
54
  model = DaSiamRPN(
 
55
  kernel_cls1_path=args.kernel_cls1_path,
56
+ kernel_r1_path=args.kernel_r1_path,
57
+ model_path=args.model_path,
58
  )
59
 
60
  # Read from args.input
 
92
  # Visualize
93
  frame = visualize(frame, bbox, score, isLocated, fps=tm.getFPS())
94
  cv.imshow('DaSiamRPN Demo', frame)
95
+ tm.reset()
models/text_recognition_crnn/charset_36_EN.txt DELETED
@@ -1,36 +0,0 @@
1
- 0
2
- 1
3
- 2
4
- 3
5
- 4
6
- 5
7
- 6
8
- 7
9
- 8
10
- 9
11
- a
12
- b
13
- c
14
- d
15
- e
16
- f
17
- g
18
- h
19
- i
20
- j
21
- k
22
- l
23
- m
24
- n
25
- o
26
- p
27
- q
28
- r
29
- s
30
- t
31
- u
32
- v
33
- w
34
- x
35
- y
36
- z
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
models/text_recognition_crnn/charset_3944_CN.txt DELETED
@@ -1,3944 +0,0 @@
1
- H
2
- O
3
- K
4
- I
5
- T
6
- E
7
- A
8
-
9
-
10
-
11
-
12
- J
13
- N
14
- G
15
- Y
16
- C
17
- U
18
- Q
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
- 1
41
- 7
42
- 3
43
- 9
44
- 8
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
- 线
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
- 便
95
-
96
-
97
-
98
-
99
-
100
- 4
101
- 0
102
- -
103
- 6
104
- 5
105
- 2
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
- 西
124
-
125
-
126
-
127
- l
128
- i
129
- k
130
- n
131
- g
132
- c
133
- o
134
- f
135
- e
136
- w
137
-
138
-
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
-
149
-
150
- h
151
- t
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
- L
166
- :
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
-
180
-
181
-
182
- .
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
- B
202
-
203
-
204
-
205
-
206
-
207
- /
208
-
209
-
210
-
211
-
212
-
213
-
214
-
215
-
216
-
217
-
218
-
219
-
220
-
221
-
222
-
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
-
237
-
238
-
239
-
240
-
241
-
242
-
243
-
244
-
245
-
246
-
247
-
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
-
256
- 绿
257
-
258
-
259
-
260
-
261
-
262
-
263
-
264
-
265
- d
266
- D
267
-
268
-
269
-
270
-
271
-
272
-
273
-
274
-
275
-
276
-
277
- y
278
-
279
-
280
-
281
-
282
-
283
-
284
-
285
-
286
-
287
-
288
-
289
-
290
- F
291
-
292
-
293
-
294
-
295
-
296
-
297
-
298
-
299
-
300
-
301
-
302
-
303
-
304
-
305
-
306
-
307
-
308
-
309
-
310
-
311
-
312
-
313
-
314
-
315
-
316
-
317
-
318
- r
319
- P
320
- a
321
- u
322
-
323
-
324
-
325
- M
326
-
327
-
328
-
329
-
330
-
331
-
332
-
333
- R
334
- S
335
-
336
-
337
-
338
-
339
-
340
-
341
-
342
-
343
-
344
-
345
-
346
-
347
-
348
-
349
-
350
-
351
-
352
-
353
-
354
-
355
-
356
-
357
-
358
-
359
-
360
-
361
-
362
-
363
-
364
-
365
-
366
-
367
-
368
-
369
-
370
-
371
-
372
-
373
-
374
-
375
-
376
-
377
-
378
-
379
- ®
380
-
381
-
382
- 鱿
383
-
384
-
385
-
386
-
387
-
388
-
389
-
390
-
391
-
392
-
393
-
394
-
395
-
396
-
397
-
398
-
399
-
400
-
401
-
402
-
403
-
404
-
405
- *
406
-
407
-
408
-
409
-
410
-
411
-
412
-
413
-
414
-
415
-
416
-
417
-
418
-
419
-
420
-
421
-
422
- V
423
-
424
-
425
-
426
-
427
-
428
-
429
-
430
- X
431
-
432
- W
433
- j
434
-
435
-
436
- Z
437
-
438
-
439
-
440
-
441
-
442
-
443
-
444
-
445
-
446
-
447
-
448
-
449
-
450
- ·
451
-
452
-
453
-
454
-
455
-
456
-
457
-
458
-
459
-
460
-
461
-
462
-
463
-
464
-
465
-
466
-
467
-
468
-
469
-
470
-
471
-
472
-
473
-
474
-
475
-
476
-
477
-
478
-
479
-
480
-
481
-
482
-
483
-
484
-
485
-
486
-
487
-
488
-
489
-
490
-
491
-
492
-
493
-
494
-
495
-
496
- x
497
-
498
-
499
-
500
-
501
-
502
-
503
-
504
-
505
-
506
-
507
-
508
-
509
-
510
-
511
-
512
- v
513
- s
514
- m
515
-
516
-
517
-
518
-
519
- 广
520
-
521
-
522
-
523
-
524
-
525
-
526
- p
527
-
528
-
529
-
530
-
531
-
532
-
533
-
534
-
535
-
536
-
537
-
538
-
539
-
540
-
541
-
542
-
543
-
544
-
545
-
546
-
547
-
548
-
549
-
550
-
551
-
552
-
553
-
554
- &
555
-
556
-
557
-
558
-
559
-
560
-
561
-
562
-
563
-
564
-
565
-
566
-
567
-
568
-
569
-
570
-
571
-
572
-
573
-
574
-
575
-
576
-
577
-
578
-
579
-
580
-
581
-
582
-
583
-
584
-
585
-
586
-
587
-
588
-
589
-
590
-
591
-
592
-
593
-
594
-
595
-
596
-
597
-
598
-
599
-
600
-
601
-
602
-
603
-
604
-
605
-
606
-
607
-
608
-
609
-
610
-
611
-
612
-
613
-
614
-
615
-
616
-
617
-
618
-
619
-
620
-
621
-
622
-
623
-
624
- b
625
-
626
-
627
-
628
-
629
-
630
-
631
-
632
-
633
-
634
- '
635
-
636
-
637
-
638
-
639
-
640
-
641
-
642
-
643
-
644
-
645
-
646
-
647
-
648
-
649
-
650
-
651
-
652
-
653
-
654
-
655
-
656
-
657
-
658
-
659
-
660
-
661
- 寿
662
-
663
-
664
-
665
-
666
-
667
-
668
-
669
-
670
-
671
-
672
-
673
-
674
-
675
-
676
-
677
-
678
-
679
-
680
-
681
-
682
-
683
-
684
-
685
-
686
-
687
-
688
-
689
-
690
-
691
-
692
-
693
-
694
-
695
-
696
-
697
-
698
-
699
-
700
-
701
-
702
-
703
-
704
-
705
-
706
-
707
-
708
-
709
-
710
-
711
-
712
-
713
-
714
-
715
-
716
-
717
-
718
-
719
-
720
-
721
-
722
-
723
-
724
-
725
-
726
-
727
-
728
-
729
-
730
-
731
-
732
-
733
-
734
-
735
-
736
-
737
-
738
-
739
-
740
-
741
-
742
-
743
-
744
-
745
-
746
-
747
-
748
-
749
-
750
-
751
-
752
-
753
-
754
-
755
-
756
-
757
-
758
-
759
-
760
-
761
-
762
-
763
-
764
-
765
-
766
-
767
-
768
-
769
-
770
-
771
-
772
-
773
-
774
-
775
-
776
-
777
-
778
-
779
-
780
-
781
-
782
-
783
-
784
-
785
-
786
-
787
-
788
-
789
-
790
-
791
-
792
-
793
-
794
-
795
-
796
-
797
-
798
-
799
-
800
-
801
-
802
-
803
-
804
-
805
-
806
-
807
-
808
-
809
-
810
-
811
-
812
-
813
-
814
-
815
-
816
-
817
-
818
-
819
-
820
-
821
-
822
-
823
-
824
-
825
-
826
-
827
-
828
-
829
-
830
-
831
-
832
-
833
-
834
-
835
-
836
-
837
-
838
-
839
-
840
-
841
-
842
-
843
-
844
-
845
-
846
-
847
-
848
-
849
-
850
-
851
-
852
-
853
-
854
-
855
-
856
-
857
-
858
-
859
-
860
-
861
-
862
-
863
-
864
-
865
-
866
-
867
-
868
-
869
-
870
-
871
-
872
-
873
-
874
-
875
-
876
-
877
-
878
-
879
-
880
-
881
-
882
-
883
-
884
-
885
-
886
-
887
-
888
-
889
-
890
-
891
-
892
-
893
-
894
-
895
-
896
-
897
-
898
-
899
-
900
-
901
-
902
-
903
-
904
-
905
-
906
-
907
-
908
-
909
-
910
-
911
-
912
-
913
-
914
-
915
-
916
-
917
-
918
-
919
-
920
-
921
-
922
-
923
-
924
-
925
-
926
-
927
-
928
- |
929
-
930
-
931
- 仿
932
-
933
-
934
-
935
-
936
-
937
-
938
-
939
-
940
-
941
-
942
-
943
-
944
-
945
-
946
-
947
-
948
-
949
-
950
-
951
-
952
-
953
-
954
-
955
-
956
-
957
-
958
-
959
-
960
-
961
-
962
-
963
-
964
-
965
-
966
-
967
-
968
-
969
-
970
-
971
-
972
-
973
-
974
-
975
-
976
-
977
-
978
-
979
-
980
-
981
-
982
-
983
-
984
-
985
-
986
-
987
-
988
-
989
-
990
-
991
-
992
-
993
-
994
-
995
-
996
-
997
-
998
-
999
-
1000
-
1001
-
1002
-
1003
-
1004
-
1005
- é
1006
- [
1007
-
1008
- ]
1009
-
1010
-
1011
-
1012
-
1013
-
1014
-
1015
-
1016
- z
1017
-
1018
-
1019
-
1020
-
1021
-
1022
- 怀
1023
-
1024
-
1025
-
1026
-
1027
-
1028
-
1029
- ǐ
1030
- à
1031
-
1032
-
1033
-
1034
-
1035
-
1036
-
1037
-
1038
-
1039
-
1040
-
1041
-
1042
-
1043
-
1044
-
1045
-
1046
-
1047
-
1048
-
1049
-
1050
- ��
1051
-
1052
-
1053
-
1054
-
1055
-
1056
-
1057
-
1058
-
1059
-
1060
-
1061
-
1062
-
1063
-
1064
-
1065
-
1066
- ¥
1067
-
1068
-
1069
-
1070
-
1071
-
1072
-
1073
-
1074
-
1075
-
1076
-
1077
-
1078
- ©
1079
-
1080
-
1081
-
1082
-
1083
-
1084
-
1085
-
1086
-
1087
-
1088
-
1089
-
1090
-
1091
-
1092
-
1093
-
1094
-
1095
-
1096
-
1097
-
1098
-
1099
-
1100
-
1101
-
1102
-
1103
- ä
1104
-
1105
-
1106
-
1107
-
1108
-
1109
-
1110
-
1111
-
1112
-
1113
-
1114
-
1115
-
1116
-
1117
-
1118
-
1119
-
1120
-
1121
-
1122
-
1123
-
1124
-
1125
-
1126
-
1127
-
1128
-
1129
-
1130
-
1131
-
1132
-
1133
-
1134
-
1135
-
1136
-
1137
-
1138
-
1139
-
1140
-
1141
-
1142
-
1143
-
1144
-
1145
-
1146
-
1147
-
1148
-
1149
-
1150
-
1151
-
1152
-
1153
-
1154
-
1155
-
1156
-
1157
-
1158
-
1159
-
1160
-
1161
-
1162
-
1163
-
1164
-
1165
-
1166
-
1167
-
1168
-
1169
-
1170
- °
1171
-
1172
-
1173
-
1174
-
1175
-
1176
-
1177
-
1178
-
1179
-
1180
-
1181
- _
1182
-
1183
-
1184
-
1185
-
1186
-
1187
-
1188
-
1189
-
1190
-
1191
-
1192
-
1193
-
1194
-
1195
-
1196
-
1197
-
1198
-
1199
-
1200
-
1201
-
1202
-
1203
-
1204
-
1205
-
1206
-
1207
-
1208
-
1209
-
1210
-
1211
-
1212
-
1213
-
1214
-
1215
-
1216
-
1217
-
1218
-
1219
-
1220
-
1221
-
1222
-
1223
-
1224
-
1225
-
1226
-
1227
-
1228
-
1229
-
1230
-
1231
-
1232
-
1233
-
1234
-
1235
-
1236
-
1237
-
1238
-
1239
-
1240
-
1241
-
1242
-
1243
-
1244
-
1245
-
1246
-
1247
-
1248
-
1249
-
1250
-
1251
-
1252
-
1253
-
1254
-
1255
-
1256
-
1257
-
1258
-
1259
-
1260
-
1261
-
1262
-
1263
-
1264
-
1265
-
1266
-
1267
- 饿
1268
-
1269
-
1270
-
1271
-
1272
-
1273
-
1274
-
1275
-
1276
-
1277
-
1278
-
1279
-
1280
-
1281
-
1282
-
1283
-
1284
-
1285
- !
1286
-
1287
-
1288
-
1289
-
1290
- 鹿
1291
-
1292
-
1293
-
1294
-
1295
-
1296
-
1297
-
1298
-
1299
-
1300
-
1301
-
1302
-
1303
-
1304
-
1305
-
1306
-
1307
-
1308
-
1309
-
1310
-
1311
-
1312
-
1313
-
1314
-
1315
-
1316
-
1317
-
1318
-
1319
-
1320
-
1321
-
1322
- 屿
1323
-
1324
-
1325
-
1326
-
1327
-
1328
-
1329
-
1330
-
1331
-
1332
-
1333
-
1334
-
1335
-
1336
-
1337
-
1338
-
1339
-
1340
-
1341
-
1342
-
1343
-
1344
-
1345
-
1346
-
1347
-
1348
-
1349
-
1350
-
1351
-
1352
-
1353
-
1354
-
1355
-
1356
-
1357
-
1358
-
1359
-
1360
-
1361
-
1362
-
1363
-
1364
-
1365
-
1366
-
1367
-
1368
-
1369
-
1370
- 粿
1371
-
1372
-
1373
-
1374
-
1375
-
1376
-
1377
-
1378
-
1379
-
1380
-
1381
-
1382
-
1383
-
1384
-
1385
-
1386
-
1387
- q
1388
-
1389
-
1390
-
1391
- 滿
1392
-
1393
-
1394
-
1395
-
1396
-
1397
-
1398
- (
1399
-
1400
-
1401
-
1402
-
1403
-
1404
-
1405
-
1406
-
1407
-
1408
-
1409
-
1410
-
1411
-
1412
-
1413
-
1414
-
1415
-
1416
-
1417
-
1418
-
1419
-
1420
-
1421
-
1422
-
1423
-
1424
-
1425
-
1426
-
1427
-
1428
-
1429
-
1430
-
1431
-
1432
-
1433
-
1434
-
1435
-
1436
-
1437
-
1438
-
1439
-
1440
-
1441
-
1442
- 耀
1443
-
1444
-
1445
-
1446
-
1447
-
1448
-
1449
-
1450
-
1451
-
1452
-
1453
-
1454
-
1455
-
1456
- 漿
1457
-
1458
-
1459
-
1460
-
1461
-
1462
-
1463
-
1464
-
1465
-
1466
-
1467
-
1468
-
1469
-
1470
-
1471
-
1472
-
1473
-
1474
-
1475
-
1476
-
1477
-
1478
-
1479
-
1480
-
1481
-
1482
-
1483
-
1484
-
1485
-
1486
-
1487
-
1488
-
1489
-
1490
-
1491
- ,
1492
-
1493
-
1494
-
1495
-
1496
-
1497
-
1498
-
1499
-
1500
-
1501
-
1502
-
1503
-
1504
-
1505
-
1506
-
1507
-
1508
-
1509
-
1510
-
1511
-
1512
-
1513
-
1514
-
1515
-
1516
-
1517
-
1518
-
1519
-
1520
-
1521
-
1522
-
1523
-
1524
-
1525
-
1526
-
1527
-
1528
-
1529
-
1530
-
1531
-
1532
-
1533
- 槿
1534
-
1535
-
1536
-
1537
-
1538
-
1539
-
1540
-
1541
-
1542
-
1543
-
1544
-
1545
-
1546
-
1547
-
1548
-
1549
-
1550
-
1551
-
1552
-
1553
-
1554
-
1555
-
1556
-
1557
-
1558
-
1559
-
1560
-
1561
-
1562
-
1563
-
1564
-
1565
-
1566
-
1567
-
1568
-
1569
-
1570
-
1571
-
1572
-
1573
-
1574
-
1575
-
1576
-
1577
-
1578
-
1579
-
1580
-
1581
-
1582
-
1583
-
1584
-
1585
-
1586
-
1587
-
1588
-
1589
-
1590
-
1591
-
1592
-
1593
-
1594
-
1595
-
1596
-
1597
-
1598
-
1599
-
1600
-
1601
-
1602
-
1603
-
1604
-
1605
-
1606
-
1607
-
1608
-
1609
-
1610
-
1611
-
1612
-
1613
-
1614
-
1615
-
1616
-
1617
-
1618
-
1619
- %
1620
-
1621
-
1622
-
1623
-
1624
-
1625
-
1626
-
1627
-
1628
-
1629
-
1630
-
1631
-
1632
-
1633
-
1634
-
1635
-
1636
-
1637
-
1638
-
1639
-
1640
-
1641
-
1642
-
1643
-
1644
-
1645
-
1646
-
1647
-
1648
-
1649
-
1650
-
1651
-
1652
-
1653
-
1654
-
1655
-
1656
-
1657
-
1658
-
1659
-
1660
-
1661
-
1662
-
1663
-
1664
-
1665
-
1666
-
1667
-
1668
-
1669
-
1670
-
1671
-
1672
-
1673
-
1674
-
1675
-
1676
-
1677
-
1678
- <
1679
- >
1680
-
1681
-
1682
-
1683
-
1684
-
1685
- 宿
1686
-
1687
-
1688
-
1689
-
1690
-
1691
-
1692
-
1693
-
1694
-
1695
-
1696
-
1697
-
1698
-
1699
-
1700
-
1701
- +
1702
-
1703
-
1704
-
1705
-
1706
-
1707
-
1708
-
1709
-
1710
-
1711
-
1712
-
1713
-
1714
-
1715
-
1716
- #
1717
-
1718
-
1719
-
1720
-
1721
-
1722
-
1723
-
1724
-
1725
-
1726
-
1727
-
1728
-
1729
-
1730
-
1731
-
1732
-
1733
-
1734
-
1735
-
1736
- ~
1737
-
1738
-
1739
-
1740
-
1741
-
1742
-
1743
-
1744
-
1745
-
1746
-
1747
-
1748
-
1749
-
1750
-
1751
-
1752
-
1753
-
1754
-
1755
-
1756
-
1757
-
1758
-
1759
-
1760
-
1761
-
1762
-
1763
-
1764
-
1765
-
1766
-
1767
-
1768
-
1769
-
1770
-
1771
-
1772
-
1773
-
1774
-
1775
-
1776
-
1777
-
1778
-
1779
-
1780
-
1781
-
1782
-
1783
-
1784
-
1785
-
1786
-
1787
-
1788
-
1789
-
1790
-
1791
-
1792
-
1793
-
1794
-
1795
-
1796
-
1797
-
1798
-
1799
-
1800
-
1801
-
1802
-
1803
-
1804
-
1805
-
1806
-
1807
- =
1808
-
1809
-
1810
-
1811
-
1812
-
1813
-
1814
-
1815
-
1816
-
1817
-
1818
-
1819
-
1820
-
1821
-
1822
-
1823
-
1824
-
1825
-
1826
-
1827
-
1828
-
1829
-
1830
-
1831
-
1832
-
1833
-
1834
-
1835
-
1836
-
1837
-
1838
-
1839
-
1840
-
1841
-
1842
-
1843
-
1844
- )
1845
-
1846
-
1847
-
1848
-
1849
-
1850
-
1851
-
1852
-
1853
-
1854
-
1855
-
1856
-
1857
-
1858
-
1859
-
1860
-
1861
-
1862
-
1863
-
1864
-
1865
-
1866
-
1867
-
1868
-
1869
-
1870
-
1871
-
1872
-
1873
-
1874
-
1875
-
1876
-
1877
-
1878
-
1879
-
1880
-
1881
-
1882
-
1883
-
1884
-
1885
-
1886
-
1887
-
1888
-
1889
-
1890
-
1891
-
1892
-
1893
-
1894
-
1895
-
1896
-
1897
-
1898
-
1899
-
1900
-
1901
-
1902
-
1903
-
1904
-
1905
-
1906
-
1907
-
1908
-
1909
-
1910
-
1911
-
1912
-
1913
-
1914
-
1915
-
1916
-
1917
-
1918
-
1919
-
1920
-
1921
-
1922
-
1923
-
1924
-
1925
-
1926
-
1927
-
1928
-
1929
-
1930
-
1931
-
1932
-
1933
-
1934
-
1935
-
1936
-
1937
-
1938
-
1939
-
1940
-
1941
-
1942
-
1943
-
1944
-
1945
-
1946
- \
1947
-
1948
-
1949
-
1950
-
1951
-
1952
-
1953
-
1954
-
1955
-
1956
-
1957
-
1958
-
1959
-
1960
-
1961
-
1962
-
1963
-
1964
-
1965
-
1966
-
1967
-
1968
-
1969
-
1970
-
1971
-
1972
-
1973
-
1974
-
1975
-
1976
-
1977
-
1978
-
1979
-
1980
-
1981
-
1982
-
1983
-
1984
-
1985
-
1986
-
1987
-
1988
-
1989
-
1990
-
1991
-
1992
-
1993
-
1994
-
1995
-
1996
-
1997
-
1998
-
1999
-
2000
-
2001
-
2002
-
2003
-
2004
-
2005
-
2006
-
2007
-
2008
-
2009
-
2010
-
2011
-
2012
-
2013
-
2014
-
2015
-
2016
-
2017
-
2018
-
2019
-
2020
-
2021
-
2022
-
2023
-
2024
-
2025
- ×
2026
-
2027
-
2028
-
2029
-
2030
-
2031
-
2032
-
2033
-
2034
-
2035
-
2036
-
2037
-
2038
- ā
2039
-
2040
-
2041
-
2042
-
2043
-
2044
-
2045
-
2046
-
2047
-
2048
-
2049
-
2050
-
2051
-
2052
-
2053
-
2054
-
2055
-
2056
-
2057
-
2058
-
2059
-
2060
-
2061
-
2062
-
2063
-
2064
-
2065
-
2066
-
2067
-
2068
-
2069
-
2070
-
2071
-
2072
-
2073
-
2074
-
2075
-
2076
-
2077
-
2078
-
2079
-
2080
-
2081
- ���
2082
-
2083
-
2084
-
2085
-
2086
-
2087
-
2088
-
2089
-
2090
-
2091
-
2092
-
2093
-
2094
-
2095
-
2096
-
2097
-
2098
-
2099
-
2100
-
2101
-
2102
-
2103
-
2104
-
2105
-
2106
-
2107
-
2108
-
2109
-
2110
-
2111
-
2112
-
2113
-
2114
-
2115
-
2116
-
2117
-
2118
-
2119
-
2120
-
2121
-
2122
-
2123
-
2124
-
2125
-
2126
-
2127
-
2128
-
2129
-
2130
-
2131
-
2132
-
2133
-
2134
-
2135
-
2136
-
2137
-
2138
-
2139
-
2140
-
2141
-
2142
- ¦
2143
-
2144
-
2145
-
2146
-
2147
-
2148
-
2149
-
2150
-
2151
-
2152
-
2153
-
2154
-
2155
-
2156
-
2157
- @
2158
-
2159
-
2160
-
2161
-
2162
-
2163
-
2164
-
2165
-
2166
-
2167
-
2168
-
2169
-
2170
-
2171
-
2172
-
2173
-
2174
- 椿
2175
-
2176
-
2177
-
2178
- 亿
2179
-
2180
-
2181
-
2182
-
2183
-
2184
-
2185
-
2186
-
2187
-
2188
-
2189
-
2190
-
2191
-
2192
-
2193
-
2194
-
2195
- 鸿
2196
-
2197
-
2198
-
2199
-
2200
-
2201
-
2202
-
2203
-
2204
-
2205
-
2206
-
2207
-
2208
-
2209
-
2210
-
2211
-
2212
-
2213
-
2214
-
2215
-
2216
-
2217
-
2218
-
2219
-
2220
- Λ
2221
-
2222
-
2223
-
2224
-
2225
-
2226
-
2227
-
2228
-
2229
-
2230
-
2231
-
2232
-
2233
-
2234
-
2235
-
2236
-
2237
-
2238
-
2239
-
2240
-
2241
-
2242
-
2243
-
2244
-
2245
-
2246
-
2247
-
2248
-
2249
-
2250
-
2251
-
2252
-
2253
-
2254
-
2255
-
2256
-
2257
-
2258
-
2259
-
2260
-
2261
-
2262
-
2263
-
2264
-
2265
-
2266
-
2267
-
2268
-
2269
-
2270
-
2271
-
2272
-
2273
-
2274
-
2275
-
2276
-
2277
-
2278
-
2279
-
2280
-
2281
-
2282
-
2283
-
2284
-
2285
-
2286
-
2287
-
2288
-
2289
-
2290
-
2291
-
2292
-
2293
- 访
2294
-
2295
-
2296
-
2297
-
2298
-
2299
-
2300
-
2301
-
2302
-
2303
-
2304
-
2305
-
2306
-
2307
-
2308
-
2309
-
2310
-
2311
-
2312
-
2313
-
2314
-
2315
-
2316
-
2317
-
2318
-
2319
-
2320
-
2321
-
2322
-
2323
-
2324
-
2325
-
2326
-
2327
-
2328
-
2329
-
2330
-
2331
-
2332
-
2333
-
2334
-
2335
-
2336
-
2337
-
2338
-
2339
-
2340
-
2341
-
2342
-
2343
-
2344
-
2345
-
2346
-
2347
-
2348
-
2349
-
2350
-
2351
-
2352
-
2353
-
2354
-
2355
-
2356
-
2357
-
2358
-
2359
-
2360
-
2361
-
2362
-
2363
-
2364
-
2365
-
2366
-
2367
-
2368
-
2369
-
2370
-
2371
-
2372
-
2373
-
2374
-
2375
- 綿
2376
-
2377
-
2378
-
2379
-
2380
-
2381
-
2382
-
2383
-
2384
-
2385
-
2386
-
2387
-
2388
-
2389
-
2390
-
2391
-
2392
-
2393
-
2394
-
2395
-
2396
-
2397
-
2398
-
2399
-
2400
-
2401
-
2402
-
2403
-
2404
-
2405
-
2406
-
2407
-
2408
-
2409
-
2410
-
2411
-
2412
-
2413
-
2414
-
2415
- Á
2416
- ō
2417
-
2418
-
2419
-
2420
-
2421
-
2422
-
2423
-
2424
-
2425
-
2426
-
2427
-
2428
-
2429
-
2430
-
2431
-
2432
-
2433
-
2434
-
2435
-
2436
-
2437
-
2438
-
2439
-
2440
-
2441
-
2442
-
2443
-
2444
-
2445
-
2446
-
2447
-
2448
-
2449
-
2450
-
2451
-
2452
-
2453
-
2454
-
2455
-
2456
-
2457
-
2458
-
2459
-
2460
-
2461
-
2462
-
2463
-
2464
-
2465
-
2466
-
2467
-
2468
-
2469
-
2470
-
2471
-
2472
-
2473
-
2474
-
2475
-
2476
-
2477
-
2478
-
2479
-
2480
-
2481
-
2482
-
2483
-
2484
-
2485
-
2486
-
2487
-
2488
-
2489
-
2490
-
2491
-
2492
-
2493
- 驿
2494
-
2495
-
2496
-
2497
-
2498
-
2499
- ­
2500
-
2501
-
2502
-
2503
-
2504
-
2505
-
2506
-
2507
-
2508
-
2509
- ǒ
2510
-
2511
-
2512
-
2513
-
2514
-
2515
-
2516
-
2517
-
2518
-
2519
-
2520
-
2521
-
2522
-
2523
-
2524
-
2525
-
2526
-
2527
-
2528
-
2529
-
2530
-
2531
-
2532
-
2533
-
2534
-
2535
-
2536
-
2537
-
2538
-
2539
-
2540
-
2541
-
2542
-
2543
-
2544
- 穿
2545
-
2546
-
2547
-
2548
-
2549
-
2550
-
2551
-
2552
-
2553
-
2554
-
2555
-
2556
-
2557
-
2558
-
2559
-
2560
-
2561
-
2562
-
2563
-
2564
-
2565
-
2566
-
2567
-
2568
-
2569
-
2570
-
2571
-
2572
-
2573
-
2574
-
2575
-
2576
-
2577
-
2578
- 使
2579
-
2580
-
2581
-
2582
-
2583
-
2584
-
2585
-
2586
-
2587
-
2588
-
2589
-
2590
-
2591
-
2592
-
2593
-
2594
-
2595
-
2596
-
2597
-
2598
-
2599
-
2600
- 殿
2601
-
2602
-
2603
-
2604
-
2605
-
2606
-
2607
-
2608
-
2609
-
2610
-
2611
-
2612
-
2613
-
2614
-
2615
-
2616
-
2617
-
2618
-
2619
-
2620
-
2621
-
2622
-
2623
-
2624
-
2625
-
2626
-
2627
-
2628
-
2629
-
2630
-
2631
-
2632
-
2633
-
2634
-
2635
-
2636
-
2637
-
2638
-
2639
-
2640
-
2641
-
2642
-
2643
-
2644
-
2645
-
2646
-
2647
-
2648
-
2649
-
2650
-
2651
-
2652
-
2653
-
2654
-
2655
-
2656
-
2657
-
2658
-
2659
-
2660
-
2661
-
2662
-
2663
-
2664
-
2665
-
2666
-
2667
-
2668
-
2669
-
2670
-
2671
-
2672
-
2673
-
2674
-
2675
-
2676
-
2677
-
2678
-
2679
-
2680
-
2681
-
2682
-
2683
-
2684
-
2685
-
2686
-
2687
- 尿
2688
-
2689
-
2690
-
2691
-
2692
-
2693
-
2694
-
2695
-
2696
-
2697
-
2698
-
2699
-
2700
-
2701
-
2702
-
2703
-
2704
-
2705
-
2706
-
2707
-
2708
-
2709
-
2710
-
2711
-
2712
-
2713
-
2714
-
2715
-
2716
-
2717
-
2718
-
2719
-
2720
-
2721
-
2722
-
2723
-
2724
-
2725
-
2726
-
2727
-
2728
-
2729
-
2730
-
2731
-
2732
-
2733
-
2734
-
2735
-
2736
-
2737
-
2738
-
2739
-
2740
-
2741
-
2742
-
2743
-
2744
-
2745
-
2746
-
2747
-
2748
-
2749
-
2750
-
2751
-
2752
-
2753
-
2754
-
2755
-
2756
-
2757
-
2758
-
2759
-
2760
-
2761
-
2762
-
2763
-
2764
-
2765
-
2766
-
2767
-
2768
-
2769
-
2770
-
2771
-
2772
-
2773
-
2774
-
2775
-
2776
-
2777
-
2778
-
2779
-
2780
-
2781
-
2782
-
2783
-
2784
-
2785
-
2786
-
2787
- 廿
2788
-
2789
-
2790
-
2791
-
2792
-
2793
-
2794
-
2795
-
2796
-
2797
-
2798
-
2799
-
2800
-
2801
-
2802
-
2803
-
2804
-
2805
-
2806
-
2807
-
2808
-
2809
-
2810
-
2811
-
2812
-
2813
-
2814
-
2815
-
2816
-
2817
-
2818
-
2819
- Ξ
2820
-
2821
-
2822
-
2823
-
2824
-
2825
-
2826
-
2827
-
2828
-
2829
-
2830
-
2831
-
2832
-
2833
- φ
2834
-
2835
-
2836
-
2837
-
2838
-
2839
-
2840
-
2841
-
2842
-
2843
-
2844
-
2845
-
2846
-
2847
-
2848
-
2849
-
2850
-
2851
-
2852
-
2853
-
2854
-
2855
-
2856
-
2857
-
2858
-
2859
-
2860
-
2861
-
2862
-
2863
-
2864
-
2865
-
2866
-
2867
-
2868
-
2869
-
2870
-
2871
-
2872
-
2873
-
2874
-
2875
-
2876
-
2877
-
2878
-
2879
-
2880
-
2881
-
2882
-
2883
-
2884
-
2885
-
2886
-
2887
-
2888
-
2889
-
2890
-
2891
-
2892
-
2893
-
2894
-
2895
-
2896
-
2897
-
2898
-
2899
-
2900
-
2901
-
2902
-
2903
-
2904
-
2905
-
2906
-
2907
-
2908
-
2909
-
2910
-
2911
-
2912
-
2913
-
2914
-
2915
-
2916
-
2917
-
2918
-
2919
-
2920
-
2921
-
2922
-
2923
-
2924
-
2925
-
2926
-
2927
-
2928
-
2929
-
2930
-
2931
-
2932
-
2933
-
2934
-
2935
-
2936
-
2937
-
2938
-
2939
-
2940
-
2941
-
2942
-
2943
-
2944
-
2945
-
2946
-
2947
-
2948
-
2949
-
2950
-
2951
-
2952
-
2953
-
2954
-
2955
-
2956
-
2957
- á
2958
- ǎ
2959
-
2960
-
2961
-
2962
-
2963
-
2964
-
2965
-
2966
-
2967
-
2968
-
2969
-
2970
-
2971
-
2972
-
2973
-
2974
-
2975
-
2976
-
2977
-
2978
-
2979
-
2980
-
2981
-
2982
-
2983
-
2984
-
2985
-
2986
-
2987
-
2988
-
2989
-
2990
-
2991
-
2992
-
2993
-
2994
-
2995
-
2996
-
2997
-
2998
-
2999
-
3000
-
3001
-
3002
-
3003
-
3004
-
3005
-
3006
-
3007
-
3008
-
3009
-
3010
-
3011
-
3012
-
3013
-
3014
-
3015
-
3016
-
3017
-
3018
-
3019
-
3020
-
3021
-
3022
-
3023
-
3024
-
3025
-
3026
-
3027
-
3028
-
3029
-
3030
-
3031
-
3032
-
3033
-
3034
-
3035
-
3036
-
3037
-
3038
-
3039
- а
3040
-
3041
-
3042
-
3043
-
3044
-
3045
- 伿
3046
-
3047
-
3048
-
3049
-
3050
-
3051
-
3052
-
3053
-
3054
-
3055
-
3056
-
3057
-
3058
-
3059
-
3060
-
3061
-
3062
-
3063
-
3064
-
3065
-
3066
-
3067
-
3068
-
3069
-
3070
-
3071
-
3072
-
3073
-
3074
-
3075
-
3076
-
3077
-
3078
-
3079
-
3080
-
3081
-
3082
-
3083
-
3084
-
3085
-
3086
-
3087
-
3088
-
3089
-
3090
-
3091
-
3092
-
3093
-
3094
-
3095
-
3096
-
3097
-
3098
-
3099
-
3100
-
3101
-
3102
-
3103
-
3104
-
3105
-
3106
-
3107
-
3108
-
3109
-
3110
-
3111
-
3112
-
3113
-
3114
-
3115
-
3116
-
3117
-
3118
-
3119
-
3120
-
3121
-
3122
-
3123
-
3124
-
3125
-
3126
-
3127
-
3128
-
3129
-
3130
-
3131
-
3132
-
3133
-
3134
-
3135
-
3136
-
3137
-
3138
-
3139
-
3140
-
3141
-
3142
-
3143
-
3144
-
3145
-
3146
-
3147
-
3148
-
3149
-
3150
- 湿
3151
-
3152
-
3153
-
3154
-
3155
-
3156
-
3157
-
3158
- 祿
3159
-
3160
-
3161
-
3162
-
3163
-
3164
-
3165
-
3166
-
3167
-
3168
-
3169
-
3170
-
3171
-
3172
- 稿
3173
-
3174
-
3175
-
3176
-
3177
-
3178
-
3179
-
3180
-
3181
-
3182
-
3183
-
3184
-
3185
-
3186
-
3187
- û
3188
-
3189
-
3190
-
3191
-
3192
-
3193
-
3194
-
3195
-
3196
-
3197
-
3198
-
3199
-
3200
-
3201
-
3202
-
3203
-
3204
-
3205
-
3206
-
3207
-
3208
-
3209
-
3210
-
3211
-
3212
-
3213
-
3214
-
3215
-
3216
-
3217
-
3218
-
3219
-
3220
-
3221
-
3222
-
3223
-
3224
-
3225
-
3226
-
3227
-
3228
-
3229
-
3230
-
3231
-
3232
-
3233
-
3234
-
3235
-
3236
-
3237
-
3238
-
3239
-
3240
-
3241
-
3242
-
3243
- í
3244
- ó
3245
-
3246
-
3247
- Θ
3248
-
3249
-
3250
-
3251
-
3252
-
3253
-
3254
-
3255
-
3256
-
3257
-
3258
-
3259
-
3260
-
3261
-
3262
-
3263
-
3264
-
3265
-
3266
-
3267
-
3268
-
3269
-
3270
-
3271
-
3272
-
3273
-
3274
-
3275
-
3276
-
3277
-
3278
-
3279
-
3280
-
3281
-
3282
-
3283
-
3284
-
3285
-
3286
-
3287
-
3288
-
3289
-
3290
-
3291
-
3292
-
3293
-
3294
-
3295
-
3296
-
3297
-
3298
-
3299
-
3300
-
3301
-
3302
-
3303
-
3304
-
3305
-
3306
-
3307
-
3308
-
3309
-
3310
-
3311
-
3312
- {
3313
-
3314
-
3315
-
3316
-
3317
-
3318
-
3319
-
3320
-
3321
-
3322
-
3323
-
3324
-
3325
-
3326
-
3327
-
3328
-
3329
-
3330
-
3331
-
3332
-
3333
-
3334
-
3335
-
3336
-
3337
-
3338
-
3339
-
3340
-
3341
-
3342
- π
3343
-
3344
-
3345
-
3346
-
3347
-
3348
-
3349
-
3350
-
3351
-
3352
-
3353
-
3354
-
3355
-
3356
-
3357
-
3358
-
3359
-
3360
-
3361
- `
3362
- 姿
3363
-
3364
-
3365
-
3366
- ī
3367
-
3368
-
3369
-
3370
-
3371
-
3372
-
3373
-
3374
-
3375
-
3376
-
3377
-
3378
-
3379
-
3380
-
3381
-
3382
-
3383
-
3384
-
3385
-
3386
-
3387
-
3388
-
3389
-
3390
- ò
3391
-
3392
-
3393
-
3394
-
3395
-
3396
-
3397
-
3398
-
3399
-
3400
-
3401
-
3402
-
3403
-
3404
-
3405
-
3406
-
3407
-
3408
-
3409
-
3410
-
3411
-
3412
-
3413
-
3414
-
3415
-
3416
-
3417
- "
3418
-
3419
-
3420
-
3421
-
3422
-
3423
-
3424
-
3425
-
3426
-
3427
-
3428
-
3429
-
3430
-
3431
-
3432
-
3433
-
3434
-
3435
-
3436
-
3437
-
3438
-
3439
-
3440
-
3441
-
3442
-
3443
-
3444
-
3445
-
3446
-
3447
-
3448
-
3449
-
3450
-
3451
-
3452
-
3453
-
3454
-
3455
-
3456
-
3457
-
3458
-
3459
-
3460
-
3461
-
3462
-
3463
-
3464
-
3465
-
3466
-
3467
-
3468
-
3469
-
3470
-
3471
-
3472
-
3473
-
3474
-
3475
-
3476
-
3477
-
3478
-
3479
-
3480
-
3481
-
3482
-
3483
-
3484
-
3485
-
3486
-
3487
-
3488
-
3489
-
3490
-
3491
-
3492
-
3493
-
3494
-
3495
-
3496
-
3497
-
3498
-
3499
-
3500
-
3501
-
3502
-
3503
-
3504
-
3505
-
3506
-
3507
-
3508
-
3509
-
3510
-
3511
-
3512
- ē
3513
-
3514
-
3515
-
3516
-
3517
-
3518
-
3519
-
3520
-
3521
-
3522
-
3523
-
3524
-
3525
- 退
3526
-
3527
-
3528
-
3529
-
3530
-
3531
-
3532
-
3533
-
3534
-
3535
-
3536
-
3537
-
3538
-
3539
-
3540
-
3541
-
3542
-
3543
-
3544
-
3545
-
3546
-
3547
-
3548
-
3549
-
3550
-
3551
-
3552
-
3553
-
3554
-
3555
-
3556
-
3557
-
3558
- ε
3559
-
3560
-
3561
-
3562
-
3563
-
3564
- ě
3565
-
3566
-
3567
-
3568
-
3569
-
3570
-
3571
-
3572
-
3573
-
3574
-
3575
-
3576
-
3577
-
3578
-
3579
-
3580
-
3581
-
3582
-
3583
-
3584
-
3585
-
3586
-
3587
-
3588
-
3589
-
3590
-
3591
-
3592
-
3593
-
3594
-
3595
-
3596
-
3597
-
3598
-
3599
-
3600
-
3601
-
3602
-
3603
-
3604
-
3605
-
3606
-
3607
-
3608
-
3609
-
3610
-
3611
-
3612
-
3613
-
3614
-
3615
-
3616
- }
3617
-
3618
-
3619
-
3620
-
3621
-
3622
-
3623
-
3624
-
3625
-
3626
-
3627
-
3628
-
3629
-
3630
-
3631
-
3632
-
3633
-
3634
-
3635
-
3636
-
3637
-
3638
-
3639
-
3640
-
3641
-
3642
-
3643
-
3644
-
3645
-
3646
-
3647
-
3648
-
3649
-
3650
-
3651
-
3652
-
3653
-
3654
-
3655
- ǔ
3656
-
3657
-
3658
-
3659
-
3660
-
3661
-
3662
-
3663
- è
3664
-
3665
-
3666
-
3667
-
3668
-
3669
-
3670
-
3671
-
3672
-
3673
-
3674
-
3675
-
3676
-
3677
-
3678
-
3679
-
3680
-
3681
-
3682
-
3683
-
3684
-
3685
-
3686
-
3687
-
3688
- ´
3689
-
3690
-
3691
-
3692
-
3693
-
3694
-
3695
-
3696
-
3697
-
3698
-
3699
-
3700
-
3701
-
3702
-
3703
-
3704
-
3705
-
3706
-
3707
-
3708
-
3709
-
3710
-
3711
-
3712
-
3713
-
3714
-
3715
- Ē
3716
-
3717
-
3718
-
3719
-
3720
-
3721
-
3722
-
3723
-
3724
-
3725
-
3726
-
3727
-
3728
-
3729
-
3730
-
3731
-
3732
-
3733
-
3734
-
3735
-
3736
-
3737
-
3738
-
3739
- ?
3740
-
3741
-
3742
-
3743
-
3744
-
3745
-
3746
-
3747
-
3748
-
3749
-
3750
-
3751
-
3752
- ʌ
3753
-
3754
-
3755
-
3756
-
3757
- É
3758
-
3759
-
3760
-
3761
-
3762
-
3763
-
3764
-
3765
-
3766
-
3767
-
3768
-
3769
-
3770
-
3771
-
3772
-
3773
-
3774
- 齿
3775
-
3776
-
3777
-
3778
-
3779
-
3780
-
3781
-
3782
-
3783
-
3784
-
3785
-
3786
-
3787
-
3788
-
3789
-
3790
-
3791
-
3792
-
3793
-
3794
-
3795
-
3796
-
3797
-
3798
-
3799
-
3800
-
3801
-
3802
-
3803
-
3804
-
3805
-
3806
-
3807
-
3808
-
3809
-
3810
-
3811
-
3812
-
3813
-
3814
-
3815
-
3816
-
3817
-
3818
-
3819
-
3820
-
3821
-
3822
-
3823
-
3824
-
3825
-
3826
-
3827
-
3828
-
3829
-
3830
-
3831
-
3832
-
3833
-
3834
-
3835
-
3836
-
3837
-
3838
-
3839
-
3840
- 鴿
3841
-
3842
-
3843
-
3844
-
3845
-
3846
-
3847
-
3848
-
3849
-
3850
-
3851
-
3852
-
3853
-
3854
-
3855
-
3856
-
3857
-
3858
-
3859
-
3860
-
3861
-
3862
-
3863
- ú
3864
-
3865
-
3866
-
3867
-
3868
-
3869
-
3870
-
3871
-
3872
-
3873
-
3874
-
3875
-
3876
-
3877
-
3878
-
3879
-
3880
-
3881
-
3882
-
3883
-
3884
-
3885
-
3886
-
3887
-
3888
-
3889
-
3890
-
3891
-
3892
-
3893
-
3894
-
3895
-
3896
-
3897
-
3898
-
3899
-
3900
- ˊ
3901
-
3902
-
3903
-
3904
-
3905
-
3906
-
3907
-
3908
-
3909
-
3910
-
3911
-
3912
-
3913
-
3914
-
3915
-
3916
-
3917
-
3918
-
3919
-
3920
-
3921
-
3922
-
3923
-
3924
-
3925
-
3926
-
3927
-
3928
-
3929
-
3930
-
3931
-
3932
-
3933
-
3934
-
3935
-
3936
-
3937
-
3938
-
3939
-
3940
-
3941
-
3942
- $
3943
- ;
3944
- ^
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
models/text_recognition_crnn/charset_94_CH.txt DELETED
@@ -1,94 +0,0 @@
1
- 0
2
- 1
3
- 2
4
- 3
5
- 4
6
- 5
7
- 6
8
- 7
9
- 8
10
- 9
11
- a
12
- b
13
- c
14
- d
15
- e
16
- f
17
- g
18
- h
19
- i
20
- j
21
- k
22
- l
23
- m
24
- n
25
- o
26
- p
27
- q
28
- r
29
- s
30
- t
31
- u
32
- v
33
- w
34
- x
35
- y
36
- z
37
- A
38
- B
39
- C
40
- D
41
- E
42
- F
43
- G
44
- H
45
- I
46
- J
47
- K
48
- L
49
- M
50
- N
51
- O
52
- P
53
- Q
54
- R
55
- S
56
- T
57
- U
58
- V
59
- W
60
- X
61
- Y
62
- Z
63
- !
64
- "
65
- #
66
- $
67
- %
68
- &
69
- '
70
- (
71
- )
72
- *
73
- +
74
- ,
75
- -
76
- .
77
- /
78
- :
79
- ;
80
- <
81
- =
82
- >
83
- ?
84
- @
85
- [
86
- \
87
- ]
88
- ^
89
- _
90
- `
91
- {
92
- |
93
- }
94
- ~
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
models/text_recognition_crnn/crnn.py CHANGED
@@ -8,9 +8,8 @@ import numpy as np
8
  import cv2 as cv
9
 
10
  class CRNN:
11
- def __init__(self, modelPath, charsetPath, backendId=0, targetId=0):
12
  self._model_path = modelPath
13
- self._charsetPath = charsetPath
14
  self._backendId = backendId
15
  self._targetId = targetId
16
 
@@ -18,7 +17,17 @@ class CRNN:
18
  self._model.setPreferableBackend(self._backendId)
19
  self._model.setPreferableTarget(self._targetId)
20
 
21
- self._charset = self._load_charset(self._charsetPath)
 
 
 
 
 
 
 
 
 
 
22
  self._inputSize = [100, 32] # Fixed
23
  self._targetVertices = np.array([
24
  [0, self._inputSize[1] - 1],
@@ -31,13 +40,8 @@ class CRNN:
31
  def name(self):
32
  return self.__class__.__name__
33
 
34
- def _load_charset(self, charsetPath):
35
- charset = ''
36
- with open(charsetPath, 'r') as f:
37
- for char in f:
38
- char = char.strip()
39
- charset += char
40
- return charset
41
 
42
  def setBackend(self, backend_id):
43
  self._backendId = backend_id
@@ -94,3 +98,4081 @@ class CRNN:
94
  char_list.append(text[i])
95
  return ''.join(char_list)
96
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  import cv2 as cv
9
 
10
  class CRNN:
11
+ def __init__(self, modelPath, backendId=0, targetId=0):
12
  self._model_path = modelPath
 
13
  self._backendId = backendId
14
  self._targetId = targetId
15
 
 
17
  self._model.setPreferableBackend(self._backendId)
18
  self._model.setPreferableTarget(self._targetId)
19
 
20
+ # load charset by the name of model
21
+ if '_EN_' in self._model_path:
22
+ self._charset = self._load_charset(self.CHARSET_EN_36)
23
+ elif '_CH_' in self._model_path:
24
+ self._charset = self._load_charset(self.CHARSET_CH_94)
25
+ elif '_CN_' in self._model_path:
26
+ self._charset = self._load_charset(self.CHARSET_CN_3944)
27
+ else:
28
+ print('Charset not supported! Exiting ...')
29
+ exit()
30
+
31
  self._inputSize = [100, 32] # Fixed
32
  self._targetVertices = np.array([
33
  [0, self._inputSize[1] - 1],
 
40
  def name(self):
41
  return self.__class__.__name__
42
 
43
+ def _load_charset(self, charset):
44
+ return ''.join(charset.splitlines())
 
 
 
 
 
45
 
46
  def setBackend(self, backend_id):
47
  self._backendId = backend_id
 
98
  char_list.append(text[i])
99
  return ''.join(char_list)
100
 
101
+ CHARSET_EN_36 = '''0
102
+ 1
103
+ 2
104
+ 3
105
+ 4
106
+ 5
107
+ 6
108
+ 7
109
+ 8
110
+ 9
111
+ a
112
+ b
113
+ c
114
+ d
115
+ e
116
+ f
117
+ g
118
+ h
119
+ i
120
+ j
121
+ k
122
+ l
123
+ m
124
+ n
125
+ o
126
+ p
127
+ q
128
+ r
129
+ s
130
+ t
131
+ u
132
+ v
133
+ w
134
+ x
135
+ y
136
+ z'''
137
+
138
+ CHARSET_CH_94 = '''
139
+ 0
140
+ 1
141
+ 2
142
+ 3
143
+ 4
144
+ 5
145
+ 6
146
+ 7
147
+ 8
148
+ 9
149
+ a
150
+ b
151
+ c
152
+ d
153
+ e
154
+ f
155
+ g
156
+ h
157
+ i
158
+ j
159
+ k
160
+ l
161
+ m
162
+ n
163
+ o
164
+ p
165
+ q
166
+ r
167
+ s
168
+ t
169
+ u
170
+ v
171
+ w
172
+ x
173
+ y
174
+ z
175
+ A
176
+ B
177
+ C
178
+ D
179
+ E
180
+ F
181
+ G
182
+ H
183
+ I
184
+ J
185
+ K
186
+ L
187
+ M
188
+ N
189
+ O
190
+ P
191
+ Q
192
+ R
193
+ S
194
+ T
195
+ U
196
+ V
197
+ W
198
+ X
199
+ Y
200
+ Z
201
+ !
202
+ "
203
+ #
204
+ $
205
+ %
206
+ &
207
+ '
208
+ (
209
+ )
210
+ *
211
+ +
212
+ ,
213
+ -
214
+ .
215
+ /
216
+ :
217
+ ;
218
+ <
219
+ =
220
+ >
221
+ ?
222
+ @
223
+ [
224
+ \
225
+ ]
226
+ ^
227
+ _
228
+ `
229
+ {
230
+ |
231
+ }
232
+ ~'''
233
+
234
+ CHARSET_CN_3944 = '''
235
+ H
236
+ O
237
+ K
238
+ I
239
+ T
240
+ E
241
+ A
242
+
243
+
244
+
245
+
246
+ J
247
+ N
248
+ G
249
+ Y
250
+ C
251
+ U
252
+ Q
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+ 1
275
+ 7
276
+ 3
277
+ 9
278
+ 8
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+ 线
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+ 便
329
+
330
+
331
+
332
+
333
+
334
+ 4
335
+ 0
336
+ -
337
+ 6
338
+ 5
339
+ 2
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+ 西
358
+
359
+
360
+
361
+ l
362
+ i
363
+ k
364
+ n
365
+ g
366
+ c
367
+ o
368
+ f
369
+ e
370
+ w
371
+
372
+
373
+
374
+
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+ h
385
+ t
386
+
387
+
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+ L
400
+ :
401
+
402
+
403
+
404
+
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+ .
417
+
418
+
419
+
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+ B
436
+
437
+
438
+
439
+
440
+
441
+ /
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+
471
+
472
+
473
+
474
+
475
+
476
+
477
+
478
+
479
+
480
+
481
+
482
+
483
+
484
+
485
+
486
+
487
+
488
+
489
+
490
+ 绿
491
+
492
+
493
+
494
+
495
+
496
+
497
+
498
+
499
+ d
500
+ D
501
+
502
+
503
+
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
+ y
512
+
513
+
514
+
515
+
516
+
517
+
518
+
519
+
520
+
521
+
522
+
523
+
524
+ F
525
+
526
+
527
+
528
+
529
+
530
+
531
+
532
+
533
+
534
+
535
+
536
+
537
+
538
+
539
+
540
+
541
+
542
+
543
+
544
+
545
+
546
+
547
+
548
+
549
+
550
+
551
+
552
+ r
553
+ P
554
+ a
555
+ u
556
+
557
+
558
+
559
+ M
560
+
561
+
562
+
563
+
564
+
565
+
566
+
567
+ R
568
+ S
569
+
570
+
571
+
572
+
573
+
574
+
575
+
576
+
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+
585
+
586
+
587
+
588
+
589
+
590
+
591
+
592
+
593
+
594
+
595
+
596
+
597
+
598
+
599
+
600
+
601
+
602
+
603
+
604
+
605
+
606
+
607
+
608
+
609
+
610
+
611
+
612
+
613
+ ®
614
+
615
+
616
+ 鱿
617
+
618
+
619
+
620
+
621
+
622
+
623
+
624
+
625
+
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+ *
640
+
641
+
642
+
643
+
644
+
645
+
646
+
647
+
648
+
649
+
650
+
651
+
652
+
653
+
654
+
655
+
656
+ V
657
+
658
+
659
+
660
+
661
+
662
+
663
+
664
+ X
665
+
666
+ W
667
+ j
668
+
669
+
670
+ Z
671
+
672
+
673
+
674
+
675
+
676
+
677
+
678
+
679
+
680
+
681
+
682
+
683
+
684
+ ·
685
+
686
+
687
+
688
+
689
+
690
+
691
+
692
+
693
+
694
+
695
+
696
+
697
+
698
+
699
+
700
+
701
+
702
+
703
+
704
+
705
+
706
+
707
+
708
+
709
+
710
+
711
+
712
+
713
+
714
+
715
+
716
+
717
+
718
+
719
+
720
+
721
+
722
+
723
+
724
+
725
+
726
+
727
+
728
+
729
+
730
+ x
731
+
732
+
733
+
734
+
735
+
736
+
737
+
738
+
739
+
740
+
741
+
742
+
743
+
744
+
745
+
746
+ v
747
+ s
748
+ m
749
+
750
+
751
+
752
+
753
+ 广
754
+
755
+
756
+
757
+
758
+
759
+
760
+ p
761
+
762
+
763
+
764
+
765
+
766
+
767
+
768
+
769
+
770
+
771
+
772
+
773
+
774
+
775
+
776
+
777
+
778
+
779
+
780
+
781
+
782
+
783
+
784
+
785
+
786
+
787
+
788
+ &
789
+
790
+
791
+
792
+
793
+
794
+
795
+
796
+
797
+
798
+
799
+
800
+
801
+
802
+
803
+
804
+
805
+
806
+
807
+
808
+
809
+
810
+
811
+
812
+
813
+
814
+
815
+
816
+
817
+
818
+
819
+
820
+
821
+
822
+
823
+
824
+
825
+
826
+
827
+
828
+
829
+
830
+
831
+
832
+
833
+
834
+
835
+
836
+
837
+
838
+
839
+
840
+
841
+
842
+
843
+
844
+
845
+
846
+
847
+
848
+
849
+
850
+
851
+
852
+
853
+
854
+
855
+
856
+
857
+
858
+ b
859
+
860
+
861
+
862
+
863
+
864
+
865
+
866
+
867
+
868
+ '
869
+
870
+
871
+
872
+
873
+
874
+
875
+
876
+
877
+
878
+
879
+
880
+
881
+
882
+
883
+
884
+
885
+
886
+
887
+
888
+
889
+
890
+
891
+
892
+
893
+
894
+
895
+ 寿
896
+
897
+
898
+
899
+
900
+
901
+
902
+
903
+
904
+
905
+
906
+
907
+
908
+
909
+
910
+
911
+
912
+
913
+
914
+
915
+
916
+
917
+
918
+
919
+
920
+
921
+
922
+
923
+
924
+
925
+
926
+
927
+
928
+
929
+
930
+
931
+
932
+
933
+
934
+
935
+
936
+
937
+
938
+
939
+
940
+
941
+
942
+
943
+
944
+
945
+
946
+
947
+
948
+
949
+
950
+
951
+
952
+
953
+
954
+
955
+
956
+
957
+
958
+
959
+
960
+
961
+
962
+
963
+
964
+
965
+
966
+
967
+
968
+
969
+
970
+
971
+
972
+
973
+
974
+
975
+
976
+
977
+
978
+
979
+
980
+
981
+
982
+
983
+
984
+
985
+
986
+
987
+
988
+
989
+
990
+
991
+
992
+
993
+
994
+
995
+
996
+
997
+
998
+
999
+
1000
+
1001
+
1002
+
1003
+
1004
+
1005
+
1006
+
1007
+
1008
+
1009
+
1010
+
1011
+
1012
+
1013
+
1014
+
1015
+
1016
+
1017
+
1018
+
1019
+
1020
+
1021
+
1022
+
1023
+
1024
+
1025
+
1026
+
1027
+
1028
+
1029
+
1030
+
1031
+
1032
+
1033
+
1034
+
1035
+
1036
+
1037
+
1038
+
1039
+
1040
+
1041
+
1042
+
1043
+
1044
+
1045
+
1046
+
1047
+
1048
+
1049
+
1050
+
1051
+
1052
+
1053
+
1054
+
1055
+
1056
+
1057
+
1058
+
1059
+
1060
+
1061
+
1062
+
1063
+
1064
+
1065
+
1066
+
1067
+
1068
+
1069
+
1070
+
1071
+
1072
+
1073
+
1074
+
1075
+
1076
+
1077
+
1078
+
1079
+
1080
+
1081
+
1082
+
1083
+
1084
+
1085
+
1086
+
1087
+
1088
+
1089
+
1090
+
1091
+
1092
+
1093
+
1094
+
1095
+
1096
+
1097
+
1098
+
1099
+
1100
+
1101
+
1102
+
1103
+
1104
+
1105
+
1106
+
1107
+
1108
+
1109
+
1110
+
1111
+
1112
+
1113
+
1114
+
1115
+
1116
+
1117
+
1118
+
1119
+
1120
+
1121
+
1122
+
1123
+
1124
+
1125
+
1126
+
1127
+
1128
+
1129
+
1130
+
1131
+
1132
+
1133
+
1134
+
1135
+
1136
+
1137
+
1138
+
1139
+
1140
+
1141
+
1142
+
1143
+
1144
+
1145
+
1146
+
1147
+
1148
+
1149
+
1150
+
1151
+
1152
+
1153
+
1154
+
1155
+
1156
+
1157
+
1158
+
1159
+
1160
+
1161
+
1162
+ |
1163
+
1164
+
1165
+ 仿
1166
+
1167
+
1168
+
1169
+
1170
+
1171
+
1172
+
1173
+
1174
+
1175
+
1176
+
1177
+
1178
+
1179
+
1180
+
1181
+
1182
+
1183
+
1184
+
1185
+
1186
+
1187
+
1188
+
1189
+
1190
+
1191
+
1192
+
1193
+
1194
+
1195
+
1196
+
1197
+
1198
+
1199
+
1200
+
1201
+
1202
+
1203
+
1204
+
1205
+
1206
+
1207
+
1208
+
1209
+
1210
+
1211
+
1212
+
1213
+
1214
+
1215
+
1216
+
1217
+
1218
+
1219
+
1220
+
1221
+
1222
+
1223
+
1224
+
1225
+
1226
+
1227
+
1228
+
1229
+
1230
+
1231
+
1232
+
1233
+
1234
+
1235
+
1236
+
1237
+
1238
+
1239
+ é
1240
+ [
1241
+
1242
+ ]
1243
+
1244
+
1245
+
1246
+
1247
+
1248
+
1249
+
1250
+ z
1251
+
1252
+
1253
+
1254
+
1255
+
1256
+ 怀
1257
+
1258
+
1259
+
1260
+
1261
+
1262
+
1263
+ ǐ
1264
+ à
1265
+
1266
+
1267
+
1268
+
1269
+
1270
+
1271
+
1272
+
1273
+
1274
+
1275
+
1276
+
1277
+
1278
+
1279
+
1280
+
1281
+
1282
+
1283
+
1284
+
1285
+
1286
+
1287
+
1288
+
1289
+
1290
+
1291
+
1292
+
1293
+
1294
+
1295
+
1296
+
1297
+
1298
+
1299
+
1300
+ ¥
1301
+
1302
+
1303
+
1304
+
1305
+
1306
+
1307
+
1308
+
1309
+
1310
+
1311
+
1312
+ ©
1313
+
1314
+
1315
+
1316
+
1317
+
1318
+
1319
+
1320
+
1321
+
1322
+
1323
+
1324
+
1325
+
1326
+
1327
+
1328
+
1329
+
1330
+
1331
+
1332
+
1333
+
1334
+
1335
+
1336
+
1337
+ ä
1338
+
1339
+
1340
+
1341
+
1342
+
1343
+
1344
+
1345
+
1346
+
1347
+
1348
+
1349
+
1350
+
1351
+
1352
+
1353
+
1354
+
1355
+
1356
+
1357
+
1358
+
1359
+
1360
+
1361
+
1362
+
1363
+
1364
+
1365
+
1366
+
1367
+
1368
+
1369
+
1370
+
1371
+
1372
+
1373
+
1374
+
1375
+
1376
+
1377
+
1378
+
1379
+
1380
+
1381
+
1382
+
1383
+
1384
+
1385
+
1386
+
1387
+
1388
+
1389
+
1390
+
1391
+
1392
+
1393
+
1394
+
1395
+
1396
+
1397
+
1398
+
1399
+
1400
+
1401
+
1402
+
1403
+
1404
+ °
1405
+
1406
+
1407
+
1408
+
1409
+
1410
+
1411
+
1412
+
1413
+
1414
+
1415
+ _
1416
+
1417
+
1418
+
1419
+
1420
+
1421
+
1422
+
1423
+
1424
+
1425
+
1426
+
1427
+
1428
+
1429
+
1430
+
1431
+
1432
+
1433
+
1434
+
1435
+
1436
+
1437
+
1438
+
1439
+
1440
+
1441
+
1442
+
1443
+
1444
+
1445
+
1446
+
1447
+
1448
+
1449
+
1450
+
1451
+
1452
+
1453
+
1454
+
1455
+
1456
+
1457
+
1458
+
1459
+
1460
+
1461
+
1462
+
1463
+
1464
+
1465
+
1466
+
1467
+
1468
+
1469
+
1470
+
1471
+
1472
+
1473
+
1474
+
1475
+
1476
+
1477
+
1478
+
1479
+
1480
+
1481
+
1482
+
1483
+
1484
+
1485
+
1486
+
1487
+
1488
+
1489
+
1490
+
1491
+
1492
+
1493
+
1494
+
1495
+
1496
+
1497
+
1498
+
1499
+
1500
+
1501
+ 饿
1502
+
1503
+
1504
+
1505
+
1506
+
1507
+
1508
+
1509
+
1510
+
1511
+
1512
+
1513
+
1514
+
1515
+
1516
+
1517
+
1518
+
1519
+ !
1520
+
1521
+
1522
+
1523
+
1524
+ 鹿
1525
+
1526
+
1527
+
1528
+
1529
+
1530
+
1531
+
1532
+
1533
+
1534
+
1535
+
1536
+
1537
+
1538
+
1539
+
1540
+
1541
+
1542
+
1543
+
1544
+
1545
+
1546
+
1547
+
1548
+
1549
+
1550
+
1551
+
1552
+
1553
+
1554
+
1555
+
1556
+ 屿
1557
+
1558
+
1559
+
1560
+
1561
+
1562
+
1563
+
1564
+
1565
+
1566
+
1567
+
1568
+
1569
+
1570
+
1571
+
1572
+
1573
+
1574
+
1575
+
1576
+
1577
+
1578
+
1579
+
1580
+
1581
+
1582
+
1583
+
1584
+
1585
+
1586
+
1587
+
1588
+
1589
+
1590
+
1591
+
1592
+
1593
+
1594
+
1595
+
1596
+
1597
+
1598
+
1599
+
1600
+
1601
+
1602
+
1603
+
1604
+ 粿
1605
+
1606
+
1607
+
1608
+
1609
+
1610
+
1611
+
1612
+
1613
+
1614
+
1615
+
1616
+
1617
+
1618
+
1619
+
1620
+
1621
+ q
1622
+
1623
+
1624
+
1625
+ 滿
1626
+
1627
+
1628
+
1629
+
1630
+
1631
+
1632
+ (
1633
+
1634
+
1635
+
1636
+
1637
+
1638
+
1639
+
1640
+
1641
+
1642
+
1643
+
1644
+
1645
+
1646
+
1647
+
1648
+
1649
+
1650
+
1651
+
1652
+
1653
+
1654
+
1655
+
1656
+
1657
+
1658
+
1659
+
1660
+
1661
+
1662
+
1663
+
1664
+
1665
+
1666
+
1667
+
1668
+
1669
+
1670
+
1671
+
1672
+
1673
+
1674
+
1675
+
1676
+ 耀
1677
+
1678
+
1679
+
1680
+
1681
+
1682
+
1683
+
1684
+
1685
+
1686
+
1687
+
1688
+
1689
+
1690
+ 漿
1691
+
1692
+
1693
+
1694
+
1695
+
1696
+
1697
+
1698
+
1699
+
1700
+
1701
+
1702
+
1703
+
1704
+
1705
+
1706
+
1707
+
1708
+
1709
+
1710
+
1711
+
1712
+
1713
+
1714
+
1715
+
1716
+
1717
+
1718
+
1719
+
1720
+
1721
+
1722
+
1723
+
1724
+
1725
+ ,
1726
+
1727
+
1728
+
1729
+
1730
+
1731
+
1732
+
1733
+
1734
+
1735
+
1736
+
1737
+
1738
+
1739
+
1740
+
1741
+
1742
+
1743
+
1744
+
1745
+
1746
+
1747
+
1748
+
1749
+
1750
+
1751
+
1752
+
1753
+
1754
+
1755
+
1756
+
1757
+
1758
+
1759
+
1760
+
1761
+
1762
+
1763
+
1764
+
1765
+
1766
+
1767
+ 槿
1768
+
1769
+
1770
+
1771
+
1772
+
1773
+
1774
+
1775
+
1776
+
1777
+
1778
+
1779
+
1780
+
1781
+
1782
+
1783
+
1784
+
1785
+
1786
+
1787
+
1788
+
1789
+
1790
+
1791
+
1792
+
1793
+
1794
+
1795
+
1796
+
1797
+
1798
+
1799
+
1800
+
1801
+
1802
+
1803
+
1804
+
1805
+
1806
+
1807
+
1808
+
1809
+
1810
+
1811
+
1812
+
1813
+
1814
+
1815
+
1816
+
1817
+
1818
+
1819
+
1820
+
1821
+
1822
+
1823
+
1824
+
1825
+
1826
+
1827
+
1828
+
1829
+
1830
+
1831
+
1832
+
1833
+
1834
+
1835
+
1836
+
1837
+
1838
+
1839
+
1840
+
1841
+
1842
+
1843
+
1844
+
1845
+
1846
+
1847
+
1848
+
1849
+
1850
+
1851
+
1852
+
1853
+ %
1854
+
1855
+
1856
+
1857
+
1858
+
1859
+
1860
+
1861
+
1862
+
1863
+
1864
+
1865
+
1866
+
1867
+
1868
+
1869
+
1870
+
1871
+
1872
+
1873
+
1874
+
1875
+
1876
+
1877
+
1878
+
1879
+
1880
+
1881
+
1882
+
1883
+
1884
+
1885
+
1886
+
1887
+
1888
+
1889
+
1890
+
1891
+
1892
+
1893
+
1894
+
1895
+
1896
+
1897
+
1898
+
1899
+
1900
+
1901
+
1902
+
1903
+
1904
+
1905
+
1906
+
1907
+
1908
+
1909
+
1910
+
1911
+
1912
+ <
1913
+ >
1914
+
1915
+
1916
+
1917
+
1918
+
1919
+ 宿
1920
+
1921
+
1922
+
1923
+
1924
+
1925
+
1926
+
1927
+
1928
+
1929
+
1930
+
1931
+
1932
+
1933
+
1934
+
1935
+ +
1936
+
1937
+
1938
+
1939
+
1940
+
1941
+
1942
+
1943
+
1944
+
1945
+
1946
+
1947
+
1948
+
1949
+
1950
+ #
1951
+
1952
+
1953
+
1954
+
1955
+
1956
+
1957
+
1958
+
1959
+
1960
+
1961
+
1962
+
1963
+
1964
+
1965
+
1966
+
1967
+
1968
+
1969
+
1970
+ ~
1971
+
1972
+
1973
+
1974
+
1975
+
1976
+
1977
+
1978
+
1979
+
1980
+
1981
+
1982
+
1983
+
1984
+
1985
+
1986
+
1987
+
1988
+
1989
+
1990
+
1991
+
1992
+
1993
+
1994
+
1995
+
1996
+
1997
+
1998
+
1999
+
2000
+
2001
+
2002
+
2003
+
2004
+
2005
+
2006
+
2007
+
2008
+
2009
+
2010
+
2011
+
2012
+
2013
+
2014
+
2015
+
2016
+
2017
+
2018
+
2019
+
2020
+
2021
+
2022
+
2023
+
2024
+
2025
+
2026
+
2027
+
2028
+
2029
+
2030
+
2031
+
2032
+
2033
+
2034
+
2035
+
2036
+
2037
+
2038
+
2039
+
2040
+
2041
+ =
2042
+
2043
+
2044
+
2045
+
2046
+
2047
+
2048
+
2049
+
2050
+
2051
+
2052
+
2053
+
2054
+
2055
+
2056
+
2057
+
2058
+
2059
+
2060
+
2061
+
2062
+
2063
+
2064
+
2065
+
2066
+
2067
+
2068
+
2069
+
2070
+
2071
+
2072
+
2073
+
2074
+
2075
+
2076
+
2077
+
2078
+ )
2079
+
2080
+
2081
+
2082
+
2083
+
2084
+
2085
+
2086
+
2087
+
2088
+
2089
+
2090
+
2091
+
2092
+
2093
+
2094
+
2095
+
2096
+
2097
+
2098
+
2099
+
2100
+
2101
+
2102
+
2103
+
2104
+
2105
+
2106
+
2107
+
2108
+
2109
+
2110
+
2111
+
2112
+
2113
+
2114
+
2115
+
2116
+
2117
+
2118
+
2119
+
2120
+
2121
+
2122
+
2123
+
2124
+
2125
+
2126
+
2127
+
2128
+
2129
+
2130
+
2131
+
2132
+
2133
+
2134
+
2135
+
2136
+
2137
+
2138
+
2139
+
2140
+
2141
+
2142
+
2143
+
2144
+
2145
+
2146
+
2147
+
2148
+
2149
+
2150
+
2151
+
2152
+
2153
+
2154
+
2155
+
2156
+
2157
+
2158
+
2159
+
2160
+
2161
+
2162
+
2163
+
2164
+
2165
+
2166
+
2167
+
2168
+
2169
+
2170
+
2171
+
2172
+
2173
+
2174
+
2175
+
2176
+
2177
+
2178
+
2179
+
2180
+ \
2181
+
2182
+
2183
+
2184
+
2185
+
2186
+
2187
+
2188
+
2189
+
2190
+
2191
+
2192
+
2193
+
2194
+
2195
+
2196
+
2197
+
2198
+
2199
+
2200
+
2201
+
2202
+
2203
+
2204
+
2205
+
2206
+
2207
+
2208
+
2209
+
2210
+
2211
+
2212
+
2213
+
2214
+
2215
+
2216
+
2217
+
2218
+
2219
+
2220
+
2221
+
2222
+
2223
+
2224
+
2225
+
2226
+
2227
+
2228
+
2229
+
2230
+
2231
+
2232
+
2233
+
2234
+
2235
+
2236
+
2237
+
2238
+
2239
+
2240
+
2241
+
2242
+
2243
+
2244
+
2245
+
2246
+
2247
+
2248
+
2249
+
2250
+
2251
+
2252
+
2253
+
2254
+
2255
+
2256
+
2257
+
2258
+
2259
+ ×
2260
+
2261
+
2262
+
2263
+
2264
+
2265
+
2266
+
2267
+
2268
+
2269
+
2270
+
2271
+
2272
+ ā
2273
+
2274
+
2275
+
2276
+
2277
+
2278
+
2279
+
2280
+
2281
+
2282
+
2283
+
2284
+
2285
+
2286
+
2287
+
2288
+
2289
+
2290
+
2291
+
2292
+
2293
+
2294
+
2295
+
2296
+
2297
+
2298
+
2299
+
2300
+
2301
+
2302
+
2303
+
2304
+
2305
+
2306
+
2307
+
2308
+
2309
+
2310
+
2311
+
2312
+
2313
+
2314
+
2315
+
2316
+
2317
+
2318
+
2319
+
2320
+
2321
+
2322
+
2323
+
2324
+
2325
+
2326
+
2327
+
2328
+
2329
+
2330
+
2331
+
2332
+
2333
+
2334
+
2335
+
2336
+
2337
+
2338
+
2339
+
2340
+
2341
+
2342
+
2343
+
2344
+
2345
+
2346
+
2347
+
2348
+
2349
+
2350
+
2351
+
2352
+
2353
+
2354
+
2355
+
2356
+
2357
+
2358
+
2359
+
2360
+
2361
+
2362
+
2363
+
2364
+
2365
+
2366
+
2367
+
2368
+
2369
+
2370
+
2371
+
2372
+
2373
+
2374
+
2375
+
2376
+ ¦
2377
+
2378
+
2379
+
2380
+
2381
+
2382
+
2383
+
2384
+
2385
+
2386
+
2387
+
2388
+
2389
+
2390
+
2391
+ @
2392
+
2393
+
2394
+
2395
+
2396
+
2397
+
2398
+
2399
+
2400
+
2401
+
2402
+
2403
+
2404
+
2405
+
2406
+
2407
+
2408
+ 椿
2409
+
2410
+
2411
+
2412
+ 亿
2413
+
2414
+
2415
+
2416
+
2417
+
2418
+
2419
+
2420
+
2421
+
2422
+
2423
+
2424
+
2425
+
2426
+
2427
+
2428
+
2429
+ 鸿
2430
+
2431
+
2432
+
2433
+
2434
+
2435
+
2436
+
2437
+
2438
+
2439
+
2440
+
2441
+
2442
+
2443
+
2444
+
2445
+
2446
+
2447
+
2448
+
2449
+
2450
+
2451
+
2452
+
2453
+
2454
+ Λ
2455
+
2456
+
2457
+
2458
+
2459
+
2460
+
2461
+
2462
+
2463
+
2464
+
2465
+
2466
+
2467
+
2468
+
2469
+
2470
+
2471
+
2472
+
2473
+
2474
+
2475
+
2476
+
2477
+
2478
+
2479
+
2480
+
2481
+
2482
+
2483
+
2484
+
2485
+
2486
+
2487
+
2488
+
2489
+
2490
+
2491
+
2492
+
2493
+
2494
+
2495
+
2496
+
2497
+
2498
+
2499
+
2500
+
2501
+
2502
+
2503
+
2504
+
2505
+
2506
+
2507
+
2508
+
2509
+
2510
+
2511
+
2512
+
2513
+
2514
+
2515
+
2516
+
2517
+
2518
+
2519
+
2520
+
2521
+
2522
+
2523
+
2524
+
2525
+
2526
+
2527
+ 访
2528
+
2529
+
2530
+
2531
+
2532
+
2533
+
2534
+
2535
+
2536
+
2537
+
2538
+
2539
+
2540
+
2541
+
2542
+
2543
+
2544
+
2545
+
2546
+
2547
+
2548
+
2549
+
2550
+
2551
+
2552
+
2553
+
2554
+
2555
+
2556
+
2557
+
2558
+
2559
+
2560
+
2561
+
2562
+
2563
+
2564
+
2565
+
2566
+
2567
+
2568
+
2569
+
2570
+
2571
+
2572
+
2573
+
2574
+
2575
+
2576
+
2577
+
2578
+
2579
+
2580
+
2581
+
2582
+
2583
+
2584
+
2585
+
2586
+
2587
+
2588
+
2589
+
2590
+
2591
+
2592
+
2593
+
2594
+
2595
+
2596
+
2597
+
2598
+
2599
+
2600
+
2601
+
2602
+
2603
+
2604
+
2605
+
2606
+
2607
+
2608
+
2609
+ 綿
2610
+
2611
+
2612
+
2613
+
2614
+
2615
+
2616
+
2617
+
2618
+
2619
+
2620
+
2621
+
2622
+
2623
+
2624
+
2625
+
2626
+
2627
+
2628
+
2629
+
2630
+
2631
+
2632
+
2633
+
2634
+
2635
+
2636
+
2637
+
2638
+
2639
+
2640
+
2641
+
2642
+
2643
+
2644
+
2645
+
2646
+
2647
+
2648
+
2649
+ Á
2650
+ ō
2651
+
2652
+
2653
+
2654
+
2655
+
2656
+
2657
+
2658
+
2659
+
2660
+
2661
+
2662
+
2663
+
2664
+
2665
+
2666
+
2667
+
2668
+
2669
+
2670
+
2671
+
2672
+
2673
+
2674
+
2675
+
2676
+
2677
+
2678
+
2679
+
2680
+
2681
+
2682
+
2683
+
2684
+
2685
+
2686
+
2687
+
2688
+
2689
+
2690
+
2691
+
2692
+
2693
+
2694
+
2695
+
2696
+
2697
+
2698
+
2699
+
2700
+
2701
+
2702
+
2703
+
2704
+
2705
+
2706
+
2707
+
2708
+
2709
+
2710
+
2711
+
2712
+
2713
+
2714
+
2715
+
2716
+
2717
+
2718
+
2719
+
2720
+
2721
+
2722
+
2723
+
2724
+
2725
+
2726
+
2727
+ 驿
2728
+
2729
+
2730
+
2731
+
2732
+
2733
+ ­
2734
+
2735
+
2736
+
2737
+
2738
+
2739
+
2740
+
2741
+
2742
+
2743
+ ǒ
2744
+
2745
+
2746
+
2747
+
2748
+
2749
+
2750
+
2751
+
2752
+
2753
+
2754
+
2755
+
2756
+
2757
+
2758
+
2759
+
2760
+
2761
+
2762
+
2763
+
2764
+
2765
+
2766
+
2767
+
2768
+
2769
+
2770
+
2771
+
2772
+
2773
+
2774
+
2775
+
2776
+
2777
+
2778
+ 穿
2779
+
2780
+
2781
+
2782
+
2783
+
2784
+
2785
+
2786
+
2787
+
2788
+
2789
+
2790
+
2791
+
2792
+
2793
+
2794
+
2795
+
2796
+
2797
+
2798
+
2799
+
2800
+
2801
+
2802
+
2803
+
2804
+
2805
+
2806
+
2807
+
2808
+
2809
+
2810
+
2811
+
2812
+ 使
2813
+
2814
+
2815
+
2816
+
2817
+
2818
+
2819
+
2820
+
2821
+
2822
+
2823
+
2824
+
2825
+
2826
+
2827
+
2828
+
2829
+
2830
+
2831
+
2832
+
2833
+
2834
+ 殿
2835
+
2836
+
2837
+
2838
+
2839
+
2840
+
2841
+
2842
+
2843
+
2844
+
2845
+
2846
+
2847
+
2848
+
2849
+
2850
+
2851
+
2852
+
2853
+
2854
+
2855
+
2856
+
2857
+
2858
+
2859
+
2860
+
2861
+
2862
+
2863
+
2864
+
2865
+
2866
+
2867
+
2868
+
2869
+
2870
+
2871
+
2872
+
2873
+
2874
+
2875
+
2876
+
2877
+
2878
+
2879
+
2880
+
2881
+
2882
+
2883
+
2884
+
2885
+
2886
+
2887
+
2888
+
2889
+
2890
+
2891
+
2892
+
2893
+
2894
+
2895
+
2896
+
2897
+
2898
+
2899
+
2900
+
2901
+
2902
+
2903
+
2904
+
2905
+
2906
+
2907
+
2908
+
2909
+
2910
+
2911
+
2912
+
2913
+
2914
+
2915
+
2916
+
2917
+
2918
+
2919
+
2920
+
2921
+ 尿
2922
+
2923
+
2924
+
2925
+
2926
+
2927
+
2928
+
2929
+
2930
+
2931
+
2932
+
2933
+
2934
+
2935
+
2936
+
2937
+
2938
+
2939
+
2940
+
2941
+
2942
+
2943
+
2944
+
2945
+
2946
+
2947
+
2948
+
2949
+
2950
+
2951
+
2952
+
2953
+
2954
+
2955
+
2956
+
2957
+
2958
+
2959
+
2960
+
2961
+
2962
+
2963
+
2964
+
2965
+
2966
+
2967
+
2968
+
2969
+
2970
+
2971
+
2972
+
2973
+
2974
+
2975
+
2976
+
2977
+
2978
+
2979
+
2980
+
2981
+
2982
+
2983
+
2984
+
2985
+
2986
+
2987
+
2988
+
2989
+
2990
+
2991
+
2992
+
2993
+
2994
+
2995
+
2996
+
2997
+
2998
+
2999
+
3000
+
3001
+
3002
+
3003
+
3004
+
3005
+
3006
+
3007
+
3008
+
3009
+
3010
+
3011
+
3012
+
3013
+
3014
+
3015
+
3016
+
3017
+
3018
+
3019
+
3020
+
3021
+ 廿
3022
+
3023
+
3024
+
3025
+
3026
+
3027
+
3028
+
3029
+
3030
+
3031
+
3032
+
3033
+
3034
+
3035
+
3036
+
3037
+
3038
+
3039
+
3040
+
3041
+
3042
+
3043
+
3044
+
3045
+
3046
+
3047
+
3048
+
3049
+
3050
+
3051
+
3052
+
3053
+ Ξ
3054
+
3055
+
3056
+
3057
+
3058
+
3059
+
3060
+
3061
+
3062
+
3063
+
3064
+
3065
+
3066
+
3067
+ φ
3068
+
3069
+
3070
+
3071
+
3072
+
3073
+
3074
+
3075
+
3076
+
3077
+
3078
+
3079
+
3080
+
3081
+
3082
+
3083
+
3084
+
3085
+
3086
+
3087
+
3088
+
3089
+
3090
+
3091
+
3092
+
3093
+
3094
+
3095
+
3096
+
3097
+
3098
+
3099
+
3100
+
3101
+
3102
+
3103
+
3104
+
3105
+
3106
+
3107
+
3108
+
3109
+
3110
+
3111
+
3112
+
3113
+
3114
+
3115
+
3116
+
3117
+
3118
+
3119
+
3120
+
3121
+
3122
+
3123
+
3124
+
3125
+
3126
+
3127
+
3128
+
3129
+
3130
+
3131
+
3132
+
3133
+
3134
+
3135
+
3136
+
3137
+
3138
+
3139
+
3140
+
3141
+
3142
+
3143
+
3144
+
3145
+
3146
+
3147
+
3148
+
3149
+
3150
+
3151
+
3152
+
3153
+
3154
+
3155
+
3156
+
3157
+
3158
+
3159
+
3160
+
3161
+
3162
+
3163
+
3164
+
3165
+
3166
+
3167
+
3168
+
3169
+
3170
+
3171
+
3172
+
3173
+
3174
+
3175
+
3176
+
3177
+
3178
+
3179
+
3180
+
3181
+
3182
+
3183
+
3184
+
3185
+
3186
+
3187
+
3188
+
3189
+
3190
+
3191
+ á
3192
+ ǎ
3193
+
3194
+
3195
+
3196
+
3197
+
3198
+
3199
+
3200
+
3201
+
3202
+
3203
+
3204
+
3205
+
3206
+
3207
+
3208
+
3209
+
3210
+
3211
+
3212
+
3213
+
3214
+
3215
+
3216
+
3217
+
3218
+
3219
+
3220
+
3221
+
3222
+
3223
+
3224
+
3225
+
3226
+
3227
+
3228
+
3229
+
3230
+
3231
+
3232
+
3233
+
3234
+
3235
+
3236
+
3237
+
3238
+
3239
+
3240
+
3241
+
3242
+
3243
+
3244
+
3245
+
3246
+
3247
+
3248
+
3249
+
3250
+
3251
+
3252
+
3253
+
3254
+
3255
+
3256
+
3257
+
3258
+
3259
+
3260
+
3261
+
3262
+
3263
+
3264
+
3265
+
3266
+
3267
+
3268
+
3269
+
3270
+
3271
+
3272
+
3273
+ а
3274
+
3275
+
3276
+
3277
+
3278
+
3279
+ 伿
3280
+
3281
+
3282
+
3283
+
3284
+
3285
+
3286
+
3287
+
3288
+
3289
+
3290
+
3291
+
3292
+
3293
+
3294
+
3295
+
3296
+
3297
+
3298
+
3299
+
3300
+
3301
+
3302
+
3303
+
3304
+
3305
+
3306
+
3307
+
3308
+
3309
+
3310
+
3311
+
3312
+
3313
+
3314
+
3315
+
3316
+
3317
+
3318
+
3319
+
3320
+
3321
+
3322
+
3323
+
3324
+
3325
+
3326
+
3327
+
3328
+
3329
+
3330
+
3331
+
3332
+
3333
+
3334
+
3335
+
3336
+
3337
+
3338
+
3339
+
3340
+
3341
+
3342
+
3343
+
3344
+
3345
+
3346
+
3347
+
3348
+
3349
+
3350
+
3351
+
3352
+
3353
+
3354
+
3355
+
3356
+
3357
+
3358
+
3359
+
3360
+
3361
+
3362
+
3363
+
3364
+
3365
+
3366
+
3367
+
3368
+
3369
+
3370
+
3371
+
3372
+
3373
+
3374
+
3375
+
3376
+
3377
+
3378
+
3379
+
3380
+
3381
+
3382
+
3383
+
3384
+ 湿
3385
+
3386
+
3387
+
3388
+
3389
+
3390
+
3391
+
3392
+ 祿
3393
+
3394
+
3395
+
3396
+
3397
+
3398
+
3399
+
3400
+
3401
+
3402
+
3403
+
3404
+
3405
+
3406
+ 稿
3407
+
3408
+
3409
+
3410
+
3411
+
3412
+
3413
+
3414
+
3415
+
3416
+
3417
+
3418
+
3419
+
3420
+
3421
+ û
3422
+
3423
+
3424
+
3425
+
3426
+
3427
+
3428
+
3429
+
3430
+
3431
+
3432
+
3433
+
3434
+
3435
+
3436
+
3437
+
3438
+
3439
+
3440
+
3441
+
3442
+
3443
+
3444
+
3445
+
3446
+
3447
+
3448
+
3449
+
3450
+
3451
+
3452
+
3453
+
3454
+
3455
+
3456
+
3457
+
3458
+
3459
+
3460
+
3461
+
3462
+
3463
+
3464
+
3465
+
3466
+
3467
+
3468
+
3469
+
3470
+
3471
+
3472
+
3473
+
3474
+
3475
+
3476
+
3477
+ í
3478
+ ó
3479
+
3480
+
3481
+ Θ
3482
+
3483
+
3484
+
3485
+
3486
+
3487
+
3488
+
3489
+
3490
+
3491
+
3492
+
3493
+
3494
+
3495
+
3496
+
3497
+
3498
+
3499
+
3500
+
3501
+
3502
+
3503
+
3504
+
3505
+
3506
+
3507
+
3508
+
3509
+
3510
+
3511
+
3512
+
3513
+
3514
+
3515
+
3516
+
3517
+
3518
+
3519
+
3520
+
3521
+
3522
+
3523
+
3524
+
3525
+
3526
+
3527
+
3528
+
3529
+
3530
+
3531
+
3532
+
3533
+
3534
+
3535
+
3536
+
3537
+
3538
+
3539
+
3540
+
3541
+
3542
+
3543
+
3544
+
3545
+
3546
+ {
3547
+
3548
+
3549
+
3550
+
3551
+
3552
+
3553
+
3554
+
3555
+
3556
+
3557
+
3558
+
3559
+
3560
+
3561
+
3562
+
3563
+
3564
+
3565
+
3566
+
3567
+
3568
+
3569
+
3570
+
3571
+
3572
+
3573
+
3574
+
3575
+
3576
+ π
3577
+
3578
+
3579
+
3580
+
3581
+
3582
+
3583
+
3584
+
3585
+
3586
+
3587
+
3588
+
3589
+
3590
+
3591
+
3592
+
3593
+
3594
+
3595
+ `
3596
+ 姿
3597
+
3598
+
3599
+
3600
+ ī
3601
+
3602
+
3603
+
3604
+
3605
+
3606
+
3607
+
3608
+
3609
+
3610
+
3611
+
3612
+
3613
+
3614
+
3615
+
3616
+
3617
+
3618
+
3619
+
3620
+
3621
+
3622
+
3623
+
3624
+ ò
3625
+
3626
+
3627
+
3628
+
3629
+
3630
+
3631
+
3632
+
3633
+
3634
+
3635
+
3636
+
3637
+
3638
+
3639
+
3640
+
3641
+
3642
+
3643
+
3644
+
3645
+
3646
+
3647
+
3648
+
3649
+
3650
+
3651
+ "
3652
+
3653
+
3654
+
3655
+
3656
+
3657
+
3658
+
3659
+
3660
+
3661
+
3662
+
3663
+
3664
+
3665
+
3666
+
3667
+
3668
+
3669
+
3670
+
3671
+
3672
+
3673
+
3674
+
3675
+
3676
+
3677
+
3678
+
3679
+
3680
+
3681
+
3682
+
3683
+
3684
+
3685
+
3686
+
3687
+
3688
+
3689
+
3690
+
3691
+
3692
+
3693
+
3694
+
3695
+
3696
+
3697
+
3698
+
3699
+
3700
+
3701
+
3702
+
3703
+
3704
+
3705
+
3706
+
3707
+
3708
+
3709
+
3710
+
3711
+
3712
+
3713
+
3714
+
3715
+
3716
+
3717
+
3718
+
3719
+
3720
+
3721
+
3722
+
3723
+
3724
+
3725
+
3726
+
3727
+
3728
+
3729
+
3730
+
3731
+
3732
+
3733
+
3734
+
3735
+
3736
+
3737
+
3738
+
3739
+
3740
+
3741
+
3742
+
3743
+
3744
+
3745
+
3746
+ ē
3747
+
3748
+
3749
+
3750
+
3751
+
3752
+
3753
+
3754
+
3755
+
3756
+
3757
+
3758
+
3759
+ 退
3760
+
3761
+
3762
+
3763
+
3764
+
3765
+
3766
+
3767
+
3768
+
3769
+
3770
+
3771
+
3772
+
3773
+
3774
+
3775
+
3776
+
3777
+
3778
+
3779
+
3780
+
3781
+
3782
+
3783
+
3784
+
3785
+
3786
+
3787
+
3788
+
3789
+
3790
+
3791
+
3792
+ ε
3793
+
3794
+
3795
+
3796
+
3797
+
3798
+ ě
3799
+
3800
+
3801
+
3802
+
3803
+
3804
+
3805
+
3806
+
3807
+
3808
+
3809
+
3810
+
3811
+
3812
+
3813
+
3814
+
3815
+
3816
+
3817
+
3818
+
3819
+
3820
+
3821
+
3822
+
3823
+
3824
+
3825
+
3826
+
3827
+
3828
+
3829
+
3830
+
3831
+
3832
+
3833
+
3834
+
3835
+
3836
+
3837
+
3838
+
3839
+
3840
+
3841
+
3842
+
3843
+
3844
+
3845
+
3846
+
3847
+
3848
+
3849
+
3850
+ }
3851
+
3852
+
3853
+
3854
+
3855
+
3856
+
3857
+
3858
+
3859
+
3860
+
3861
+
3862
+
3863
+
3864
+
3865
+
3866
+
3867
+
3868
+
3869
+
3870
+
3871
+
3872
+
3873
+
3874
+
3875
+
3876
+
3877
+
3878
+
3879
+
3880
+
3881
+
3882
+
3883
+
3884
+
3885
+
3886
+
3887
+
3888
+
3889
+ ǔ
3890
+
3891
+
3892
+
3893
+
3894
+
3895
+
3896
+
3897
+ è
3898
+
3899
+
3900
+
3901
+
3902
+
3903
+
3904
+
3905
+
3906
+
3907
+
3908
+
3909
+
3910
+
3911
+
3912
+
3913
+
3914
+
3915
+
3916
+
3917
+
3918
+
3919
+
3920
+
3921
+
3922
+ ´
3923
+
3924
+
3925
+ ���
3926
+
3927
+
3928
+
3929
+
3930
+
3931
+
3932
+
3933
+
3934
+
3935
+
3936
+
3937
+
3938
+
3939
+
3940
+
3941
+
3942
+
3943
+
3944
+
3945
+
3946
+
3947
+
3948
+
3949
+ Ē
3950
+
3951
+
3952
+
3953
+
3954
+
3955
+
3956
+
3957
+
3958
+
3959
+
3960
+
3961
+
3962
+
3963
+
3964
+
3965
+
3966
+
3967
+
3968
+
3969
+
3970
+
3971
+
3972
+
3973
+ ?
3974
+
3975
+
3976
+
3977
+
3978
+
3979
+
3980
+
3981
+
3982
+
3983
+
3984
+
3985
+
3986
+ ʌ
3987
+
3988
+
3989
+
3990
+
3991
+ É
3992
+
3993
+
3994
+
3995
+
3996
+
3997
+
3998
+
3999
+
4000
+
4001
+
4002
+
4003
+
4004
+
4005
+
4006
+
4007
+
4008
+ 齿
4009
+
4010
+
4011
+
4012
+
4013
+
4014
+
4015
+
4016
+
4017
+
4018
+
4019
+
4020
+
4021
+
4022
+
4023
+
4024
+
4025
+
4026
+
4027
+
4028
+
4029
+
4030
+
4031
+
4032
+
4033
+
4034
+
4035
+
4036
+
4037
+
4038
+
4039
+
4040
+
4041
+
4042
+
4043
+
4044
+
4045
+
4046
+
4047
+
4048
+
4049
+
4050
+
4051
+
4052
+
4053
+
4054
+
4055
+
4056
+
4057
+
4058
+
4059
+
4060
+
4061
+
4062
+
4063
+
4064
+
4065
+
4066
+
4067
+
4068
+
4069
+
4070
+
4071
+
4072
+
4073
+
4074
+ 鴿
4075
+
4076
+
4077
+
4078
+
4079
+
4080
+
4081
+
4082
+
4083
+
4084
+
4085
+
4086
+
4087
+
4088
+
4089
+
4090
+
4091
+
4092
+
4093
+
4094
+
4095
+
4096
+
4097
+ ú
4098
+
4099
+
4100
+
4101
+
4102
+
4103
+
4104
+
4105
+
4106
+
4107
+
4108
+
4109
+
4110
+
4111
+
4112
+
4113
+
4114
+
4115
+
4116
+
4117
+
4118
+
4119
+
4120
+
4121
+
4122
+
4123
+
4124
+
4125
+
4126
+
4127
+
4128
+
4129
+
4130
+
4131
+
4132
+
4133
+
4134
+ ˊ
4135
+
4136
+
4137
+
4138
+
4139
+
4140
+
4141
+
4142
+
4143
+
4144
+
4145
+
4146
+
4147
+
4148
+
4149
+
4150
+
4151
+
4152
+
4153
+
4154
+
4155
+
4156
+
4157
+
4158
+
4159
+
4160
+
4161
+
4162
+
4163
+
4164
+
4165
+
4166
+
4167
+
4168
+
4169
+
4170
+
4171
+
4172
+
4173
+
4174
+
4175
+
4176
+ $
4177
+ ;
4178
+ ^'''
models/text_recognition_crnn/demo.py CHANGED
@@ -41,7 +41,6 @@ parser.add_argument('--input', '-i', type=str, help='Usage: Set path to the inpu
41
  parser.add_argument('--model', '-m', type=str, default='text_recognition_CRNN_EN_2021sep.onnx', help='Usage: Set model path, defaults to text_recognition_CRNN_EN_2021sep.onnx.')
42
  parser.add_argument('--backend', '-b', type=int, default=backends[0], help=help_msg_backends.format(*backends))
43
  parser.add_argument('--target', '-t', type=int, default=targets[0], help=help_msg_targets.format(*targets))
44
- parser.add_argument('--charset', '-c', type=str, default='charset_36_EN.txt', help='Usage: Set the path to the charset file corresponding to the selected model.')
45
  parser.add_argument('--save', '-s', type=str, default=False, help='Usage: Set “True” to save a file with results. Invalid in case of camera input. Default will be set to “False”.')
46
  parser.add_argument('--vis', '-v', type=str2bool, default=True, help='Usage: Default will be set to “True” and will open a new window to show results. Set to “False” to stop visualizations from being shown. Invalid in case of camera input.')
47
  parser.add_argument('--width', type=int, default=736,
@@ -61,7 +60,7 @@ def visualize(image, boxes, texts, color=(0, 255, 0), isClosed=True, thickness=2
61
 
62
  if __name__ == '__main__':
63
  # Instantiate CRNN for text recognition
64
- recognizer = CRNN(modelPath=args.model, charsetPath=args.charset)
65
  # Instantiate DB for text detection
66
  detector = DB(modelPath='../text_detection_db/text_detection_DB_IC15_resnet18_2021sep.onnx',
67
  inputSize=[args.width, args.height],
 
41
  parser.add_argument('--model', '-m', type=str, default='text_recognition_CRNN_EN_2021sep.onnx', help='Usage: Set model path, defaults to text_recognition_CRNN_EN_2021sep.onnx.')
42
  parser.add_argument('--backend', '-b', type=int, default=backends[0], help=help_msg_backends.format(*backends))
43
  parser.add_argument('--target', '-t', type=int, default=targets[0], help=help_msg_targets.format(*targets))
 
44
  parser.add_argument('--save', '-s', type=str, default=False, help='Usage: Set “True” to save a file with results. Invalid in case of camera input. Default will be set to “False”.')
45
  parser.add_argument('--vis', '-v', type=str2bool, default=True, help='Usage: Default will be set to “True” and will open a new window to show results. Set to “False” to stop visualizations from being shown. Invalid in case of camera input.')
46
  parser.add_argument('--width', type=int, default=736,
 
60
 
61
  if __name__ == '__main__':
62
  # Instantiate CRNN for text recognition
63
+ recognizer = CRNN(modelPath=args.model)
64
  # Instantiate DB for text detection
65
  detector = DB(modelPath='../text_detection_db/text_detection_DB_IC15_resnet18_2021sep.onnx',
66
  inputSize=[args.width, args.height],
tools/eval/eval.py CHANGED
@@ -21,63 +21,63 @@ parser.add_argument("--dataset_root", "-dr", type=str, required=True, help="Root
21
  args = parser.parse_args()
22
 
23
  models = dict(
24
- mobilenetv1=dict(
25
- name="MobileNetV1",
26
- topic="image_classification",
27
- modelPath=os.path.join(root_dir, "models/image_classification_mobilenet/image_classification_mobilenetv1_2022apr.onnx"),
28
- topK=5),
29
- mobilenetv1_q=dict(
30
- name="MobileNetV1",
31
- topic="image_classification",
32
- modelPath=os.path.join(root_dir, "models/image_classification_mobilenet/image_classification_mobilenetv1_2022apr-int8-quantized.onnx"),
33
- topK=5),
34
- mobilenetv2=dict(
35
- name="MobileNetV2",
36
- topic="image_classification",
37
- modelPath=os.path.join(root_dir, "models/image_classification_mobilenet/image_classification_mobilenetv2_2022apr.onnx"),
38
- topK=5),
39
- mobilenetv2_q=dict(
40
- name="MobileNetV2",
41
- topic="image_classification",
42
- modelPath=os.path.join(root_dir, "models/image_classification_mobilenet/image_classification_mobilenetv2_2022apr-int8-quantized.onnx"),
43
- topK=5),
44
- ppresnet=dict(
45
- name="PPResNet",
46
- topic="image_classification",
47
- modelPath=os.path.join(root_dir, "models/image_classification_ppresnet/image_classification_ppresnet50_2022jan.onnx"),
48
- topK=5),
49
- ppresnet_q=dict(
50
- name="PPResNet",
51
- topic="image_classification",
52
- modelPath=os.path.join(root_dir, "models/image_classification_ppresnet/image_classification_ppresnet50_2022jan-act_int8-wt_int8-quantized.onnx"),
53
- topK=5),
54
- yunet=dict(
55
- name="YuNet",
56
- topic="face_detection",
57
- modelPath=os.path.join(root_dir, "models/face_detection_yunet/face_detection_yunet_2022mar.onnx"),
58
- topK=5000,
59
- confThreshold=0.3,
60
- nmsThreshold=0.45),
61
- yunet_q=dict(
62
- name="YuNet",
63
- topic="face_detection",
64
- modelPath=os.path.join(root_dir, "models/face_detection_yunet/face_detection_yunet_2022mar-act_int8-wt_int8-quantized.onnx"),
65
- topK=5000,
66
- confThreshold=0.3,
67
- nmsThreshold=0.45),
68
- sface=dict(
69
- name="SFace",
70
- topic="face_recognition",
71
- modelPath=os.path.join(root_dir, "models/face_recognition_sface/face_recognition_sface_2021dec.onnx")),
72
- sface_q=dict(
73
- name="SFace",
74
- topic="face_recognition",
75
- modelPath=os.path.join(root_dir, "models/face_recognition_sface/face_recognition_sface_2021dec-act_int8-wt_int8-quantized.onnx")),
76
- crnn=dict(
77
- name="CRNN",
78
- topic="text_recognition",
79
- modelPath=os.path.join(root_dir, "models/text_recognition_crnn/text_recognition_CRNN_EN_2021sep.onnx"),
80
- charsetPath=os.path.join(root_dir, "models/text_recognition_crnn/charset_36_EN.txt")),
81
  )
82
 
83
  datasets = dict(
@@ -107,7 +107,8 @@ def main(args):
107
 
108
  model_name = models[model_key].pop("name")
109
  model_topic = models[model_key].pop("topic")
110
- model = MODELS.get(model_name)(**models[model_key])
 
111
 
112
  # Instantiate dataset
113
  dataset_key = args.dataset.lower()
@@ -124,6 +125,5 @@ def main(args):
124
  dataset.eval(model)
125
  dataset.print_result()
126
 
127
-
128
  if __name__ == "__main__":
129
  main(args)
 
21
  args = parser.parse_args()
22
 
23
  models = dict(
24
+ mobilenetv1=dict(
25
+ name="MobileNetV1",
26
+ topic="image_classification",
27
+ modelPath=os.path.join(root_dir, "models/image_classification_mobilenet/image_classification_mobilenetv1_2022apr.onnx"),
28
+ topK=5),
29
+ mobilenetv1_q=dict(
30
+ name="MobileNetV1",
31
+ topic="image_classification",
32
+ modelPath=os.path.join(root_dir, "models/image_classification_mobilenet/image_classification_mobilenetv1_2022apr-int8-quantized.onnx"),
33
+ topK=5),
34
+ mobilenetv2=dict(
35
+ name="MobileNetV2",
36
+ topic="image_classification",
37
+ modelPath=os.path.join(root_dir, "models/image_classification_mobilenet/image_classification_mobilenetv2_2022apr.onnx"),
38
+ topK=5),
39
+ mobilenetv2_q=dict(
40
+ name="MobileNetV2",
41
+ topic="image_classification",
42
+ modelPath=os.path.join(root_dir, "models/image_classification_mobilenet/image_classification_mobilenetv2_2022apr-int8-quantized.onnx"),
43
+ topK=5),
44
+ ppresnet=dict(
45
+ name="PPResNet",
46
+ topic="image_classification",
47
+ modelPath=os.path.join(root_dir, "models/image_classification_ppresnet/image_classification_ppresnet50_2022jan.onnx"),
48
+ topK=5),
49
+ ppresnet_q=dict(
50
+ name="PPResNet",
51
+ topic="image_classification",
52
+ modelPath=os.path.join(root_dir, "models/image_classification_ppresnet/image_classification_ppresnet50_2022jan-act_int8-wt_int8-quantized.onnx"),
53
+ topK=5),
54
+ yunet=dict(
55
+ name="YuNet",
56
+ topic="face_detection",
57
+ modelPath=os.path.join(root_dir, "models/face_detection_yunet/face_detection_yunet_2022mar.onnx"),
58
+ topK=5000,
59
+ confThreshold=0.3,
60
+ nmsThreshold=0.45),
61
+ yunet_q=dict(
62
+ name="YuNet",
63
+ topic="face_detection",
64
+ modelPath=os.path.join(root_dir, "models/face_detection_yunet/face_detection_yunet_2022mar-act_int8-wt_int8-quantized.onnx"),
65
+ topK=5000,
66
+ confThreshold=0.3,
67
+ nmsThreshold=0.45),
68
+ sface=dict(
69
+ name="SFace",
70
+ topic="face_recognition",
71
+ modelPath=os.path.join(root_dir, "models/face_recognition_sface/face_recognition_sface_2021dec.onnx")),
72
+ sface_q=dict(
73
+ name="SFace",
74
+ topic="face_recognition",
75
+ modelPath=os.path.join(root_dir, "models/face_recognition_sface/face_recognition_sface_2021dec-act_int8-wt_int8-quantized.onnx")),
76
+ crnn=dict(
77
+ name="CRNN",
78
+ topic="text_recognition",
79
+ modelPath=os.path.join(root_dir, "models/text_recognition_crnn/text_recognition_CRNN_EN_2021sep.onnx"),
80
+ charsetPath=os.path.join(root_dir, "models/text_recognition_crnn/charset_36_EN.txt")),
81
  )
82
 
83
  datasets = dict(
 
107
 
108
  model_name = models[model_key].pop("name")
109
  model_topic = models[model_key].pop("topic")
110
+ model_handler, _ = MODELS.get(model_name)
111
+ model = model_handler(**models[model_key])
112
 
113
  # Instantiate dataset
114
  dataset_key = args.dataset.lower()
 
125
  dataset.eval(model)
126
  dataset.print_result()
127
 
 
128
  if __name__ == "__main__":
129
  main(args)