提交 627508b5 编写于 作者: Y Yuantao Feng 提交者: GitHub

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
上级 b191caa9
......@@ -14,7 +14,7 @@ Guidelines:
## Models & Benchmark Results
| Model | Input Size | INTEL-CPU | RPI-CPU | JETSON-GPU | D1-CPU |
| Model | Input Size | INTEL-CPU (ms) | RPI-CPU (ms) | JETSON-GPU (ms) | D1-CPU (ms) |
|-------|------------|-----------|---------|------------|--------|
| [YuNet](./models/face_detection_yunet) | 160x120 | 1.45 | 6.22 | 12.18 | 86.69 |
| [SFace](./models/face_recognition_sface) | 112x112 | 8.65 | 99.20 | 24.88 | --- |
......
......@@ -2,7 +2,7 @@ Benchmark:
name: "Face Detection Benchmark"
type: "Detection"
data:
path: "benchmark/data/face/detection"
path: "benchmark/data/face_detection"
files: ["group.jpg", "concerts.jpg", "dance.jpg"]
sizes: # [[w1, h1], ...], Omit to run at original scale
- [160, 120]
......
......@@ -2,7 +2,7 @@ Benchmark:
name: "Face Recognition Benchmark"
type: "Recognition"
data:
path: "benchmark/data/face/recognition"
path: "benchmark/data/face_recognition"
files: ["Aaron_Tippin_0001.jpg", "Alvaro_Uribe_0028.jpg", "Alvaro_Uribe_0029.jpg", "Jose_Luis_Rodriguez_Zapatero_0001.jpg"]
metric: # 'sizes' is omitted since this model requires input of fixed size
warmup: 30
......
......@@ -165,10 +165,14 @@ def GDrive(gid):
# Data will be downloaded and extracted to ./data by default
data_downloaders = dict(
face=Downloader(name='face',
face_detection=Downloader(name='face_detection',
url='https://drive.google.com/u/0/uc?id=1lOAliAIeOv4olM65YDzE55kn6XjiX2l6&export=download',
sha='8397f115c0d4447e55ea05488579e71a813e2691',
filename='face.zip'),
sha='0ba67a9cfd60f7fdb65cdb7c55a1ce76c1193df1',
filename='face_detection.zip'),
face_recognition=Downloader(name='face_recognition',
url='https://drive.google.com/u/0/uc?id=1BRIozREIzqkm_aMQ581j93oWoS-6TLST&export=download',
sha='03892b9036c58d9400255ff73858caeec1f46609',
filename='face_recognition.zip'),
text=Downloader(name='text',
url='https://drive.google.com/u/0/uc?id=1lTQdZUau7ujHBqp0P6M1kccnnJgO-dRj&export=download',
sha='a40cf095ceb77159ddd2a5902f3b4329696dd866',
......@@ -192,7 +196,7 @@ data_downloaders = dict(
person_reid=Downloader(name='person_reid',
url='https://drive.google.com/u/0/uc?id=1G8FkfVo5qcuyMkjSs4EA6J5e16SWDGI2&export=download',
sha='5b741fbf34c1fbcf59cad8f2a65327a5899e66f1',
filename='person_reid')
filename='person_reid.zip')
)
if __name__ == '__main__':
......
......@@ -22,11 +22,12 @@ def str2bool(v):
parser = argparse.ArgumentParser(description='Deep Residual Learning for Image Recognition (https://arxiv.org/abs/1512.03385, https://github.com/PaddlePaddle/PaddleHub)')
parser.add_argument('--input', '-i', type=str, help='Path to the input image.')
parser.add_argument('--model', '-m', type=str, default='image_classification_ppresnet50_2021oct.onnx', help='Path to the model.')
parser.add_argument('--label', '-l', type=str, default='./imagenet_labels.txt', help='Path to the dataset labels.')
args = parser.parse_args()
if __name__ == '__main__':
# Instantiate ResNet
model = PPResNet(modelPath=args.model)
model = PPResNet(modelPath=args.model, labelPath=args.label)
# Read image and get a 224x224 crop from a 256x256 resized
image = cv.imread(args.input)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册