|
# πΆ Dog Breed Classification Desktop App
|
|
|
|
This is a standalone desktop application built using **Tkinter** and **TensorFlow**, capable of identifying dog breeds from images. The app uses a trained `.h5` deep learning model and supports creating `.exe` and `.msi` installers via **cx_Freeze** or **PyInstaller**.
|
|
|
|
---
|
|
|
|
## π Features
|
|
|
|
- β
Offline desktop app (no Python installation required)
|
|
- πΌοΈ Upload any dog image (JPG, PNG, JPEG)
|
|
- π Predicts dog breed with confidence score
|
|
- π Simple folder structure and user-friendly GUI
|
|
- π οΈ Create `.exe` or `.msi` installers with `cx_Freeze`
|
|
- β οΈ Error handling for missing models or files
|
|
|
|
---
|
|
|
|
## π§ Model Info
|
|
|
|
- Trained on **31 dog breeds** including:
|
|
```
|
|
|
|
Akita Inu, German Shepherd, Labrador Retriever, Poodle, Pug, Golden Retriever,
|
|
Siberian Husky, Bulldog, Saint Bernard, Rottweiler, and more.
|
|
|
|
```
|
|
- Input Image Size: **224 x 224**
|
|
- Format: `dog_breed_classifier.h5` (Keras model)
|
|
|
|
---
|
|
|
|
## π Folder Structure
|
|
|
|
```
|
|
|
|
DogBreedApp/
|
|
β
|
|
βββ app.py # Main GUI application file
|
|
βββ dog\_breed\_classifier.h5 # Trained TensorFlow model
|
|
βββ class\_indices.json # Label-to-classname mapping
|
|
βββ setup.py # cx\_Freeze build script
|
|
βββ dog.ico # (optional) Icon file
|
|
|
|
````
|
|
|
|
---
|
|
|
|
## π Requirements
|
|
|
|
Install these Python packages:
|
|
|
|
```bash
|
|
pip install -r requirements.txt
|
|
````
|
|
|
|
**requirements.txt**
|
|
|
|
```txt
|
|
tensorflow
|
|
numpy
|
|
pillow
|
|
cx-Freeze
|
|
```
|
|
|
|
---
|
|
|
|
## π₯οΈ Running the App
|
|
|
|
```bash
|
|
python app.py
|
|
```
|
|
|
|
---
|
|
|
|
## π¦ Creating Executable (.exe or .msi)
|
|
|
|
### β
Using cx\_Freeze
|
|
|
|
1. Create `setup.py`
|
|
2. Build:
|
|
|
|
```bash
|
|
python setup.py build
|
|
```
|
|
|
|
3. For MSI Installer:
|
|
|
|
```bash
|
|
python setup.py bdist_msi
|
|
```
|
|
|
|
This generates:
|
|
|
|
* `.exe` in `build/`
|
|
* `.msi` installer in `dist/`
|
|
|
|
---
|
|
|
|
## π§ Packaging Notes
|
|
|
|
* Use `resource_path()` for model/JSON so PyInstaller or cx\_Freeze can bundle files.
|
|
* Include `.h5` and `.json` in `include_files` in `setup.py`.
|
|
* Works without requiring Python installation.
|
|
|
|
---
|
|
|
|
## πΈ Screenshots
|
|
|
|

|
|

|
|
|
|
---
|
|
|
|
## π License
|
|
|
|
This project is open-source and available for educational and personal use.
|
|
|
|
---
|
|
|
|
## π¨βπ» Author
|
|
|
|
Developed by **Jayasimma D**
|
|
|
|
```
|
|
|
|
---
|
|
|
|
### β
Bonus Tips:
|
|
- Save it as `README.md` in your root folder.
|
|
- Add screenshots to a `/screenshots` folder if you plan to upload this to GitHub or Share.
|
|
- Replace `[Your Name]` with your actual name or GitHub username. |