sergeywong / cp-vton

Reimplemented code for "Toward Characteristic-Preserving Image-based Virtual Try-On Network"
MIT License
474 stars 182 forks source link

Cloth mask images are blank having white background #31

Open Akhileshkakade opened 4 years ago

Akhileshkakade commented 4 years ago

I was executing convert_data.m. Its creating cloth-mask images with white background images. Kindly help with this issue.

JaquesM commented 3 years ago

Use this python code:

`img = cv2.imread(image_path, 0) blur = cv2.GaussianBlur(img,(5,5),0) ret3,th3 = cv2.threshold(blur,0,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU)

cv2.imwrite(output_path, th3)`

Hope it helps.