This is a Streamlit application that uses a pre-trained TensorFlow model (MobileNetV2) to classify images uploaded by the user.
- Streamlit
- TensorFlow
- PIL
- NumPy
- Matplotlib
-
The application first loads the pre-trained MobileNetV2 model from TensorFlow's model zoo.
-
The user is prompted to upload an image file (JPG or PNG format).
-
The uploaded image is preprocessed to match the input requirements of the MobileNetV2 model. This involves resizing the image to 224x224 pixels and normalizing the pixel values.
-
The preprocessed image is then fed into the model to obtain predictions.
-
The model's predictions are decoded into human-readable class names and displayed on the screen, along with the confidence scores.
To run the application, use the following command:
streamlit run main.py
Then, open a web browser and navigate to the URL displayed in the terminal. From the web interface, you can upload an image and see the model's predictions.