diff --git a/README.md b/README.md index bf902296..c92b0580 100644 --- a/README.md +++ b/README.md @@ -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 | --- | diff --git a/benchmark/config/face_detection_yunet.yaml b/benchmark/config/face_detection_yunet.yaml index 2b034630..b6fbb6bc 100644 --- a/benchmark/config/face_detection_yunet.yaml +++ b/benchmark/config/face_detection_yunet.yaml @@ -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] diff --git a/benchmark/config/face_recognition_sface.yaml b/benchmark/config/face_recognition_sface.yaml index 269f1ccc..6bbda424 100644 --- a/benchmark/config/face_recognition_sface.yaml +++ b/benchmark/config/face_recognition_sface.yaml @@ -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 diff --git a/benchmark/download_data.py b/benchmark/download_data.py index 5d7a4323..275b27f2 100644 --- a/benchmark/download_data.py +++ b/benchmark/download_data.py @@ -165,10 +165,14 @@ def get_confirm_token(response): # in case of large files # 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 @@ def get_confirm_token(response): # in case of large files 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__': diff --git a/models/image_classification_ppresnet/demo.py b/models/image_classification_ppresnet/demo.py index 74d014ca..74d832ec 100644 --- a/models/image_classification_ppresnet/demo.py +++ b/models/image_classification_ppresnet/demo.py @@ -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)