Skip to content

Commit 25e3347

Browse files
authored
correct default values of model filenames in demo scripts (#11)
1 parent bdbc751 commit 25e3347

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

models/face_detection_yunet/demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def str2bool(v):
2121

2222
parser = argparse.ArgumentParser(description='YuNet: A Fast and Accurate CNN-based Face Detector (https://github.com/ShiqiYu/libfacedetection).')
2323
parser.add_argument('--input', '-i', type=str, help='Path to the input image. Omit for using default camera.')
24-
parser.add_argument('--model', '-m', type=str, default='face_detection_yunet.onnx', help='Path to the model.')
24+
parser.add_argument('--model', '-m', type=str, default='face_detection_yunet_2021sep.onnx', help='Path to the model.')
2525
parser.add_argument('--conf_threshold', type=float, default=0.9, help='Filter out faces of confidence < conf_threshold.')
2626
parser.add_argument('--nms_threshold', type=float, default=0.3, help='Suppress bounding boxes of iou >= nms_threshold.')
2727
parser.add_argument('--top_k', type=int, default=5000, help='Keep top_k bounding boxes before NMS.')

models/face_recognition_sface/demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def str2bool(v):
2727
description="SFace: Sigmoid-Constrained Hypersphere Loss for Robust Face Recognition (https://ieeexplore.ieee.org/document/9318547)")
2828
parser.add_argument('--input1', '-i1', type=str, help='Path to the input image 1.')
2929
parser.add_argument('--input2', '-i2', type=str, help='Path to the input image 2.')
30-
parser.add_argument('--model', '-m', type=str, default='face_recognition_sface.onnx', help='Path to the model.')
30+
parser.add_argument('--model', '-m', type=str, default='face_recognition_sface_2021sep.onnx', help='Path to the model.')
3131
parser.add_argument('--dis_type', type=int, choices=[0, 1], default=0, help='Distance type. \'0\': cosine, \'1\': norm_l1.')
3232
parser.add_argument('--save', '-s', type=str, default=False, help='Set true to save results. This flag is invalid when using camera.')
3333
parser.add_argument('--vis', '-v', type=str2bool, default=True, help='Set true to open a window for result visualization. This flag is invalid when using camera.')
@@ -37,7 +37,7 @@ def str2bool(v):
3737
# Instantiate SFace for face recognition
3838
recognizer = SFace(modelPath=args.model, disType=args.dis_type)
3939
# Instantiate YuNet for face detection
40-
detector = YuNet(modelPath='../face_detection_yunet/face_detection_yunet.onnx',
40+
detector = YuNet(modelPath='../face_detection_yunet/face_detection_yunet_2021sep.onnx',
4141
inputSize=[320, 320],
4242
confThreshold=0.9,
4343
nmsThreshold=0.3,

models/human_segmentation_pphumanseg/demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def str2bool(v):
2121

2222
parser = argparse.ArgumentParser(description='PPHumanSeg (https://github.com/PaddlePaddle/PaddleSeg/tree/release/2.2/contrib/PP-HumanSeg)')
2323
parser.add_argument('--input', '-i', type=str, help='Path to the input image. Omit for using default camera.')
24-
parser.add_argument('--model', '-m', type=str, default='human_segmentation_pphumanseg.onnx', help='Path to the model.')
24+
parser.add_argument('--model', '-m', type=str, default='human_segmentation_pphumanseg_2021oct.onnx', help='Path to the model.')
2525
parser.add_argument('--save', '-s', type=str, default=False, help='Set true to save results. This flag is invalid when using camera.')
2626
parser.add_argument('--vis', '-v', type=str2bool, default=True, help='Set true to open a window for result visualization. This flag is invalid when using camera.')
2727
args = parser.parse_args()

models/image_classification_ppresnet/demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def str2bool(v):
2121

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.')
24-
parser.add_argument('--model', '-m', type=str, default='image_classification_ppresnet50.onnx', help='Path to the model.')
24+
parser.add_argument('--model', '-m', type=str, default='image_classification_ppresnet50_2021oct.onnx', help='Path to the model.')
2525
args = parser.parse_args()
2626

2727
if __name__ == '__main__':

models/text_detection_db/demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def str2bool(v):
2121

2222
parser = argparse.ArgumentParser(description='Real-time Scene Text Detection with Differentiable Binarization (https://arxiv.org/abs/1911.08947).')
2323
parser.add_argument('--input', '-i', type=str, help='Path to the input image. Omit for using default camera.')
24-
parser.add_argument('--model', '-m', type=str, default='text_detection_DB_TD500_resnet18.onnx', help='Path to the model.')
24+
parser.add_argument('--model', '-m', type=str, default='text_detection_DB_TD500_resnet18_2021sep.onnx', help='Path to the model.')
2525
parser.add_argument('--width', type=int, default=736,
2626
help='Preprocess input image by resizing to a specific width. It should be multiple by 32.')
2727
parser.add_argument('--height', type=int, default=736,

models/text_recognition_crnn/demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def str2bool(v):
2626
parser = argparse.ArgumentParser(
2727
description="An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition (https://arxiv.org/abs/1507.05717)")
2828
parser.add_argument('--input', '-i', type=str, help='Path to the input image. Omit for using default camera.')
29-
parser.add_argument('--model', '-m', type=str, default='text_recognition_CRNN_VGG_BiLSTM_CTC.onnx', help='Path to the model.')
29+
parser.add_argument('--model', '-m', type=str, default='text_recognition_CRNN_VGG_BiLSTM_CTC_2021sep.onnx', help='Path to the model.')
3030
parser.add_argument('--width', type=int, default=736,
3131
help='The width of input image being sent to the text detector.')
3232
parser.add_argument('--height', type=int, default=736,
@@ -48,7 +48,7 @@ def visualize(image, boxes, texts, color=(0, 255, 0), isClosed=True, thickness=2
4848
# Instantiate CRNN for text recognition
4949
recognizer = CRNN(modelPath=args.model)
5050
# Instantiate DB for text detection
51-
detector = DB(modelPath='../text_detection_db/text_detection_db.onnx',
51+
detector = DB(modelPath='../text_detection_db/text_detection_DB_IC15_resnet18_2021sep.onnx',
5252
inputSize=[args.width, args.height],
5353
binaryThreshold=0.3,
5454
polygonThreshold=0.5,

0 commit comments

Comments
 (0)