Views
No views yet
Salim, F. and Suharjito (2023). Hyperparameter optimization of YOLOv4 tiny for palm oil fresh fruit bunches maturity detection using genetics algorithms. Smart Agricultural Technology 6, 100364. https://doi.org/10.1016/j.atech.2023.100364
| Variant | mAP | Precision | Recall | F1 | Learning rate | Stop iter |
|---|---|---|---|---|---|---|
| Baseline | 87.99% | 0.591 | 0.842 | 0.695 | 0.00261 | 12000 |
| Baseline + ES | 85.94% | 0.603 | 0.861 | 0.709 | 0.00261 | 6430 |
| GA-tuned (best) | 89.75% | 0.626 | 0.891 | 0.735 | 0.007003 | 10593 |
| GA + ES | 86.23% | 0.624 | 0.847 | 0.718 | 0.007003 | 4258 |
LR = 0.007003, within 6% of the paper-reported 0.007465,
independently validating the search procedure. Plain Early Stopping
(patience = 5 mAP evals) underperforms in both configurations because the
patience is too tight for the higher LR found by GA.| Class | GT | AP |
|---|---|---|
| abnormal | 259 | 94.61% |
| janjang kosong | 246 | 95.76% |
| kurang masak | 380 | 82.02% |
| masak | 213 | 92.83% |
| mentah | 362 | 79.09% |
| terlalu masak | 272 | 94.18% |
kurang masak, mentah) are the
hardest; the rest exceed 92% AP.runs/h100-hankai/
artifacts/ metrics.json, training_info.json, ga_history.json
configs/ 4 Darknet .cfg files actually used for training
weights/ 4 *_best.weights (model1..model4)
logs/ training logs + per-split eval outputs.weights files are 23.6 MB each. The best (GA-tuned) model is
runs/h100-hankai/weights/model3_ga_best.weights.1import cv2
2import numpy as np
3from huggingface_hub import hf_hub_download
4
5REPO = "dutaav/yolov4-tiny-hpo-ffb-maturity"
6RUN = "runs/h100-hankai"
7
8cfg = hf_hub_download(REPO, f"{RUN}/configs/model3_ga.cfg")
9weights = hf_hub_download(REPO, f"{RUN}/weights/model3_ga_best.weights")
10
11net = cv2.dnn.readNetFromDarknet(cfg, weights)
12net.setPreferableBackend(cv2.dnn.DNN_BACKEND_OPENCV)
13net.setPreferableTarget(cv2.dnn.DNN_TARGET_CPU)
14
15CLASSES = ["abnormal", "janjang kosong", "kurang masak",
16 "masak", "mentah", "terlalu masak"]
17
18img = cv2.imread("your_image.jpg")
19blob = cv2.dnn.blobFromImage(img, 1/255.0, (416, 416), swapRB=True, crop=False)
20net.setInput(blob)
21outputs = net.forward(net.getUnconnectedOutLayersNames())
22# post-process outputs with NMS (cv2.dnn.NMSBoxes); see scripts/run_inference.py
23# in the GitHub repo for the full pipeline.tugas-akhir-pybma/palm-ripeness-detection, version 5,
Darknet export format. 6 classes, 11614 train / 1657 valid / 835 test
images. This is a different dataset version than the one used by Salim
and Suharjito (2023), so absolute numbers differ slightly while the
qualitative findings (GA > Baseline > GA+ES > ES) are reproduced.1@misc{dutaav2026palmyolov4ga,
2 title = {YOLOv4-tiny with Genetic Algorithm hyperparameter optimization
3 for palm oil FFB maturity detection (replication of
4 Salim and Suharjito 2023)},
5 author = {dutaav},
6 year = {2026},
7 url = {https://huggingface.co/dutaav/yolov4-tiny-hpo-ffb-maturity}
8}
9
10@article{salim2023palmyolov4ga,
11 title = {Hyperparameter optimization of YOLOv4 tiny for palm oil fresh
12 fruit bunches maturity detection using genetics algorithms},
13 author = {Salim, Faisal and Suharjito},
14 journal = {Smart Agricultural Technology},
15 volume = {6},
16 pages = {100364},
17 year = {2023},
18 doi = {10.1016/j.atech.2023.100364}
19}