Rocket
Rocket

Reputation: 553

Which is better approach to train images

Can we put the training data into separate directories for each class, and loop through the images in each directory, and set the labels based on the directory like if i put the positive images in one directory with 50 images and assign all that images to 1 and another directory with 50 negative images assign all that images -1 ? is this the right approach or this make the trainer untrain ?

string PosImagesDirectory="E:\\faces\\";
string NegImagesDirectory_2="D:\\not_faces\\";

I first loop through all the images of faces and assign them 1 and than loop through not_face and assign them -1

Or using the approach that in only have one directory like string YourImagesDirectory_2="D:\\images\\";

and it contain both positive and negative images , and take images randomly , and i mark them number that which image is positive and which is negative but i am not clear about this approach .

I want to train my data through images using feature algorithms like SIFT/HOG/Bow

Upvotes: 1

Views: 178

Answers (1)

Michele mpp Marostica
Michele mpp Marostica

Reputation: 2472

I don't understand your second approach. Do you mean to label them manually one image at a time when they are loaded?

I think that the first approach is ok. You do not need to label them manually, just iterate and label them.

Upvotes: 2

Related Questions