Reputation: 9
I just begin learning deep learning and my first homework is to finish an leaves-classification system based on convolutional neural networks.I built a resnet-34 model with the code on github to do it.However,my teacher told me that the basic training unit in his dataset is an image pair.I should use 2 images(photos of the same leaf under different light conditions) as the input,combining two 3-channel images into one 6-channel image,but I don't know how to input 2 images and combine them into 6 channels.How can I do that?Are there any functions?Should I modify the structure of the resnet network?
this is my dataset,you can see every two images are about the same leaf.
Upvotes: 1
Views: 2171
Reputation: 114976
You have several issues to tackle:
Dataset
with a __getitem__
method that returns 2 images (and a label) instead of the basic ones that returns a single image and a label. You'll probably need to customize your own dataset.state_dict
of ResNet34 because of changes #3 and #4 - you'll have to do it manually for the first time.Upvotes: 2