Closed ikenaga530 closed 3 years ago
The custom image had a bit depth of 24 while the image in the dataset had a bit depth of 8.Image-parse generated using LIP_JPPNet. So, I changed the bit depth to 8 and ran dataset_neck_skin_connection.py and it did not show any error, but the output result was different
image
image-parse
image-parse-new
image-parse-new-vis
Image-parse is what changed to a bit depth of 8
Why is the cause? Best regards
Can you show me which line of code needs to be changed in order to generate 8 bit-depth image? Is it like this?
segmentation = Image.open(seg_pth).convert('L')
When you are using segmentation for training/testing, please use the grayscale file always -
RGB/colored one is only for visualization, this one is creating much confusion I guess. Also, you don't need to run LIP_JPPNet + dataset_neck_skin_correction.py combination, if you generate segmentation using only CIHP_PGN or Graphonomy (they produce much better results and I suggest using them instead of LIP_JPPNet, also you can use generated segmentation directly for CP-VTON+). Hope that helps. Thanks! @ikenaga530 @huangpen
I'm going to try cp-vton-plus with custom images
In dataset_neck_skin_correction.py, only custom images get the following error
Traceback (most recent call last): File "dataset_neck_skin_correction.py", line 258, in
main()
File "dataset_neck_skin_correction.py", line 254, in main
image_dir, seg_dir, each[0], mask, updated_seg_dir)# def update_image_segmentation(data_dir, mask_dir, image_name, mask_name, save_dir=None, save_vis=True):
File "dataset_neck_skin_correction.py", line 184, in update_image_segmentation
result = segmentation + neck_mask
ValueError: operands could not be broadcast together with shapes (256,192,3) (256,192)
The dataset image succeeds, the custom image gives me this error. Do you know the cause?