-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Feature layer image data load set #2613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Feature layer image data load set #2613
Conversation
By adding more 'top' params in the data layer in the .prototxt file while keeping the label last, more images can be loaded. This can be used to load for example siamese image pairs from a textfile as created by 'create_imageset' in 'examples/siamese/'. Since this required changes in the BasePrefetchingDataLayer and also other classes are inherited from it, for now a new class: BasePrefetchingMulitDataLayer has been made. After thorough testing, this code can be moved into the original class as it still supports loading only a single entity of data.
Is this just for grayscale images with 1 channel or can it be used for 3 channel images? |
I haven't tested it, but I think it should work with colour images too. |
Hmm not sure if its related to the color channel, but I'm getting the following error when I run the "examples/siamese/create_siamese_from_imageset.sh" script. I have two folder: train_images and test_images, and each have the siamese_set.txt inside. I also checked the paths, and both files exist on disk ERROR! one or both input images are empty: |
This error means that loading of the image failed (there are different reasons to this). But this probably means the path is incorrect. I think you didn't define a root_folder param. Try defining this param from root: /path/to/caffe/ and probably it would work. -------- Original message -------- Hmm not sure if its related to the color channel, but I'm getting the following error when I run the "examples/siamese/create_siamese_from_imageset.sh" script. I have two folder: train_images and test_images, and each have the siamese_set.txt inside. I also checked the paths, and both files exist on disk ERROR! one or both input images are empty: — |
I see that in the files changed that there are RGB images, is it working with RGB? |
Changed the ImageDataLayer to have more than 1 image output.
By adding more 'top' params in the data layer in the .prototxt file while keeping the label last, more images can be loaded.
This can be used to load for example siamese image pairs from a textfile as created by 'create_imageset' in 'examples/siamese/'.
The test for the ImageDataLayer has been extended to include multiple inputs to test. Therefore 3 images have been added to the 'examples/images/' folder.
It has to be noted that since this required changes in the BasePrefetchingDataLayer and also other
classes are inherited from it, for now a new class: BasePrefetchingMulitDataLayer has been made.
After thorough testing, this code can be moved into the BasePrefetchingDataLayer class as it should be compatable.
P.S. This replaces #2608 which contained commits from unrelated work.