Yuantao Feng
commited on
Commit
·
8e0120b
1
Parent(s):
eeebc3f
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
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)
|