for new OpenCV XML format ?

we are in the process of training a completely new haar cascade with openCV for our application. We have a running prototype that uses this cascade with openCV and we are now in the process of porting this to the openMV cam.
For this we need to convert the openCV cascade using the tool. Unfortunately this utility seems to expect the old openCV cascade XML format and we did use the new openCV format for our training runs. The training runs take several days/weeks to complete so running them again to produce the old format (-baseFormatSave parameter) is not really an option.

Is there an option to request a new version of that can consume the new openCV cascade XML format to convert for using on the openMV cam ? Or are there any other options to transform the new format into the old one in order to use the without having to retrain our cascades ?

Thanks in advance

Ibrahim will have to check on this for you. It should be possible to update the conversion script to support the new format too.

super - thanks a lot…

K, we took a lot at this and to support the new format would require a rewrite of the haar code. This is not really feasible for us. The new haar format uses a different type of data structure so it’s not even just fixing renames and etc.

Can you load the new format back into OpenCV and then save it as the old format?

Apparently they misjudged the situation, I fixed the importer to work with the new Haar XML format :slight_smile: Its been merged into the github master for OpenMV.

This is true, the new format is now supported thanks to Normen :slight_smile:

I should also mention that I fixed 2 bugs related to Haar in the current FW in case anyone encounters these issues:

  1. The cascade path needed a slash “/” to find a file.
  2. Loading a cascade printed misaligned access warnings (meaning DMA wasn’t used).

They are fixed now and will be included in the next release.