DeepNude_NoWatermark_withModel
DeepNude_NoWatermark_withModel copied to clipboard
ValueError: too many values to unpack (expected 2)
$python main.py
libpng warning: iCCP: known incorrect sRGB profile
Executing phase: dress_to_correct
Executing phase: correct_to_mask
Executing phase: mask_to_maskref
Executing phase: maskref_to_maskdet
Executing phase: maskdet_to_maskfin
Traceback (most recent call last):
File "main.py", line 40, in <module>
main(inputpath, outputpath)
File "main.py", line 26, in main
watermark = process(dress)
File "/Users/Aiker/Desktop/deepnude/deepnude/run.py", line 144, in process
maskfin = create_maskfin(maskref, maskdet)
File "/Users/Aiker/Desktop/deepnude/deepnude/opencv_transform/maskdet_to_maskfin.py", line 34, in create_maskfin
bodypart_list = extractAnnotations(maskdet);
File "/Users/Aiker/Desktop/deepnude/deepnude/opencv_transform/maskdet_to_maskfin.py", line 101, in extractAnnotations
tits_list = findBodyPart(maskdet, "tit")
File "/Users/Aiker/Desktop/deepnude/deepnude/opencv_transform/maskdet_to_maskfin.py", line 168, in findBodyPart
contours, hierarchy = cv2.findContours(color_mask,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
ValueError: too many values to unpack (expected 2)
need to edit opencv_transform/maskdet_to_maskfin.py line 168
vim /Users/Aiker/Desktop/deepnude/deepnude/opencv_transform/maskdet_to_maskfin.py +168
_, contours, hierarchy = cv2.findContours(color_mask,cv2.RETR_TREE ,cv2.CHAIN_APPROX_SIMPLE)
then it's OK.

THX,but why?
There are not enough variables to unpack. two vars,but there are three values behind.