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

image_preprocess resizing #155

Open
lukqw opened this issue Jul 8, 2021 · 4 comments
Open

image_preprocess resizing #155

lukqw opened this issue Jul 8, 2021 · 4 comments

Comments

@lukqw
Copy link

lukqw commented Jul 8, 2021

hi,
I just stumbled upon the code of image_preprocess in yolov3/utils.py
why is the image padded instead of resized (stretched) correctly?
is this why the boxes work better in my example with cv2 vs tf?

image

@lukqw
Copy link
Author

lukqw commented Jul 8, 2021

on a sidenote: I removed the second cv2.cvtColor from my code as well as mentioned in this issue (#131)
that's why the resized cv2 image is correctly colored

@lukqw
Copy link
Author

lukqw commented Jul 8, 2021

I have made the following changes to the utils functions:
image_preprocess
image

postprocess_boxes
image

I do realize a PR would be easier to follow but I am kinda lazy right now and would rather discuss if this is the right approach or not.

Results:
image

image

@pythonlessons
Copy link
Owner

Hi, you did interesting testing. I'll try this by myself and measure mAP before and after this change. I Will let you know the results.

@lukqw
Copy link
Author

lukqw commented Jul 14, 2021

looking forward to your results!

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

2 participants