video-subtitle-extractor
video-subtitle-extractor copied to clipboard
Bug in accuerate mode
Hi hi again :3
Now I test the fast mode and accurate mode, while the first one works great, the accurate mode close the app when we try to run it, so to get the log, I run it from backend/main.py
, here the log:
Running Verify Fluid Program ...
Your Paddle Fluid works well on SINGLE GPU or CPU.
W1220 14:03:37.962996 14833 fuse_all_reduce_op_pass.cc:76] Find all_reduce operators: 2. To make the speed faster, some all_reduce ops are fused during training, after fusion, the number of all_reduce ops is 1.
Your Paddle Fluid works well on MUTIPLE GPU or CPU.
Your Paddle Fluid is installed successfully! Let's start deep Learning with Paddle Fluid now
识别字幕语言:ch
识别模式:accurate
请输入视频完整路径:~/video.mp4
请输入字幕区域(ymin ymax xmin xmax):0 720 0 1280
usage: main.py [-h] [--use_gpu USE_GPU] [--ir_optim IR_OPTIM] [--use_tensorrt USE_TENSORRT] [--use_fp16 USE_FP16] [--gpu_mem GPU_MEM]
[--image_dir IMAGE_DIR] [--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_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_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_sast_polygon DET_SAST_POLYGON] [--rec_algorithm REC_ALGORITHM]
[--rec_model_dir REC_MODEL_DIR] [--rec_image_shape REC_IMAGE_SHAPE] [--rec_char_type REC_CHAR_TYPE] [--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] [--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] [--use_pdserving USE_PDSERVING]
optional arguments:
-h, --help show this help message and exit
--use_gpu USE_GPU
--ir_optim IR_OPTIM
--use_tensorrt USE_TENSORRT
--use_fp16 USE_FP16
--gpu_mem GPU_MEM
--image_dir IMAGE_DIR
--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_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_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_sast_polygon DET_SAST_POLYGON
--rec_algorithm REC_ALGORITHM
--rec_model_dir REC_MODEL_DIR
--rec_image_shape REC_IMAGE_SHAPE
--rec_char_type REC_CHAR_TYPE
--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
--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
--use_pdserving USE_PDSERVING
The error, is very similar with what I reach to see in the gui, in the console case, we can change ~/video.mp4
to /home/user/video.mp4
and works, seems the project need to transform the input to full path, and the gui is not doing that, a faster way, would be the main.py transform the input to full path, that should fix this and enable relative paths.
i have no idea how to fix that
I check the code fast, sadly I don't get where the bug is, but there is a workaround that can do this works for now:
video_path = input(f"{interface_config['Main']['InputVideo']}").strip()
to
import os
video_path = os.path.abspath(input(f"{interface_config['Main']['InputVideo']}").strip())
This does not fix anything, so, this should be not be closed.
i will test this tomorrow. Its time for sleep in China now.
Okis!, good night :3