techn0man1ac / MachineLearningCV

This project is a web-based machine learning application that allows training and testing CNN and VGG16 models based on the Fashion MNIST dataset. The application was created using Streamlit.

Home Page:https://mlcvzero.streamlit.app/

Repository from Github https://github.comtechn0man1ac/MachineLearningCVRepository from Github https://github.comtechn0man1ac/MachineLearningCV

ML Application with Streamlit

Model training screenshot

This project is a web-based machine learning application that allows training and testing CNN and VGG16 models based on the Fashion MNIST dataset. The application was created using Streamlit.

๐Ÿ“‹ Description

The application has the following functions:

  1. Training the CNN model on black and white images (Fashion MNIST).
  2. Training the VGG16 model on color images (converted from Fashion MNIST).
  3. Visualization of training results, including loss and accuracy graphs.
  4. Testing of images uploaded by the user based on the selected model.
  5. Use pre-trained models in the Model test tab(without training). Pre-trained models should be in the saveModels directory. Here my prepared models:

https://drive.google.com/drive/folders/11ptCnpoiAlmtYGRsQOJaR54Vhexvcw34?usp=sharing

๐Ÿ› ๏ธ File structure

  • main.py The script to run the Streamlit application.
  • app.py The main module containing the application functionality, including model definition, training, visualization, and testing.

Running the application

python main.py

Or directly:

streamlit run main.py

๐Ÿ“Š Models

CNN:

Uses 2D convolutional layers. The architecture includes Dropout to prevent overfitting. Trained on 28x28 grayscale images.

VGG16:

Pre-trained on ImageNet. Input images are scaled to 32x32 with three channels (RGB). Only the VGG16 main unit (frozen) is used.

๐Ÿ–ผ๏ธ How to work with the application

Runn app, click the Model Test tab and select the image you want to recognize. After selecting the image, it will be converted to the correct format and size for submitting the model for recognition. Two models(CNN/VGG16) are trained to recognize type of product(clothing item) such as bags, T-shirts, dresses... Based on a dataset Fashion-MNIST.

Recognize image screenshot

  1. Training models Select CNN or VGG16 in the menu. Enter the number of epochs and click โ€œTrain modelโ€.
  2. Testing Upload an image in .jpg, .jpeg, .png, or .gif format. Select a model (CNN or VGG16). Click Recognize image.
  3. Saving models After completing the training of the models app saved traine model in the saveModels folder in the .keras format.

๐Ÿ“‚ Example result.

Training graphs

Traine statistics screenshot

Graph of loss and accuracy.

Image recognition

Shirt image recognition screenshot

Image with class prediction and probability histogram.

Lable histogram

๐Ÿ“‘ License

This project is licensed under the MIT License - see the LICENSE file for details.

Streamlit software is also distributed under the Apache-2.0 license.

About

This project is a web-based machine learning application that allows training and testing CNN and VGG16 models based on the Fashion MNIST dataset. The application was created using Streamlit.

https://mlcvzero.streamlit.app/

License:MIT License


Languages

Language:Python 100.0%