Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: too many values to unpack #41

Closed
xt479910344 opened this issue May 15, 2017 · 2 comments
Closed

ValueError: too many values to unpack #41

xt479910344 opened this issue May 15, 2017 · 2 comments

Comments

@xt479910344
Copy link

i meet this problem,
xting@xiaomi-To-be-filled-by-O-E-M:~/SynthText$ python gen.py
getting data..
-> done
Storing the output in: results/SynthText.h5
0 of 4
Traceback (most recent call last):
File "/home/xting/SynthText/synthgen.py", line 615, in render_text
regions = self.filter_for_placement(xyz,seg,regions)
File "/home/xting/SynthText/synthgen.py", line 391, in filter_for_placement
res = get_text_placement_mask(xyz,seg==l,regions['coeff'][idx],pad=2)
File "/home/xting/SynthText/synthgen.py", line 219, in get_text_placement_mask
contour,hier = cv2.findContours(mask.copy().astype('uint8'),mode=cv2.RETR_CCOMP,method=cv2.CHAIN_APPROX_SIMPLE)
ValueError: too many values to unpack
1 of 4
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
Traceback (most recent call last):
File "/home/xting/SynthText/synthgen.py", line 615, in render_text
regions = self.filter_for_placement(xyz,seg,regions)
File "/home/xting/SynthText/synthgen.py", line 391, in filter_for_placement
res = get_text_placement_mask(xyz,seg==l,regions['coeff'][idx],pad=2)
File "/home/xting/SynthText/synthgen.py", line 219, in get_text_placement_mask
contour,hier = cv2.findContours(mask.copy().astype('uint8'),mode=cv2.RETR_CCOMP,method=cv2.CHAIN_APPROX_SIMPLE)
ValueError: too many values to unpack
2 of 4
Traceback (most recent call last):
File "/home/xting/SynthText/synthgen.py", line 615, in render_text
regions = self.filter_for_placement(xyz,seg,regions)
File "/home/xting/SynthText/synthgen.py", line 391, in filter_for_placement
res = get_text_placement_mask(xyz,seg==l,regions['coeff'][idx],pad=2)
File "/home/xting/SynthText/synthgen.py", line 219, in get_text_placement_mask
contour,hier = cv2.findContours(mask.copy().astype('uint8'),mode=cv2.RETR_CCOMP,method=cv2.CHAIN_APPROX_SIMPLE)
ValueError: too many values to unpack
3 of 4
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
Traceback (most recent call last):
File "/home/xting/SynthText/synthgen.py", line 615, in render_text
regions = self.filter_for_placement(xyz,seg,regions)
File "/home/xting/SynthText/synthgen.py", line 391, in filter_for_placement
res = get_text_placement_mask(xyz,seg==l,regions['coeff'][idx],pad=2)
File "/home/xting/SynthText/synthgen.py", line 219, in get_text_placement_mask
contour,hier = cv2.findContours(mask.copy().astype('uint8'),mode=cv2.RETR_CCOMP,method=cv2.CHAIN_APPROX_SIMPLE)
ValueError: too many values to unpack
4 of 4
Traceback (most recent call last):
File "/home/xting/SynthText/synthgen.py", line 615, in render_text
regions = self.filter_for_placement(xyz,seg,regions)
File "/home/xting/SynthText/synthgen.py", line 391, in filter_for_placement
res = get_text_placement_mask(xyz,seg==l,regions['coeff'][idx],pad=2)
File "/home/xting/SynthText/synthgen.py", line 219, in get_text_placement_mask
contour,hier = cv2.findContours(mask.copy().astype('uint8'),mode=cv2.RETR_CCOMP,method=cv2.CHAIN_APPROX_SIMPLE)
ValueError: too many values to unpack

@ankush-me
Copy link
Owner

This is likely due to a different version of openCV on your machine.
May be this commit would help.

@Intsigstephon
Copy link

i have change from openc2.x to open3.x, but question still remains?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants