diff --git a/models/face_detection_yunet/demo.py b/models/face_detection_yunet/demo.py index 9c3ad4c2..52d36b89 100644 --- a/models/face_detection_yunet/demo.py +++ b/models/face_detection_yunet/demo.py @@ -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.') diff --git a/models/face_recognition_sface/demo.py b/models/face_recognition_sface/demo.py index ea7dd8b5..48b0e772 100644 --- a/models/face_recognition_sface/demo.py +++ b/models/face_recognition_sface/demo.py @@ -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.') @@ -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, diff --git a/models/human_segmentation_pphumanseg/demo.py b/models/human_segmentation_pphumanseg/demo.py index 6c7df54d..0cf73dac 100644 --- a/models/human_segmentation_pphumanseg/demo.py +++ b/models/human_segmentation_pphumanseg/demo.py @@ -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() diff --git a/models/image_classification_ppresnet/demo.py b/models/image_classification_ppresnet/demo.py index 5a83e016..74d014ca 100644 --- a/models/image_classification_ppresnet/demo.py +++ b/models/image_classification_ppresnet/demo.py @@ -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__': diff --git a/models/text_detection_db/demo.py b/models/text_detection_db/demo.py index 4a208095..a933cc8c 100644 --- a/models/text_detection_db/demo.py +++ b/models/text_detection_db/demo.py @@ -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, diff --git a/models/text_recognition_crnn/demo.py b/models/text_recognition_crnn/demo.py index 4849d2f9..68d32aca 100644 --- a/models/text_recognition_crnn/demo.py +++ b/models/text_recognition_crnn/demo.py @@ -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, @@ -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,