Retraining AI model for image detection
Ive been experimenting with object detection in images on my Pi5 using OpenCV. Ive found the Caffe Mobile SSD model from here https://github.com/chuanqi305/MobileNet-SSD performs the best in terms of CPU usage however i would like to improve its accuracy.
Is there any guides on how to start with retraining? I cannot find anything and the instructions on GitHub make no sense to someone new to AI models.
Thanks
Is there any guides on how to start with retraining? I cannot find anything and the instructions on GitHub make no sense to someone new to AI models.
Thanks
Re: Retraining AI model for image detection
Ive discovered I can annotate images using the website cvat.ai and then export the data in PASCSL VOC 1 format which I think is correct for Mobile SSD caffe models? Any advice from there would be great thanks
- Akash Jana
- Posts: 5
- Joined: Tue Sep 16, 2025 3:09 pm
Re: Retraining AI model for image detection
Hi! MobileNet-SSD is fast but limited in accuracy for new objects. To improve it:
Collect & label images – use LabelImg
in VOC format.
Set up training – better on a PC with GPU, install Caffe.
Modify model – change num_classes in .prototxt to match your objects.
Fine-tune – start from pre-trained weights (MobileNetSSD_deploy.caffemodel) and train with your data.
Test – load new model in OpenCV using cv2.dnn.readNetFromCaffe().
Tip: start small (2–3 classes) before scaling up.
Collect & label images – use LabelImg
in VOC format.
Set up training – better on a PC with GPU, install Caffe.
Modify model – change num_classes in .prototxt to match your objects.
Fine-tune – start from pre-trained weights (MobileNetSSD_deploy.caffemodel) and train with your data.
Test – load new model in OpenCV using cv2.dnn.readNetFromCaffe().
Tip: start small (2–3 classes) before scaling up.
Return to "General programming discussion"
Jump to
- Community
- General discussion
- Announcements
- Other languages
- Deutsch
- Español
- Français
- Italiano
- Nederlands
- 日本語
- Polski
- Português
- Русский
- Türkçe
- User groups and events
- Raspberry Pi Official Magazine
- Using the Raspberry Pi
- Beginners
- Troubleshooting
- Advanced users
- Assistive technology and accessibility
- Education
- Picademy
- Teaching and learning resources
- Staffroom, classroom and projects
- Astro Pi
- Mathematica
- High Altitude Balloon
- Weather station
- Programming
- C/C++
- Java
- Python
- Scratch
- Other programming languages
- Windows 10 for IoT
- Wolfram Language
- Bare metal, Assembly language
- Graphics programming
- OpenGLES
- OpenVG
- OpenMAX
- General programming discussion
- Projects
- Networking and servers
- Automation, sensing and robotics
- Graphics, sound and multimedia
- Other projects
- Media centres
- Gaming
- AIY Projects
- Hardware and peripherals
- Camera board
- Compute Module
- Official Display
- HATs and other add-ons
- Device Tree
- Interfacing (DSI, CSI, I2C, etc.)
- Keyboard computers (400, 500, 500+)
- Raspberry Pi Pico
- General
- SDK
- MicroPython
- Other RP2040 boards
- Zephyr
- Rust
- AI Accelerator
- AI Camera - IMX500
- Hailo
- Software
- Raspberry Pi OS
- Raspberry Pi Connect
- Raspberry Pi Desktop for PC and Mac
- Beta testing
- Other
- Android
- Debian
- FreeBSD
- Gentoo
- Linux Kernel
- NetBSD
- openSUSE
- Plan 9
- Puppy
- Arch
- Pidora / Fedora
- RISCOS
- Ubuntu
- Ye Olde Pi Shoppe
- For sale
- Wanted
- Off topic
- Off topic discussion