Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | --- |
Expand Down
2 changes: 1 addition & 1 deletion benchmark/config/face_detection_yunet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion benchmark/config/face_recognition_sface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 8 additions & 4 deletions benchmark/download_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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__':
Expand Down
3 changes: 2 additions & 1 deletion models/image_classification_ppresnet/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down