Yuantao Feng commited on
Commit
f134c2e
·
1 Parent(s): 411de07

Bug fixes and corrections (#33)

Browse files

* add (ms) to each hardware header

* add a argument for label path

* correct filenames for face detection

* add a download link for face recognition data

* fix path to face recognition data

* correct shasum for face_detection.zip

* fix filename for person_reid benchmark data package

README.md CHANGED
@@ -14,7 +14,7 @@ Guidelines:
14
 
15
  ## Models & Benchmark Results
16
 
17
- | Model | Input Size | INTEL-CPU | RPI-CPU | JETSON-GPU | D1-CPU |
18
  |-------|------------|-----------|---------|------------|--------|
19
  | [YuNet](./models/face_detection_yunet) | 160x120 | 1.45 | 6.22 | 12.18 | 86.69 |
20
  | [SFace](./models/face_recognition_sface) | 112x112 | 8.65 | 99.20 | 24.88 | --- |
 
14
 
15
  ## Models & Benchmark Results
16
 
17
+ | Model | Input Size | INTEL-CPU (ms) | RPI-CPU (ms) | JETSON-GPU (ms) | D1-CPU (ms) |
18
  |-------|------------|-----------|---------|------------|--------|
19
  | [YuNet](./models/face_detection_yunet) | 160x120 | 1.45 | 6.22 | 12.18 | 86.69 |
20
  | [SFace](./models/face_recognition_sface) | 112x112 | 8.65 | 99.20 | 24.88 | --- |
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]
 
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]
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
 
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
benchmark/download_data.py CHANGED
@@ -165,10 +165,14 @@ def GDrive(gid):
165
 
166
  # Data will be downloaded and extracted to ./data by default
167
  data_downloaders = dict(
168
- face=Downloader(name='face',
169
  url='https://drive.google.com/u/0/uc?id=1lOAliAIeOv4olM65YDzE55kn6XjiX2l6&export=download',
170
- sha='8397f115c0d4447e55ea05488579e71a813e2691',
171
- filename='face.zip'),
 
 
 
 
172
  text=Downloader(name='text',
173
  url='https://drive.google.com/u/0/uc?id=1lTQdZUau7ujHBqp0P6M1kccnnJgO-dRj&export=download',
174
  sha='a40cf095ceb77159ddd2a5902f3b4329696dd866',
@@ -192,7 +196,7 @@ data_downloaders = dict(
192
  person_reid=Downloader(name='person_reid',
193
  url='https://drive.google.com/u/0/uc?id=1G8FkfVo5qcuyMkjSs4EA6J5e16SWDGI2&export=download',
194
  sha='5b741fbf34c1fbcf59cad8f2a65327a5899e66f1',
195
- filename='person_reid')
196
  )
197
 
198
  if __name__ == '__main__':
 
165
 
166
  # Data will be downloaded and extracted to ./data by default
167
  data_downloaders = dict(
168
+ face_detection=Downloader(name='face_detection',
169
  url='https://drive.google.com/u/0/uc?id=1lOAliAIeOv4olM65YDzE55kn6XjiX2l6&export=download',
170
+ sha='0ba67a9cfd60f7fdb65cdb7c55a1ce76c1193df1',
171
+ filename='face_detection.zip'),
172
+ face_recognition=Downloader(name='face_recognition',
173
+ url='https://drive.google.com/u/0/uc?id=1BRIozREIzqkm_aMQ581j93oWoS-6TLST&export=download',
174
+ sha='03892b9036c58d9400255ff73858caeec1f46609',
175
+ filename='face_recognition.zip'),
176
  text=Downloader(name='text',
177
  url='https://drive.google.com/u/0/uc?id=1lTQdZUau7ujHBqp0P6M1kccnnJgO-dRj&export=download',
178
  sha='a40cf095ceb77159ddd2a5902f3b4329696dd866',
 
196
  person_reid=Downloader(name='person_reid',
197
  url='https://drive.google.com/u/0/uc?id=1G8FkfVo5qcuyMkjSs4EA6J5e16SWDGI2&export=download',
198
  sha='5b741fbf34c1fbcf59cad8f2a65327a5899e66f1',
199
+ filename='person_reid.zip')
200
  )
201
 
202
  if __name__ == '__main__':
models/image_classification_ppresnet/demo.py CHANGED
@@ -22,11 +22,12 @@ def str2bool(v):
22
  parser = argparse.ArgumentParser(description='Deep Residual Learning for Image Recognition (https://arxiv.org/abs/1512.03385, https://github.com/PaddlePaddle/PaddleHub)')
23
  parser.add_argument('--input', '-i', type=str, help='Path to the input image.')
24
  parser.add_argument('--model', '-m', type=str, default='image_classification_ppresnet50_2021oct.onnx', help='Path to the model.')
 
25
  args = parser.parse_args()
26
 
27
  if __name__ == '__main__':
28
  # Instantiate ResNet
29
- model = PPResNet(modelPath=args.model)
30
 
31
  # Read image and get a 224x224 crop from a 256x256 resized
32
  image = cv.imread(args.input)
 
22
  parser = argparse.ArgumentParser(description='Deep Residual Learning for Image Recognition (https://arxiv.org/abs/1512.03385, https://github.com/PaddlePaddle/PaddleHub)')
23
  parser.add_argument('--input', '-i', type=str, help='Path to the input image.')
24
  parser.add_argument('--model', '-m', type=str, default='image_classification_ppresnet50_2021oct.onnx', help='Path to the model.')
25
+ parser.add_argument('--label', '-l', type=str, default='./imagenet_labels.txt', help='Path to the dataset labels.')
26
  args = parser.parse_args()
27
 
28
  if __name__ == '__main__':
29
  # Instantiate ResNet
30
+ model = PPResNet(modelPath=args.model, labelPath=args.label)
31
 
32
  # Read image and get a 224x224 crop from a 256x256 resized
33
  image = cv.imread(args.input)