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 models/face_detection_yunet/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def str2bool(v):

parser = argparse.ArgumentParser(description='YuNet: A Fast and Accurate CNN-based Face Detector (https://github.com/ShiqiYu/libfacedetection).')
parser.add_argument('--input', '-i', type=str, help='Path to the input image. Omit for using default camera.')
parser.add_argument('--model', '-m', type=str, default='face_detection_yunet.onnx', help='Path to the model.')
parser.add_argument('--model', '-m', type=str, default='face_detection_yunet_2021sep.onnx', help='Path to the model.')
parser.add_argument('--conf_threshold', type=float, default=0.9, help='Filter out faces of confidence < conf_threshold.')
parser.add_argument('--nms_threshold', type=float, default=0.3, help='Suppress bounding boxes of iou >= nms_threshold.')
parser.add_argument('--top_k', type=int, default=5000, help='Keep top_k bounding boxes before NMS.')
Expand Down
4 changes: 2 additions & 2 deletions models/face_recognition_sface/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def str2bool(v):
description="SFace: Sigmoid-Constrained Hypersphere Loss for Robust Face Recognition (https://ieeexplore.ieee.org/document/9318547)")
parser.add_argument('--input1', '-i1', type=str, help='Path to the input image 1.')
parser.add_argument('--input2', '-i2', type=str, help='Path to the input image 2.')
parser.add_argument('--model', '-m', type=str, default='face_recognition_sface.onnx', help='Path to the model.')
parser.add_argument('--model', '-m', type=str, default='face_recognition_sface_2021sep.onnx', help='Path to the model.')
parser.add_argument('--dis_type', type=int, choices=[0, 1], default=0, help='Distance type. \'0\': cosine, \'1\': norm_l1.')
parser.add_argument('--save', '-s', type=str, default=False, help='Set true to save results. This flag is invalid when using camera.')
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.')
Expand All @@ -37,7 +37,7 @@ def str2bool(v):
# Instantiate SFace for face recognition
recognizer = SFace(modelPath=args.model, disType=args.dis_type)
# Instantiate YuNet for face detection
detector = YuNet(modelPath='../face_detection_yunet/face_detection_yunet.onnx',
detector = YuNet(modelPath='../face_detection_yunet/face_detection_yunet_2021sep.onnx',
inputSize=[320, 320],
confThreshold=0.9,
nmsThreshold=0.3,
Expand Down
2 changes: 1 addition & 1 deletion models/human_segmentation_pphumanseg/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def str2bool(v):

parser = argparse.ArgumentParser(description='PPHumanSeg (https://github.com/PaddlePaddle/PaddleSeg/tree/release/2.2/contrib/PP-HumanSeg)')
parser.add_argument('--input', '-i', type=str, help='Path to the input image. Omit for using default camera.')
parser.add_argument('--model', '-m', type=str, default='human_segmentation_pphumanseg.onnx', help='Path to the model.')
parser.add_argument('--model', '-m', type=str, default='human_segmentation_pphumanseg_2021oct.onnx', help='Path to the model.')
parser.add_argument('--save', '-s', type=str, default=False, help='Set true to save results. This flag is invalid when using camera.')
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.')
args = parser.parse_args()
Expand Down
2 changes: 1 addition & 1 deletion models/image_classification_ppresnet/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ 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.onnx', help='Path to the model.')
parser.add_argument('--model', '-m', type=str, default='image_classification_ppresnet50_2021oct.onnx', help='Path to the model.')
args = parser.parse_args()

if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion models/text_detection_db/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def str2bool(v):

parser = argparse.ArgumentParser(description='Real-time Scene Text Detection with Differentiable Binarization (https://arxiv.org/abs/1911.08947).')
parser.add_argument('--input', '-i', type=str, help='Path to the input image. Omit for using default camera.')
parser.add_argument('--model', '-m', type=str, default='text_detection_DB_TD500_resnet18.onnx', help='Path to the model.')
parser.add_argument('--model', '-m', type=str, default='text_detection_DB_TD500_resnet18_2021sep.onnx', help='Path to the model.')
parser.add_argument('--width', type=int, default=736,
help='Preprocess input image by resizing to a specific width. It should be multiple by 32.')
parser.add_argument('--height', type=int, default=736,
Expand Down
4 changes: 2 additions & 2 deletions models/text_recognition_crnn/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def str2bool(v):
parser = argparse.ArgumentParser(
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)")
parser.add_argument('--input', '-i', type=str, help='Path to the input image. Omit for using default camera.')
parser.add_argument('--model', '-m', type=str, default='text_recognition_CRNN_VGG_BiLSTM_CTC.onnx', help='Path to the model.')
parser.add_argument('--model', '-m', type=str, default='text_recognition_CRNN_VGG_BiLSTM_CTC_2021sep.onnx', help='Path to the model.')
parser.add_argument('--width', type=int, default=736,
help='The width of input image being sent to the text detector.')
parser.add_argument('--height', type=int, default=736,
Expand All @@ -48,7 +48,7 @@ def visualize(image, boxes, texts, color=(0, 255, 0), isClosed=True, thickness=2
# Instantiate CRNN for text recognition
recognizer = CRNN(modelPath=args.model)
# Instantiate DB for text detection
detector = DB(modelPath='../text_detection_db/text_detection_db.onnx',
detector = DB(modelPath='../text_detection_db/text_detection_DB_IC15_resnet18_2021sep.onnx',
inputSize=[args.width, args.height],
binaryThreshold=0.3,
polygonThreshold=0.5,
Expand Down