Spaces:
Sleeping
Sleeping
metadata
title: CV InsectClassifier
emoji: π
colorFrom: gray
colorTo: green
sdk: docker
pinned: false
π Insect Classifier - FastAPI
A web-based insect classification app using two TensorFlow models (CNN and MobileNet), deployed with FastAPI. Users can upload insect images and receive predictions from both models, along with accuracy and descriptions.
π§ Models
- CNN model (
ProyekCV_model.h5) - MobileNet model (
ProyekCV_model_v2.h5)
βοΈ Tech Stack
- FastAPI
- TensorFlow & Keras
- HTML/CSS (for frontend)
- Uvicorn (as ASGI server)
- Python
- NumPy
- Pandas # Kamu tidak pakai Pandas di main.py, sebaiknya dihapus dari daftar
- Matplotlib & Seaborn # Kamu tidak pakai ini untuk runtime aplikasi, sebaiknya dihapus atau pindah ke "Development Dependencies"
- Scikit-learn # Kamu tidak pakai ini, sebaiknya dihapus
π¦ Dataset
This project uses the Insects Recognition Dataset by Hammaad Ali, available on Kaggle.
Dataset Features:
- Contains high-quality images of 5 different insect classes. There are grasshopper, butterfly, mosquito, ladybird and dragonfly.
- Organized into labeled folders for each class.
- Ideal for supervised image classification tasks.
- Image format:
.jpg
The dataset was used to train both the CNN and MobileNet models included in this project.
π How to Run Locally
Make sure you have all dependencies installed and your virtual environment activated.
Step 1: Start the FastAPI backend Open a terminal and run:
venv\Scripts\activate
uvicorn main:app --reload --host 0.0.0.0 --port 8000 # <-- PERBAIKI INI: sesuaikan dengan command lokal mu