I have found a tutorial about how to train a neural net. How should I train a caffe module
with my own dataset.
There is an axample Cats vs Dogs
and it's clear for me, how I need to do with that data which consists of two types (Dogs
and Cats
). I have tried to follow his steps, and I got a result caffe module
.
Then I would like to increase the type set, I mean, I have trained only on 2
types, now I want 19
types (yes, 19
- different objects) to train.
And the problem I have found is how should I increase the main selection in a caffe module?
Here is the part of the code where I found a problem:
dog_images = [image for image in os.listdir(DATA_DIR) if 'dog' in image]
cat_images = [image for image in os.listdir(DATA_DIR) if 'cat' in image]
dog_train = dog_images[:int(len(dog_images)*0.7)]
dog_test = dog_images[int(len(dog_images)*0.7):]
cat_train = cat_images[:int(len(cat_images)*0.7)]
cat_test = cat_images[int(len(cat_images)*0.7):]
I don't think that if I have 19
types, it means, I need 19
times to write the code like that (upper
).
Also, I have my images not in different folders, I have one and there are about 4,000
images.