Wanli commited on
Commit
c920270
·
1 Parent(s): b7e21c2

update accuracy evaluation scripts (#184)

Browse files

* update accuracy evaluation scripts

* remove labels of image classification

Files changed (2) hide show
  1. tools/eval/README.md +2 -2
  2. tools/eval/eval.py +15 -11
tools/eval/README.md CHANGED
@@ -5,7 +5,7 @@ Make sure you have the following packages installed:
5
  ```shell
6
  pip install tqdm
7
  pip install scikit-learn
8
- pip install scipy
9
  ```
10
 
11
  Generally speaking, evaluation can be done with the following command:
@@ -27,7 +27,7 @@ Supported datasets:
27
 
28
  ### Prepare data
29
 
30
- Please visit https://image-net.org/ to download the ImageNet dataset and [the labels from caffe](http://dl.caffe.berkeleyvision.org/caffe_ilsvrc12.tar.gz). Organize files as follow:
31
 
32
  ```shell
33
  $ tree -L 2 /path/to/imagenet
 
5
  ```shell
6
  pip install tqdm
7
  pip install scikit-learn
8
+ pip install scipy==1.8.1
9
  ```
10
 
11
  Generally speaking, evaluation can be done with the following command:
 
27
 
28
  ### Prepare data
29
 
30
+ Please visit https://image-net.org/ to download the ImageNet dataset (only need images in `ILSVRC/Data/CLS-LOC/val`) and [the labels from caffe](http://dl.caffe.berkeleyvision.org/caffe_ilsvrc12.tar.gz). Organize files as follow:
31
 
32
  ```shell
33
  $ tree -L 2 /path/to/imagenet
tools/eval/eval.py CHANGED
@@ -22,24 +22,24 @@ 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",
@@ -49,7 +49,7 @@ models = dict(
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",
@@ -72,19 +72,23 @@ models = dict(
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
  pphumanseg=dict(
81
  name="PPHumanSeg",
82
  topic="human_segmentation",
83
- modelPath=os.path.join(root_dir, "models/human_segmentation_pphumanseg/human_segmentation_pphumanseg_2021oct.onnx")),
84
  pphumanseg_q=dict(
85
  name="PPHumanSeg",
86
  topic="human_segmentation",
87
- modelPath=os.path.join(root_dir, "models/human_segmentation_pphumanseg/human_segmentation_pphumanseg_2021oct-act_int8-wt_int8-quantized.onnx")),
88
  )
89
 
90
  datasets = dict(
 
22
 
23
  models = dict(
24
  mobilenetv1=dict(
25
+ name="MobileNet",
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="MobileNet",
31
  topic="image_classification",
32
+ modelPath=os.path.join(root_dir, "models/image_classification_mobilenet/image_classification_mobilenetv1_2022apr_int8.onnx"),
33
  topK=5),
34
  mobilenetv2=dict(
35
+ name="MobileNet",
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="MobileNet",
41
  topic="image_classification",
42
+ modelPath=os.path.join(root_dir, "models/image_classification_mobilenet/image_classification_mobilenetv2_2022apr_int8.onnx"),
43
  topK=5),
44
  ppresnet=dict(
45
  name="PPResNet",
 
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_int8.onnx"),
53
  topK=5),
54
  yunet=dict(
55
  name="YuNet",
 
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_int8.onnx")),
76
+ crnn_en=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
+ crnn_en_q=dict(
81
+ name="CRNN",
82
+ topic="text_recognition",
83
+ modelPath=os.path.join(root_dir, "models/text_recognition_crnn/text_recognition_CRNN_EN_2022oct_int8.onnx")),
84
  pphumanseg=dict(
85
  name="PPHumanSeg",
86
  topic="human_segmentation",
87
+ modelPath=os.path.join(root_dir, "models/human_segmentation_pphumanseg/human_segmentation_pphumanseg_2023mar.onnx")),
88
  pphumanseg_q=dict(
89
  name="PPHumanSeg",
90
  topic="human_segmentation",
91
+ modelPath=os.path.join(root_dir, "models/human_segmentation_pphumanseg/human_segmentation_pphumanseg_2023mar_int8.onnx")),
92
  )
93
 
94
  datasets = dict(