A service to detect if a given image of palm is ripe or not. A R&D initiated for Swopt
|
|
hace 3 días | |
|---|---|---|
| src | hace 3 días | |
| .env | hace 3 días | |
| .gitignore | hace 4 días | |
| README.md | hace 3 días | |
| Streamlit.md | hace 4 días | |
| best.pt | hace 4 días | |
| demo_app.py | hace 4 días | |
| main.py | hace 3 días | |
| test_model.py | hace 4 días | |
| train_script.py | hace 4 días | |
| yolov8n.pt | hace 4 días |
This project uses a custom-trained YOLOv8 model to detect the ripeness of Palm Oil Fresh Fruit Bunches (FFB). It features a local Python FastAPI server and a Streamlit Dashboard, both integrated into an agentic n8n workflow.
git clone <your-repo-url>
cd palm-oil-ai
python -m venv venv
# Windows: venv\Scripts\activate | Mac: source venv/bin/activate
pip install ultralytics fastapi uvicorn streamlit python-multipart pillow
/datasets.Train the model:
python train_script.py
best.pt from runs/detect/train/weights/ to the project root.The new architecture decouples the vision logic from the API entry point.
# Run the FastAPI server from the src directory
python -m src.api.main
By default, the server runs on http://localhost:8000.
The Streamlit app still provides the user interface for manual testing.
# Run the Streamlit app
streamlit run demo_app.py
---
## 📂 Repository Structure
```text
├── datasets/ # Labeled images (Train/Valid/Test)
├── runs/ # YOLO training logs and output weights
├── main.py # FastAPI Inference Server (for n8n)
├── demo_app.py # Streamlit Dashboard (for demos)
├── train_script.py # Throttled training configuration
├── best.pt # THE BRAIN: The trained model weights
└── README.md # Documentation