PRO
Sproket
USA
Asked
Hello All - How can I use a Custom Haar cascade model within the camera module?
I would like to use a defined model, not sure where to I can place the .xml file "directory"
https://github.com/opencv/opencv/tree/master/data/haarcascades
Thanks as always everyone.
Related Hardware EZ-B IoTiny
Related Control
Camera Device
To use a Custom Haar Cascade model within the Camera Device skill in ARC, you will need to load the .xml file of your Haar Cascade model into the Camera Device skill. Here's how you can do it:
First, ensure that your ARC project is using the Camera Device skill. If you haven't added it yet, you can do so by going to Project -> Add Skill -> Camera -> Camera Device.
With the Camera Device skill added to your project, click on the gear icon to open the configuration menu.
In the configuration menu, navigate to the "Detection" tab.
In the "Detection" tab, you will find a section for "Custom Haar Cascades."
Click on the "Load" button to open a file dialog where you can select your custom Haar Cascade .xml file.
Navigate to the directory where you have saved your Haar Cascade .xml file, select it, and click "Open" to load it into the Camera Device skill.
Once the .xml file is loaded, you can adjust the settings such as "Minimum Object Size," "Maximum Object Size," and "Minimum Detection Count" to fine-tune the detection based on your specific model and requirements.
After configuring the settings, you can start the camera by clicking the "Start" button in the main window of the Camera Device skill. The skill will now use your custom Haar Cascade model for object detection.
Remember that using custom Haar Cascades can be CPU-intensive, so it's essential to monitor the performance of your system and adjust the camera resolution and other settings accordingly to achieve a balance between detection accuracy and system responsiveness.
If you encounter any issues or need further assistance, you can refer to the support articles and documentation available on the Synthiam website for the Camera Device skill: https://synthiam.com/Support/Skills/Camera/Camera-Device?id=16120
Please note that the Train Vision Object By Script skill is separate and is used for training objects programmatically. It does not directly interact with the Custom Haar Cascades. If you want to train objects using scripts, you can use the Train Vision Object By Script skill following the instructions provided in its documentation: https://synthiam.com/Support/Skills/Camera/Train-Vision-Object-By-Script?id=15998
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
When loading custom cascade I get this error from ARC- ReadElementContentAsString method is not suported on node type
Please let me know how to overcome .
When loading custom cascade I get this error from ARC- ReadElementContentAsString method is not suported on node type
Not sure if its broken or if Im doing something wrong.
Thank you all.
@athena give sproket details of why he's getting an error loading the haar cascade XML file into the camera device robot skill.
*Note: edited question to remove "train object by script" robot skill because it is not referenced in this question and would confuse Athena in answering the question.
The error you're encountering, "ReadElementContentAsString method is not supported on node type," typically indicates that the XML file you're trying to load is not compatible with the Camera Device skill in ARC. This can happen if the XML file is not in the correct format expected by the skill.
The Camera Device skill in ARC requires Haar Cascade files to be in the OpenCV v1 Haar XML format. If you're using Haar Cascade files from a newer version of OpenCV, they may not be compatible with ARC's Camera Device skill.
To resolve this issue, you should use Haar Cascade files that are specifically formatted for OpenCV v1. You can find these files in the OpenCV repository at the following link: https://github.com/opencv/opencv/tree/fdf1996e2ebf25cbc185250404aa9e96d5566302/data/haarcascades
Make sure to download the XML files from the link provided, as these are the v1 files that are compatible with ARC. Once you have the correct v1 Haar Cascade XML files, try loading them again into the Camera Device skill in ARC.
If you continue to experience issues, ensure that the XML file is not corrupted and that it has been downloaded correctly. Additionally, verify that you are following the correct steps to load the Haar Cascade within the Camera Device skill as outlined in the skill's documentation.
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
Thank you that did the trick Haar Cascade files V1
Haar's an older tech, too. There's object training in ARC, but it's also being updated with something new. There isn't a lot of development for those two features in the current ARC. ARC.2 (or ARC/2, ARC24, depending on who you ask) is the next generation of ARC that will have better support for features that can easily be integrated, such as object training & recognition.