-
Notifications
You must be signed in to change notification settings - Fork 29
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
Using my own dataset to run prediction #3
Comments
Hi @nimanamjouyan It's up to you, but you can follow the pre-processing steps(normalizing, removing cursive style,) for an image in the dataset as it helps the model to learn better. HDF5 format was just used to save the images in one place, you can store yours as flat files and write a custom data loader function in PyTorch which will perform all the pre-processing steps on the image while yielding. |
Thank you for that. I have stored my image files inside a folder and slightly changed one of the cells in your notebook to use my images for prediction:
to this:
But not only my images show as all black, but also I do not get any useful predictions. Am I doing something wrong here? |
If you are using the trained model provided by me then images should be in the same format i.e same preprocessing should be done on the images as I did, to get accurate results. You can use the CLI provided in the code to run a prediction for an image. If you go through the code you will see the appropriate steps to convert an image to a required format. |
Thank you Himanshu, That code was extremely helpful.
I used one of your images and I got this: The outcome is very different from yours in your notebook.
is which is strange. It seems the image is turned vertically for whatever reason. |
Hi @nimanamjouyan Please check the path of the model in |
Hi @him4318 Thank you.
Thank you for clarifying the preprocessing functions |
Hi @him4318 I get the same result as you with that image. That is interesting. Thank you. |
Hi,
Do I need to convert my own images to .hdf5 format before I can make a prediction on them?
What structure should my data have?
The text was updated successfully, but these errors were encountered: