--- title: CV InsectClassifier # Ini dari bagian remote, kamu bisa ubah namanya jadi lebih deskriptif kalau mau emoji: 🐞 # Kamu bisa pilih emoji yang kamu suka, misal tetap 🐞 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](https://www.kaggle.com/datasets/hammaadali/insects-recognition) 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: ```bash venv\Scripts\activate uvicorn main:app --reload --host 0.0.0.0 --port 8000 # <-- PERBAIKI INI: sesuaikan dengan command lokal mu ```