Here is the competition: HuBMAP + HPA - Hacking the Human Body | Kaggle
Now this competition is quite difficult. I decided to start small and try to predict the organ where the image is from.
I created this easy dls
dls = DataBlock(
blocks=(ImageBlock(cls=PILImageBW), CategoryBlock),
getters=[ColReader('path_id'), # image input
ColReader('organ')],
splitter = RandomSplitter(valid_pct=0.2, seed=42),
item_tfms = Resize((640,480), method='squish'),
batch_tfms= aug_transforms(size=(288, 224), min_scale=0.75)
).dataloaders(df)
Where I added to the df the path where the image is store so that I can use the getter attribute to look for the image and the label.
Then I build a learner.
learn = vision_learner(dls, resnet50, metrics=error_rate)
The result was quite good. However, I’m stuck. I really don’t understand how to build the actual label we need to predict. I think that maybe this is an image segmentation problem because you get a JSON file with a lot of different coordinates.