benquick123 / C-VTON

C-VTON: Context-Driven Image-Based Virtual Try-On Network
Eclipse Public License 2.0
142 stars 31 forks source link

Run 'Test_mpv.sh' - error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor' #16

Closed Uri-meir closed 1 year ago

Uri-meir commented 1 year ago

Hi, I've been reading about your project for about a week now, and now I want to see it in action! I cloned the repo, installed the requerments as specified in the 'Testing' section, downloaded all the relevant datasets to the folders as specified in the 'For MPV' sub-section. now, Im tring to run the 'test_mpv.sh' but unfortunately Im incountering the error that attached to this issue. I think this error implies that the images can't be found. that is reasonable since Im not specifing any specific images... I would very much appreciate it if you can give an example of the command needs to be written in the terminal in order to run the 'test_mpv.sh' with specific images from the MPV dataset. I looked a little bit in the config.py and tried to figure which argument is relevant, but without any luck. thank you very much for the time and attention. --the error log is attached to the issue-- my_problem.txt

ajdal commented 1 year ago

Hello,

as you point out, your images are not where the dataset expects them to be, which results in image being set to None by opencv. This results in an error when trying to convert the image from BGR to RGB. I get the same error when I try to call the function on None type: image

According to the script scripts/test_mpv.sh, the dataroot is set to "./data/mpv_192". It can be changed by changing the --dataroot argument to the actual dataset path - that is the path that contains the image list all_poseA_poseB_clothes.txt and a number of subdirectories that contain images.

The image list file all_poseA_poseB_clothes.txt contains information about image pairs and which split they are a part of (train/val/test). Images in this file are given relative to the dataroot - in the format subdirectory/image_name.jpg (e. g. AD121D0CU/AD121D0CU-Q11@11=person_whole_back.jpg). According to the output in the attached file, the file all_poseA_poseB_clothes.txt is found in the dataroot path (the log reports sizes of datasets: Created MPVDataset, size val: 870, size test: 3662), but the images are not there.

Please, make sure you have the images on the path given in dataroot. I hope this helps you with running C-VTON.

Uri-meir commented 1 year ago

thank you very much !!