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.
The application has the following functions:
- Training the CNN model on black and white images (Fashion MNIST).
- Training the VGG16 model on color images (converted from Fashion MNIST).
- Visualization of training results, including loss and accuracy graphs.
- Testing of images uploaded by the user based on the selected model.
- Use pre-trained models in the
Model testtab(without training). Pre-trained models should be in thesaveModelsdirectory. Here my prepared models:
https://drive.google.com/drive/folders/11ptCnpoiAlmtYGRsQOJaR54Vhexvcw34?usp=sharing
main.pyThe script to run the Streamlit application.app.pyThe main module containing the application functionality, including model definition, training, visualization, and testing.
python main.pyOr directly:
streamlit run main.pyUses 2D convolutional layers. The architecture includes Dropout to prevent overfitting. Trained on 28x28 grayscale images.
Pre-trained on ImageNet. Input images are scaled to 32x32 with three channels (RGB). Only the VGG16 main unit (frozen) is used.
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.
- Training models
Select
CNNorVGG16in the menu. Enter the number of epochs and click โTrain modelโ. - Testing
Upload an image in .jpg, .jpeg, .png, or .gif format.
Select a model (CNN or VGG16).
Click
Recognize image. - Saving models
After completing the training of the models app saved traine model in the
saveModelsfolder in the.kerasformat.
Graph of loss and accuracy.
Image with class prediction and probability histogram.
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.




