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

CUlane: Half the input-size #15

Closed
andy-96 opened this issue May 11, 2021 · 3 comments
Closed

CUlane: Half the input-size #15

andy-96 opened this issue May 11, 2021 · 3 comments

Comments

@andy-96
Copy link

andy-96 commented May 11, 2021

Hi!

To reduce training time as I only have access to a 1080 Ti, I have reduced the input image size using the resize function you provided in the Dataloader from (1664, 576) to (832, 256). During inference, it always returns that the "Lane too small" as the fitted spline has only less than 10 values. Now, I wonder, what h_samples = (589, 240) in get_lanes_culane really represents and how you got to this value?

I have set h_samples = (589 / 2, 240 / 2) to see what happens and now, I get splines with values around 15-25, so I'll probably set the threshold to 20 to see how the accuracy will be.

Or would you just scale the input back to its original, i.e. (832 * 2, 256 * 2) during inference and keep everything as it is?

Thanks in advance!

@arangesh
Copy link
Collaborator

We already downsample the input image by a factor of two (see here) so that input image size is (288, 832).

If you want to reduce the image size further, you will also have have to change a few other settings in the dataloader, specifically, here, here, here, and here.

For example, if you wanted to reduce the input image size by a factor of 4 instead of the default 2, you should make the following changes in the lines above:

self.input_size = (144, 416) # line 77
self.samp_factor = 4./self.output_scale # line 79
tf.GroupRandomScale(size=(0.25, 0.3), interpolation=(cv2.INTER_LINEAR, cv2.INTER_NEAREST)) # line 89
tf.GroupRandomScale(size=(0.25, 0.25), interpolation=(cv2.INTER_LINEAR, cv2.INTER_NEAREST)), # line 97

That being said, I would highly suggest you use one of the lighter models for training (for example ENet) instead of reducing the image size further as I anticipate this to affect the performance significantly.

@andy-96
Copy link
Author

andy-96 commented Jul 1, 2021

Sorry, I should've closed this issue as it is not relevant for me anymore. I have tried downsampling the image more and as you have predicted, the performance decreases significantly.
I have used the multi-GPU version suggested by @qinjian623 which improved training speed a lot!
Thanks for your reply!

@andy-96 andy-96 closed this as completed Jul 1, 2021
@qinjian623
Copy link

Sorry, I should've closed this issue as it is not relevant for me anymore. I have tried downsampling the image more and as you have predicted, the performance decreases significantly.

I have used the multi-GPU version suggested by @qinjian623 which improved training speed a lot!

Thanks for your reply!

You don't need keep the ratio of image. Resolution like 512x512 may be a balance between speed and accuracy.

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