Skip to content

Commit 270be2b

Browse files
authored
Bug fixes and corrections (#33)
* 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
1 parent 19bfa61 commit 270be2b

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Guidelines:
1414

1515
## Models & Benchmark Results
1616

17-
| Model | Input Size | INTEL-CPU | RPI-CPU | JETSON-GPU | D1-CPU |
17+
| Model | Input Size | INTEL-CPU (ms) | RPI-CPU (ms) | JETSON-GPU (ms) | D1-CPU (ms) |
1818
|-------|------------|-----------|---------|------------|--------|
1919
| [YuNet](./models/face_detection_yunet) | 160x120 | 1.45 | 6.22 | 12.18 | 86.69 |
2020
| [SFace](./models/face_recognition_sface) | 112x112 | 8.65 | 99.20 | 24.88 | --- |

benchmark/config/face_detection_yunet.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Benchmark:
22
name: "Face Detection Benchmark"
33
type: "Detection"
44
data:
5-
path: "benchmark/data/face/detection"
5+
path: "benchmark/data/face_detection"
66
files: ["group.jpg", "concerts.jpg", "dance.jpg"]
77
sizes: # [[w1, h1], ...], Omit to run at original scale
88
- [160, 120]

benchmark/config/face_recognition_sface.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Benchmark:
22
name: "Face Recognition Benchmark"
33
type: "Recognition"
44
data:
5-
path: "benchmark/data/face/recognition"
5+
path: "benchmark/data/face_recognition"
66
files: ["Aaron_Tippin_0001.jpg", "Alvaro_Uribe_0028.jpg", "Alvaro_Uribe_0029.jpg", "Jose_Luis_Rodriguez_Zapatero_0001.jpg"]
77
metric: # 'sizes' is omitted since this model requires input of fixed size
88
warmup: 30

benchmark/download_data.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,14 @@ def get_confirm_token(response): # in case of large files
165165

166166
# Data will be downloaded and extracted to ./data by default
167167
data_downloaders = dict(
168-
face=Downloader(name='face',
168+
face_detection=Downloader(name='face_detection',
169169
url='https://drive.google.com/u/0/uc?id=1lOAliAIeOv4olM65YDzE55kn6XjiX2l6&export=download',
170-
sha='8397f115c0d4447e55ea05488579e71a813e2691',
171-
filename='face.zip'),
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'),
172176
text=Downloader(name='text',
173177
url='https://drive.google.com/u/0/uc?id=1lTQdZUau7ujHBqp0P6M1kccnnJgO-dRj&export=download',
174178
sha='a40cf095ceb77159ddd2a5902f3b4329696dd866',
@@ -192,7 +196,7 @@ def get_confirm_token(response): # in case of large files
192196
person_reid=Downloader(name='person_reid',
193197
url='https://drive.google.com/u/0/uc?id=1G8FkfVo5qcuyMkjSs4EA6J5e16SWDGI2&export=download',
194198
sha='5b741fbf34c1fbcf59cad8f2a65327a5899e66f1',
195-
filename='person_reid')
199+
filename='person_reid.zip')
196200
)
197201

198202
if __name__ == '__main__':

models/image_classification_ppresnet/demo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ def str2bool(v):
2222
parser = argparse.ArgumentParser(description='Deep Residual Learning for Image Recognition (https://arxiv.org/abs/1512.03385, https://github.com/PaddlePaddle/PaddleHub)')
2323
parser.add_argument('--input', '-i', type=str, help='Path to the input image.')
2424
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.')
2526
args = parser.parse_args()
2627

2728
if __name__ == '__main__':
2829
# Instantiate ResNet
29-
model = PPResNet(modelPath=args.model)
30+
model = PPResNet(modelPath=args.model, labelPath=args.label)
3031

3132
# Read image and get a 224x224 crop from a 256x256 resized
3233
image = cv.imread(args.input)

0 commit comments

Comments
 (0)