RCNN-Vehicle-Tracking-Lane-Detection
RCNN-Vehicle-Tracking-Lane-Detection copied to clipboard
TypeError: expected non-empty vector for x
Are there any requirements about input image?because when I use my own image to test ,there is error
Refer config.py for the image dimension (IMAGE_MAX_DIM, IMAGE_MIN_DIM)
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.
Ping @tj27-vkr - Sorry, forgot to mention you ^ 😅
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.
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.
That's correct once the matrix is adjusted, we can use different size pictures. Thank you.