Filtering matches from net - retrain advised?
Hello, I successfuly was able to run https://docs.opencv.org/3.4.0/da/d9d/... So i now have a model one which i can recognizes items, lets say bananas. But it will detect much more too.
The obvious way would be to just filter the results based on the classname but this seem not the right way to do somehow. I am worrying a bit about accuracy and performance. Should i retrain the model to only detect my object(banana)? This is a wild idea from me as i am new. I could also dig deeper into the dnn model and maybe manipulate layers / pins.
Maybe i am worrying to much and filtering based on classname is way to go and i should just make sure my model always recognizes my desired object. If this is the case: * Is it a good idea to load the model and train it futher with open cv dnn ? * How to save such a model ?
Thank a lot again + Greetings, Holger
"Should i retrain the model to only detect my object(banana)? " -- that is quite commonly done, so not a wild idea.
unfortunately, you cannot do this from inside opencv, you'd need the original darknet code.
maybe @StevenPuttemans has a more detailled answer ?
Ohh - sad to hear i cannot further train and save the model with open cv(open cv internal formats or classifiers would be ok) - that would be awsome but maybe out of focus of the library. I have to install a dnn for training anyway.
you can easily retrain classifiers with opencv means (just throw away the last dense layers, and add an ANN or such there instead) ,but not the object-detection ones. opencv's dnn has no backpropagation, and thus can't "learn".
Got it - thank you! Will come back on retraining a classifier later - thats very good news for me :-) Btw what does ANN stands for - a certain type of layer?
ANN_MLP it's a network on it's own. basically, you would use the existing pretrained googlenet cnn layers as a "fixed function" preprocessor, and do your own classification, with your own (additional) data
Thank you for the explanation and the link - i would like to raise a question on this later. But before i try to google and search here in example / forum. Also getting the nightly is maybe a good idea as this readNet() could be usefull when trying several dnns.
indeed, getting latest is always a good idea here ! (e.g. support for yolov3 was added a few days ago!)
i learned about yolov3 painfully XD