DEVLOG 1 — Setting Up Vision Model Training & Project Structure
━━━━━━━━━━━━━━━━━━━━━━━
TRAINING
Found a grocery dataset on Roboflow with 80k+ images across 17 categories. Set up training on Google Colab using a free T4 GPU with YOLOv8n, 50 epochs, image size 640, batch 16, output saving straight to Google Drive. Left it running overnight.
Woke up to find it stopped at epoch 16. Colab hit the free GPU usage limit and killed the session mid run. Checked the weights folder in Drive and it looked empty at first, thought all progress was gone. Turns out Colab had been auto incrementing folder names
each restart so the actual checkpoints were in kart2/weights/ the whole time. Both last.pt and best.pt were there. Opened results.csv
and confirmed 15 full epochs completed with mAP50 around 0.87, precision and recall both near 0.99. Nothing lost.
Training is paused at epoch 15/50 waiting for GPU quota to reset. Resume plan is loading last.pt with resume=True so it picks up exactly where it left off.
━━━━━━━━━━━━━━━━━━━━━━━
BUILDING THE APP
While waiting on GPU access built out the full local pipeline.
detector.py -runs model.track() each frame using ByteTrack andreturns detections with track IDs
cart.py - handles a virtual tripwire line, items crossing down get added to the cart, crossing back up removes them, grace counter stops brief tracking losses from wiping items instantly
prices.py - reads prices.json at startup and calculates subtotal plus Ontario HST 13%
display.py - draws the tripwire line and bounding boxes onto the camera feed each frame
main.py - ties everything together, Tkinter dark themed panel showing the live cart and total, OpenCV camera window showing the annotated feed, both running together
━━━━━━━━━━━━━━━━━━━━━━
PROBLEMS
Several source files were empty on disk, had to repaste everything. Stale pycache was loading a broken cached version of detector.py. Ultralytics and opencv were not installed locally. prices.json was empty and throwing a JSON error on startup. Wrong camera index was hitting the built in webcam instead of the external one. Local
best.pt was a placeholder with nothing in it, temporarily swapped in yolov8n.pt to test the pipeline then pulled the real checkpoint
down from Drive.
━━━━━━━━━━━━━━━━━━━━━━━
WHERE THINGS ARE AT
Pipeline is fully working end to end. Camera feed shows the tripwire line and bounding boxes, items crossing get added to the cart panel with their price, subtotal and HST update live, total shows in green. Detection is decent for 15 epochs, right general categories but not perfectly precise yet which is expected. Once GPU access comes back finishing the remaining 35 epochs then swapping in the final best.pt.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.