csxmli2016 / MARCONet

Learning Generative Structure Prior for Blind Text Image Super-resolution [CVPR 2023]
Other
192 stars 14 forks source link

测试的时候会有这个问题 #12

Open yayinliqing opened 11 months ago

yayinliqing commented 11 months ago

python test_sr.py -i ./Testsets/LQsWithText -m ################################################################ Input Path : ./Testsets/LQsWithText Save Path : ./Testsets/LQsWithText_10-15_18-00MARCONet The format of text label : using given text label (Please DOUBLE CHECK the LR image name) Mainly Trained on : Chinese Transformer Encoder : 43.062275 M Parameters Structure Prior Network : 27.970194 M Parameters Super-Resolution Network : 16.865923 M Parameters ################################################################ [ WARN:0@1.393] global loadsave.cpp:248 cv::findDecoder imread('./Testsets/LQsWithText\real_lqe01_娓呰偤涓滃寳灏忔湪鑰?Traceback (most recent call last): File "test_sr.py", line 221, in main(args.test_path, save_path, args.manual, args.eng) File "test_sr.py", line 79, in main img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) cv2.error: OpenCV(4.8.1) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

csxmli2016 commented 9 months ago

python test_sr.py -i ./Testsets/LQsWithText -m ################################################################ Input Path : ./Testsets/LQsWithText Save Path : ./Testsets/LQsWithText_10-15_18-00MARCONet The format of text label : using given text label (Please DOUBLE CHECK the LR image name) Mainly Trained on : Chinese Transformer Encoder : 43.062275 M Parameters Structure Prior Network : 27.970194 M Parameters Super-Resolution Network : 16.865923 M Parameters ################################################################ [ WARN:0@1.393] global loadsave.cpp:248 cv::findDecoder imread('./Testsets/LQsWithText\real_lqe01_娓呰偤涓滃寳灏忔湪鑰?Traceback (most recent call last): File "test_sr.py", line 221, in main(args.test_path, save_path, args.manual, args.eng) File "test_sr.py", line 79, in main img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) cv2.error: OpenCV(4.8.1) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

应该是图像问题,在cv2转BGR2RGB的时候出问题了,你可以用PIL Image试试