I’m new to Raspberry Pi and Hailo, so apologies if these are basic questions. I’ve been using hailo-rpi5-examples and I’ve also downloaded hailo-apps-infra. Am I right that hailo-rpi5-examples is mainly for simple Raspberry Pi demos, while hailo-apps-infra is intended for building real applications? The documentation in hailo-apps-infra looks much more detailed.
Goal
I want to create my own application and structure the project so it stays compatible with future Hailo updates.
Questions
Project structure & compatibility
If I replace hailo-detect.py with my own script (e.g., my_application_hailo.py), should I keep it in the same folder as hailo-detect or elsewhere?
My script will add an extra thread that talks to my API and, when a certain detection occurs, starts a process from that thread. What’s the recommended way to organize this so updates from Hailo are easy to pull without conflicts?
Stabilizing detections (reducing false positives)
Outdoors I sometimes see very brief false detections. I’d like to add temporal smoothing—e.g., require the same class to appear across N consecutive frames or for X seconds—before triggering actions.
Is it better to implement this on the Hailo device, or should I handle it in my application’s callback function?
Classes / animals to detect
I want to detect animals such as birds, cats, dogs, etc. The current model seems limited for that. I’m reading retraining_example.md, which mentions using the Hailo AI SW-Suite from the Developer Zone, or installing DFC and the model-zoo in the same virtual environment.
What’s the difference between these approaches? Can training be done on Windows, or should I use Ubuntu? Could it run on a Raspberry Pi, or is it too resource-intensive (so a cloud VM like Azure would be better)? What do others use in practice?
Datasets & formats
Should I source datasets from Kaggle, or are there other recommended providers? Is there a specific dataset format I should follow?
When retraining, how do I retain the model’s existing knowledge (transfer learning) rather than starting from scratch?
General motion / presence signal
If I can’t label every animal right away, is there a way to output a generic “moving animal/person detected” signal for regions in the frame, in addition to specific classes?
The examples provided by Hailo are a means to show the capabilities of the Hailo hardware. They will evolve and change when necessary. You can organize your projects to whatever fits your needs.
There are multiple options depending on the model.
For models trained with a generic dataset like COCO you can retrain the model with data that is more representative to your use case.
You can experiment with threshold settings for some models.
You can use a tracker and filter as you suggested.
We also have a slightly older video guide Zoo Retrained Model in TAPPAS that will be useful if you have not retrained a model before. Hailo Developer Zone - Training and support
Our retraining runs on Ubuntu. The same setup as for the Hailo AI Software Suite Docker. You create the new Docker from within the suite.
When you use any other framework for the model training, you can use whatever is supported. You can then bring the ONNX or TFLite file over to the Hailo Dataflow Compiler.
The Raspberry Pi is not the right platform for model training. Not for a model you will run on a Hailo. You will need a higher-end PC with a NVIDIA GPU. If you do not have such a PC you can use a cloud service.
Kaggle is an option. There are other providers as well.
This depends on the model. For some type of datasets you can chose the format when you download them.
See above.
Labeling is a tricky business. Some models clearly state that every instance of an object should be labeled to avoid accuracy issues.
I recommend having a chat with ChatGPT about these generic issues for more detailed information.
So, is it better to start using hailo-apps-infra instead of the RPI examples?
We will start with the model you have created and simply retrain it. I believe all the tools for retraining are included within the Zoo project in the Git repository?
I can install Ubuntu on my PC in a virtual environment, and once I am a little more comfortable, I may move to a cloud service.
How can I check which models are currently installed on the Hailo device so I know which ones to retrain?
You should run Ubuntu natively on a machine and use the Hailo AI Software Suite Docker (available in the Developer Zone). This is the easiest way to install the Hailo Dataflow Compiler, Model Zoo, HailoRT and dependencies. You can use dual boot on your PC if you use Windows for other purposes.
Do not use WSL. This is supported for frameworks that run on Windows and want to use the DFC under the hood. It comes with its own limitations.
I plan to run Ubuntu on an Azure virtual machine, as I’ve read that the latest Ubuntu has dual-boot issues with Windows 10. I don’t want to risk corrupting anything on my PC. Do you recommend any particular VM series? I don’t mind it taking an additional hour of processing if I can use a more economical series. Alternatively, can this be run on an Apple Mac?
Regarding Azure, I was considering the highlighted option. From what I’ve read on one of the GitHub repositories, an RTX 4080 was used, so I assume the GPU should be equivalent to that? This is from Azure
I’ve logged in to the developer portal and can see a Docker version and also an extractable package. Am I correct in understanding that, once I have this installed, I don’t need to download anything from GitHub? What is the purpose of the GitHub projects once the Docker files are installed? I’m trying to understand when to use the projects from GitHub and how they differ from the tools in Docker.
Do I need to install a PCIe driver? My Hailo-8L module is attached to the Raspberry Pi. Is there any alternative way to run the suite with the module attached to the Raspberry Pi?
I plan to start with an existing model from the Model Zoo. In principle, when I retrain a model and intend to keep retraining it, do I need to include the previous datasets again? For example, if I want it to detect cats and dogs, and later update it to also detect bikes and cars, how do I ensure the new classes don’t overwrite the existing ones? Also, during retraining, I will be downloading datasets—if I have multiple datasets, should I train them individually or all at once?
Please correct me if I’m wrong: for what I’m trying to achieve, is everything done using the Hailo Model Zoo? Do I need to use any other tools? I believe DFC is only used to convert the retrained model to the .hef format.
Our runtime software is open-source. This allows our customers to port the runtime software to other Linux variants or OS e.g. Android without our support.
The model conversion workflow is independent of the runtime. You convert your model to the HEF format in the model build environment and then run it in the runtime environment.
@KlausK For the retraining, we have a Windows PC with a basic GPU NVidia GTX1600, so we might need a Virtual Machine. What spec should I create this? Is there a minimum specification I should follow?
So for multiple models, it is better to keep them as individual models and let user select what they aim to detect? Instead of having one global model detecting multiple thigns.
You will need to check this for each model. In general for model training bigger is better. This is a classical "What do you have more? Time or money? question.
Unfortunately, the GTX1600 does not look like a good fit. Maybe for a small model with reduced batch-size.
It depends on your use case and trade-offs:
Multiple specialized models:
Usually higher accuracy per task (since each model is optimized for one target).
Easier to maintain and improve each model independently.
Useful if the user only needs to detect one thing at a time (they can just pick the relevant model).
One global/multi-class model:
More efficient if you often need to detect many things at the same time.
Simpler deployment (only one model to manage).
Can be harder to train well, especially if classes vary a lot in complexity or frequency.
Performance for individual classes may drop compared to specialized models.