koyeongmin / PINet

MIT License
207 stars 56 forks source link

Running test.py with mode 2 #37

Closed iltertaha closed 4 years ago

iltertaha commented 4 years ago

Hi, thanks for this great work. I want to run the test.py on a single image with your pretrained .pkl file . For this reason, First, I've commented line 32: #loader = Generator()in test.py.(Since I didn't download tusimple dataset). Then I've run the code on my image. However I've got the following output. My image is 1920x1080. Since I'm using pretrained weights, I didn't download the TUSIMPLE dataset. Is it necessary even if I want to test on different image?

Testing Get dataset Get agent Setup GPU mode Testing loop OpenCV Error: Assertion failed (ssize.area() > 0) in resize, file /home/travis/miniconda/conda-bld/work/opencv-2.4.11/modules/imgproc/src/imgwarp.cpp, line 1968 Traceback (most recent call last): File "test.py", line 392, in Testing() File "test.py", line 86, in Testing test_image = cv2.resize(test_image, (512,256))/255.0 cv2.error: /home/travis/miniconda/conda-bld/work/opencv-2.4.11/modules/imgproc/src/imgwarp.cpp:1968: error: (-215) ssize.area() > 0 in function resize

How can I solve this problem? Thank you

koyeongmin commented 4 years ago

The error code frequently occurs when cv2.imread is fail. Please check path of your image, or try it with absolute path. Thank you!

may545 commented 4 years ago

I had the same problem when the video I entered was .avi, I converted it to .mp4 and it worked. Might be the same issue for you ^^