How to use BING Objectness with self trained model?
Hi, I would like to use the BING Objectness feature with a custom trained model. I am aware, that it is not possible inside of OpenCV, that is why I downloaded the Linux BING Objectness code (https://github.com/torrvision/Objectness) and trained the algorithm by myself. If the training is done, the code creates the following files:
- Filter.png
- ObjNessB2W8MAXBGR.idx
- ObjNessB2W8MAXBGR.wS1
- ObjNessB2W8MAXBGR.wS2
- ObjNessB2W8MAXBGR.xN
- ObjNessB2W8MAXBGR.xP
- PerImgAll.m
- PosNeg.m
- PosNeg.png
and the proposed windows for the test data are also generated in an additional folder "BBoxesB2W8MAXBGR" . I thought I only need to set the training path to the newly generated model files but I get an error:
Can't load model: /ObjNessB2W8MAXBGR.wS1 or /ObjNessB2W8MAXBGR.idx
Can't load model: /ObjNessB2W8HSV.wS1 or /ObjNessB2W8HSV.idx
Can't load model: /ObjNessB2W8I.wS1 or /ObjNessB2W8I.idx
Since the original code managed to create the object proposals I assume, that the model files were generated correctly. But why is OpenCV not able to read them?
Thanks a lot for any help! Mary C:\fakepath\ObjNessB2W8MAXBGR.wS1.png
hmmm, you mean the code from opencv_contrib/saliency ?
code here expects to read .yml.gz files , like it is here
code here differs, somewhat
Yes, I want to use ObjectnessBing from Saliency
can you add a
.png
extension (else you can't upload it) to one of those files, and attach it to your question, please ?it expects files like
ObjNessB2W8I.wS1.yml.gz or /ObjNessB2W8I.idx.yml.gz
, which you don't have.it seems, you trained a slightly different model, than expected.
Please post your answer again, it was correct and solved my problem!
apologies, i'm somehow unable to retrieve it again ;(
I will post it then, it can be helpful for someone else too.