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

Error when running on webcam stream: zsh: no matches found: [1,2,3] #19

Open
Aiyush-G opened this issue Dec 24, 2020 · 6 comments
Open

Comments

@Aiyush-G
Copy link

Hi,

I hope that you are well, when attempting to run this code I get the error:

zsh: no matches found: [1,2,3]

Do you know why this is?

I look forward to your response!
AG

@phildue
Copy link

phildue commented Dec 24, 2020

Just ran into the same issue. Got it running by changing webcam.py:23 to: toShow = cv2.resize(toShow, (int(width/2), int(height))) and selecting 1 or 2 or 3. e.g. --resolution 1.

Not sure if thats the correct way though. Don't really understand the api there. Maybe the authors can clarify ? :)

@Aiyush-G
Copy link
Author

Ahh right, thanks a lot, it worked! 👍

On a side note, how would I manipulate this depth map now (slightly noobish question). What I want to do is split the frames up into a grid and where closest colour (I think it is a yellow so in a yellow RGB range?) and then generate a grid (probably in array format like this)

row1 = [1, 0 , 0]
row2 = [1, 1, 0]
row3 = [1, 1, 1]

Where the 1's represent something close and the 0's represent something not close.
Also, how accurate do you think that this is?

Cheers,

@emad555
Copy link

emad555 commented Jun 20, 2021

Still having this error after editing the code:

ir ./checkpoint/IROS18/pydnet --resolution 1
2021-06-20 15:51:16.515515: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
OpenCV Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /io/opencv/modules/imgproc/src/imgwarp.cpp, line 3483
Traceback (most recent call last):
File "webcam.py", line 96, in
tf.app.run()
File "/home/emad/.local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 126, in run
_sys.exit(main(argv))
File "webcam.py", line 71, in main
img = cv2.resize(img, (width, height)).astype(np.float32) / 255.
cv2.error: /io/opencv/modules/imgproc/src/imgwarp.cpp:3483: error: (-215) ssize.width > 0 && ssize.height > 0 in function resize

@emad555
Copy link

emad555 commented Jun 20, 2021

It worked after using python3 instead of python.

@mritvick
Copy link

i am getting this error and have no idea what to change , any help would be appreciated thanx @emad555 @Aiyush-G @phildue
error: argument --resolution: invalid int value: '[1,2,3]'

@The-Real-Thisas
Copy link

@Aiyush-G @phildue

The --resolution argument as the error error: argument --resolution: invalid int value: '[1,2,3]' suggests requires an integer (int) value. It may be easy to confuse the command in the README,

python webcam.py --checkpoint_dir ./checkpoint/IROS18/pydnet --resolution [1,2,3]

to assume that this is supposed to be some sort of array. Examination of the source code for the parser reveals this is certainly not the case.

parser.add_argument('--resolution', dest='resolution', type=int, default=1, help='resolution [1:H, 2:Q, 3:E]')

Here you can see that it requires a type of int and has the default of 1.

The README command,

python webcam.py --checkpoint_dir ./checkpoint/IROS18/pydnet --resolution [1,2,3]

Shows that there are three options provided by the author; 1, 2 and 3.

Please use this command if you are alright with using the default resolution,

python webcam.py --checkpoint_dir ./checkpoint/IROS18/pydnet

Or, append --resolution <1, 2 or 3>.

python webcam.py --checkpoint_dir ./checkpoint/IROS18/pydnet --resolution <1, 2 or 3>

Hope this helps close this issue.

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

5 participants