Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

set --image_dir to be required #13896

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

GreatV
Copy link
Collaborator

@GreatV GreatV commented Sep 23, 2024

No description provided.

@GreatV
Copy link
Collaborator Author

GreatV commented Sep 23, 2024

修改前:

paddleocr

Traceback (most recent call last):
  File "/home/greatx/miniconda3/envs/ppocr/bin/paddleocr", line 8, in <module>
    sys.exit(main())
  File "/home/greatx/repos/PaddleOCR/paddleocr.py", line 923, in main
    image_file_list = get_image_file_list(args.image_dir)
  File "/home/greatx/repos/PaddleOCR/ppocr/utils/utility.py", line 80, in get_image_file_list
    raise Exception("not found any img file in {}".format(img_file))
Exception: not found any img file in None

修改后:

paddleocr

usage: paddleocr [-h] [--use_gpu USE_GPU] [--use_xpu USE_XPU] [--use_npu USE_NPU] [--use_mlu USE_MLU] [--ir_optim IR_OPTIM]
                 [--use_tensorrt USE_TENSORRT] [--min_subgraph_size MIN_SUBGRAPH_SIZE] [--precision PRECISION]
                 [--gpu_mem GPU_MEM] [--gpu_id GPU_ID] --image_dir IMAGE_DIR [--page_num PAGE_NUM]
                 [--det_algorithm DET_ALGORITHM] [--det_model_dir DET_MODEL_DIR] [--det_limit_side_len DET_LIMIT_SIDE_LEN]
                 [--det_limit_type DET_LIMIT_TYPE] [--det_box_type DET_BOX_TYPE] [--det_db_thresh DET_DB_THRESH]
                 [--det_db_box_thresh DET_DB_BOX_THRESH] [--det_db_unclip_ratio DET_DB_UNCLIP_RATIO]
                 [--max_batch_size MAX_BATCH_SIZE] [--use_dilation USE_DILATION] [--det_db_score_mode DET_DB_SCORE_MODE]
                 [--det_east_score_thresh DET_EAST_SCORE_THRESH] [--det_east_cover_thresh DET_EAST_COVER_THRESH]
                 [--det_east_nms_thresh DET_EAST_NMS_THRESH] [--det_sast_score_thresh DET_SAST_SCORE_THRESH]
                 [--det_sast_nms_thresh DET_SAST_NMS_THRESH] [--det_pse_thresh DET_PSE_THRESH]
                 [--det_pse_box_thresh DET_PSE_BOX_THRESH] [--det_pse_min_area DET_PSE_MIN_AREA] [--det_pse_scale DET_PSE_SCALE]
                 [--scales SCALES] [--alpha ALPHA] [--beta BETA] [--fourier_degree FOURIER_DEGREE]
                 [--rec_algorithm REC_ALGORITHM] [--rec_model_dir REC_MODEL_DIR] [--rec_image_inverse REC_IMAGE_INVERSE]
                 [--rec_image_shape REC_IMAGE_SHAPE] [--rec_batch_num REC_BATCH_NUM] [--max_text_length MAX_TEXT_LENGTH]
                 [--rec_char_dict_path REC_CHAR_DICT_PATH] [--use_space_char USE_SPACE_CHAR] [--vis_font_path VIS_FONT_PATH]
                 [--drop_score DROP_SCORE] [--e2e_algorithm E2E_ALGORITHM] [--e2e_model_dir E2E_MODEL_DIR]
                 [--e2e_limit_side_len E2E_LIMIT_SIDE_LEN] [--e2e_limit_type E2E_LIMIT_TYPE]
                 [--e2e_pgnet_score_thresh E2E_PGNET_SCORE_THRESH] [--e2e_char_dict_path E2E_CHAR_DICT_PATH]
                 [--e2e_pgnet_valid_set E2E_PGNET_VALID_SET] [--e2e_pgnet_mode E2E_PGNET_MODE] [--use_angle_cls USE_ANGLE_CLS]
                 [--cls_model_dir CLS_MODEL_DIR] [--cls_image_shape CLS_IMAGE_SHAPE] [--label_list LABEL_LIST]
                 [--cls_batch_num CLS_BATCH_NUM] [--cls_thresh CLS_THRESH] [--enable_mkldnn ENABLE_MKLDNN]
                 [--cpu_threads CPU_THREADS] [--use_pdserving USE_PDSERVING] [--warmup WARMUP] [--sr_model_dir SR_MODEL_DIR]
                 [--sr_image_shape SR_IMAGE_SHAPE] [--sr_batch_num SR_BATCH_NUM] [--draw_img_save_dir DRAW_IMG_SAVE_DIR]
                 [--save_crop_res SAVE_CROP_RES] [--crop_res_save_dir CROP_RES_SAVE_DIR] [--use_mp USE_MP]
                 [--total_process_num TOTAL_PROCESS_NUM] [--process_id PROCESS_ID] [--benchmark BENCHMARK]
                 [--save_log_path SAVE_LOG_PATH] [--show_log SHOW_LOG] [--use_onnx USE_ONNX] [--return_word_box RETURN_WORD_BOX]
                 [--output OUTPUT] [--table_max_len TABLE_MAX_LEN] [--table_algorithm TABLE_ALGORITHM]
                 [--table_model_dir TABLE_MODEL_DIR] [--merge_no_span_structure MERGE_NO_SPAN_STRUCTURE]
                 [--table_char_dict_path TABLE_CHAR_DICT_PATH] [--layout_model_dir LAYOUT_MODEL_DIR]
                 [--layout_dict_path LAYOUT_DICT_PATH] [--layout_score_threshold LAYOUT_SCORE_THRESHOLD]
                 [--layout_nms_threshold LAYOUT_NMS_THRESHOLD] [--kie_algorithm KIE_ALGORITHM] [--ser_model_dir SER_MODEL_DIR]
                 [--re_model_dir RE_MODEL_DIR] [--use_visual_backbone USE_VISUAL_BACKBONE] [--ser_dict_path SER_DICT_PATH]
                 [--ocr_order_method OCR_ORDER_METHOD] [--mode {structure,kie}] [--image_orientation IMAGE_ORIENTATION]
                 [--layout LAYOUT] [--table TABLE] [--ocr OCR] [--recovery RECOVERY] [--use_pdf2docx_api USE_PDF2DOCX_API]
                 [--invert INVERT] [--binarize BINARIZE] [--alphacolor ALPHACOLOR] [--lang LANG] [--det DET] [--rec REC]
                 [--type TYPE] [--savefile SAVEFILE] [--ocr_version {PP-OCR,PP-OCRv2,PP-OCRv3,PP-OCRv4}]
                 [--structure_version {PP-Structure,PP-StructureV2}]
paddleocr: error: the following arguments are required: --image_dir

@Liyulingyue Liyulingyue merged commit 3cc4ae9 into PaddlePaddle:main Sep 23, 2024
3 checks passed
@GreatV GreatV deleted the required_image_dir branch September 23, 2024 06:30
@holai
Copy link

holai commented Sep 27, 2024

image
@GreatV @Liyulingyue

@GreatV
Copy link
Collaborator Author

GreatV commented Sep 27, 2024

@holai fixed

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants