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.To show the interactive dashboard to colleagues:
streamlit run demo_app.py
http://localhost:8501To connect your AI to n8n workflows:
python main.py
POST http://localhost:8000/detectfile.├── 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