Question

If I use the createsamples.exe with the -img parameter, the output .vec file contains the combination of the positive sample and the negative samples.

If I use it with the -info parameter, it cuts and resizes only the annotated image, but they will not combined with the negative samples.

How is it possible, to create the combination of more positive images and the negative images?

For example I want to create 50 samples with a picture witch is token on the street, and other 50 with a picture witch is token in a room. I want to use the output .vec file with traincascade.

I don't want to recognize the street or the room. I meant with this example, that I take a picture for example from a company logo on the street (when the sun is shining, or it is raining, so the logo looks like different because of the other light conditions), and from the same logo in a room too (where the light is from a lamp).

So I want to take from the logo some pictures in other light conditions. But I don't want to take pictures from it from different angles, this would the createsamples do, if it is possible.

My question is, how to use the createsamples.exe with more positive images, where the output contains the original positive images in different angles on the background images.

Was it helpful?

Solution 2

I found the solution. Here is a softver, that can merge the created .vec files, that are made with -img parameter: mergevec.cpp

OTHER TIPS

It's contains the combination of the positive sample and the negative samples amazing, because vec should contain only positive samples. When you start training you should specify where are positiv (vec) and negative like txt file with images list. Also you probably don't understand how it work. You can train it to find one type of object like differents byt only faces, only eyes, only noses, only bottles... for one cascade. Street and the room isn't similar to each other, so you need two cascades to find the streets and rooms.

P.S. 50-100 samples is really few. Also I can't imagine how you are going to recognize the street or room. Read something about Haar or LBP algoritms (how it work, not how to use it) to understand why you probably will not be able to do...

P.P.S. sorry for my English...

--add:

I did something like you want next way: e.g. I have 50 img's I want use in createsamples. I create 100 samples for each img's. Yes, I have 50 info files with 100 samples locations. I union they all to one info file and create vec file using this big info file. Because it is a lot of work, I made a small program.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top