Skip to content

Image classification code, image rescaling missing when images uploaded (rock paper scissors and horse/humans dataset) #129

Open
@HaraBeron

Description

@HaraBeron

I have a comment regarding the following code:
https://github.com/lmoroney/dlaicourse/blob/09767115b53c8ac99df7b85fc67a3cea9fed2482/Course%202%20-%20Part%208%20-%20Lesson%202%20-%20Notebook%20(RockPaperScissors).ipynb

At the end there are images uploaded and the model applied to give predictions for the specific uploaded image. However, we should also rescale the values to [0,1] (by dividing by 255). We are doing this when applying the imagedatagenerator. When we manually upload the images, we just resize, but don't rescale. It is necessary to add the rescaling.

Same problem in case of horse and humans in the parts where images are uploaded (uploaded = files.upload()):
https://github.com/lmoroney/dlaicourse/blob/842e3b1099082dc8631301c26afb6ec71f158eee/Course%201%20-%20Part%208%20-%20Lesson%204%20-%20Notebook.ipynb

https://github.com/lmoroney/dlaicourse/blob/8349cf3839603254b2e41fcc15007f6b8a0de39c/Course%201%20-%20Part%208%20-%20Lesson%202%20-%20Notebook.ipynb

https://github.com/lmoroney/dlaicourse/blob/8349cf3839603254b2e41fcc15007f6b8a0de39c/Course%201%20-%20Part%208%20-%20Lesson%203%20-%20Notebook.ipynb

https://github.com/lmoroney/dlaicourse/blob/842e3b1099082dc8631301c26afb6ec71f158eee/Horse_or_Human_NoValidation.ipynb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions