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 for training and prediction have different size? #13

Open
chptx opened this issue Jul 1, 2017 · 2 comments
Open

Image for training and prediction have different size? #13

chptx opened this issue Jul 1, 2017 · 2 comments
Assignees

Comments

@chptx
Copy link

chptx commented Jul 1, 2017

in predict.py, image stream is cropped before prediction.

def _convert_stream_to_array(stream):
    ...
    image = image.crop((0, PICAMERA_RESOLUTION_HEIGHT / 2, PICAMERA_RESOLUTION_WIDTH, PICAMERA_RESOLUTION_HEIGHT))
    ...

but in train.py, it not do the same step in load_images_to_array, is this a bug?

@Vignesh1115 Vignesh1115 self-assigned this Jul 1, 2017
@Vignesh1115
Copy link
Collaborator

Hi @chptx, We are cropping the image in predict.py because we expect the images supplied while training to be cropped. Since the most useful information for predicting the direction to move in would be in the lower half of the image, we expect the lower half of the image to be supplied as the training data. We chose not to do the cropping of the image programatically in case anyone wanted to use the complete image data. I do see that this crucial aspect is not very clear in the README as it is in the blog post and will be updating it to reflect the same.

@chptx
Copy link
Author

chptx commented Aug 5, 2017

I think it should crop the image in train.py to work correctly out-of-the-box for developer who use this project.

Pull requests #15

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