Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cloaky233/keraslab
A hands-on guide to building and training deep learning models using Keras and Streamlit. Perfect for beginners and enthusiasts looking to learn and experiment with neural networks.
https://github.com/cloaky233/keraslab
deep-learning image-classification keras tutorial
Last synced: 16 days ago
JSON representation
A hands-on guide to building and training deep learning models using Keras and Streamlit. Perfect for beginners and enthusiasts looking to learn and experiment with neural networks.
- Host: GitHub
- URL: https://github.com/cloaky233/keraslab
- Owner: CLoaKY233
- Created: 2024-10-18T16:41:26.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-11-20T08:45:32.000Z (3 months ago)
- Last Synced: 2024-11-20T10:43:20.921Z (3 months ago)
- Topics: deep-learning, image-classification, keras, tutorial
- Language: Python
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Keras & Streamlit Lab
This project is a deep learning application that classifies images of cats and dogs using a Convolutional Neural Network (CNN) built with TensorFlow and Keras. The application features a Streamlit-based user interface for training the model, visualizing the training process, and making predictions.
---
To Learn more about the project, click [Here](LearnWithPrompts.md)## Table of Contents
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Code Structure](#code-structure)
- [Model Architecture](#model-architecture)
- [License](#license)## Features
- User-friendly Streamlit interface for model training and prediction
- Customizable training parameters (learning rate, epochs, batch size)
- Real-time training progress visualization
- Interactive charts for loss and accuracy metrics
- Image prediction functionality## Installation
1. Clone the repository:
```
git clone https://github.com/cloaky233/KerasLab.git
cd KerasLab
```2. Install `uv` for dependency management:
```
pip install uv
```3. Create a virtual environment and activate it:
```
uv venv
.venv/scripts/activate # On Windows
source .venv/bin/activate # On Unix or MacOS
```4. Install the required packages:
```
uv pip install -r requirements.txt
```## Usage
1. Prepare your dataset:
- Place your training images in `dataset/training_set/training_set`
- Place your testing images in `dataset/test_set/test_set`
- Ensure each set has subdirectories for `cats` and `dogs`2. Run the Streamlit app:
```
streamlit run app.py
```3. Use the Streamlit interface to:
- Set data paths
- Configure training parameters
- Start the training process
- Visualize training progress and results
- Make predictions on new images## Code Structure
The main script `app.py` is organized into several sections:
(now kept in pyfiles directory)1. **Imports and Constants**: Required libraries and global variables.
2. **Data Loading and Preprocessing**: Functions to load and prepare image data.
3. **Model Creation**: Definition of the CNN architecture.
4. **Visualization Functions**: Methods for plotting training history and predictions.
5. **StreamlitCallback**: Custom Keras callback for updating the Streamlit UI during training.
6. **Main Function**: Streamlit UI setup and main execution flow.## Model Architecture
For detailed information about the model architecture, please refer to the [ModelArchitecture.md](ModelArchitecture.md) file.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
---
Feel free to contribute to this project by submitting issues or pull requests. For any questions or support, please open an issue in the GitHub repository.