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

TypeError: expected non-empty vector for x #5

Open
yuyijie1995 opened this issue May 8, 2018 · 6 comments
Open

TypeError: expected non-empty vector for x #5

yuyijie1995 opened this issue May 8, 2018 · 6 comments

Comments

@yuyijie1995
Copy link

Are there any requirements about input image?because when I use my own image to test ,there is error
image

@tj27-vkr
Copy link
Owner

Refer config.py for the image dimension (IMAGE_MAX_DIM, IMAGE_MIN_DIM)

@athityakumar
Copy link

I tried changing the dimension config over a variety of ranges (min-max), but that didn't work for me and I'm not sure what config is exactly expected for this to be robust and working for all image sizes.

For example, what would be the dimension config for input/test4.jpg? In my specific case, I have images of dimension 640x480.

@athityakumar
Copy link

Ping @tj27-vkr - Sorry, forgot to mention you ^ 😅

@tj27-vkr
Copy link
Owner

tj27-vkr commented Sep 11, 2018

The problem is with the crop points to get the area of interest, which is currently hardcoded in process_image.py file. For now, you can modify the crop points with Y min to be 2/3rd of image height and X min, max to be 2/5th and 3/5th of the image width respectively. Will update with the patch soon.

@Mojzaar
Copy link

Mojzaar commented Nov 12, 2018

Hi,
I want to change the size of the input picture but I cannot! I changed the process image file and config file as you said and I will receive the following errors:
Traceback (most recent call last): File "main.py", line 137, in <module> a, img_result = findLane(img_arr) File "main.py", line 104, in findLane left_fit, right_fit, _ = ip.slidingWindow(masked_image) File "/home/mojzar/Desktop/RCNN-Vehicle-Tracking-Lane-Detection-master/process_image.py", line 140, in slidingWindow left_fit = np.polyfit(lefty, leftx, 2) File "/usr/local/lib/python3.6/dist-packages/numpy/lib/polynomial.py", line 550, in polyfit raise TypeError("expected non-empty vector for x") TypeError: expected non-empty vector for x

It means your code would not able to work with images which have different size but 1280 720 pixels?

The problem is with the crop points to get the area of interest, which is currently hardcoded in process_image.py file. For now, you can modify the crop points with Y min to be 2/3rd of image height and X min, max to be 2/5th and 3/5th of the image width respectively. Will update with the patch soon.

@robogeekcanada
Copy link

That's correct once the matrix is adjusted, we can use different size pictures. Thank you.

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