How to improve my IA Error rate > 50%

Hello I’m a Newbie in FastAI,

I’m usign FastAI to detect how many boxes are in the image Ex:
But the error is alwais bigger than 50%, what I should change, to improve the IA?


 box = DataBlock(
blocks=(ImageBlock, CategoryBlock), 
item_tfms= RandomResizedCrop(150, min_scale=0.35),
#batch_tfms=[*aug_transforms(size=half), Normalize.from_stats(*imagenet_stats)])
batch_tfms=aug_transforms(size=150, min_scale=0.75))

learn = cnn_learner(dls, resnet50, pretrained=True, metrics=[error_rate])


learn.fine_tune(5, base_lr=1.4454397387453355e-05))



What I should do? More image in the Database (460)? More Epoch? Use a diferent system or images?

Thank you.

Hi Sombrax hope all is well.

The images aren’t as distinctive as faces, maybe increasing the number of images could help. I would try wih tthe same number of images first, but use a bigger Resnet model, see how this works then increase the number of images so you can see what makes the most difference.

I had a similar issue before and increasing the model size helped a lot.

Also make sure you have enough images in each class. currently it looks like model thinks the majority of images are three.

I normally use a minimum of 200-600 images per class depending on how different the classes are from each other.

Hope this helps.

Cheers mrfabulous1 :smiley: :smiley:

Thanks, I’ve got 8% error, with 152 layers and 80 epooch, I expect that with more images I would have needed less epoch and less error rate

1 Like

Hi Sombrax hope you are well!
Glad have you increased your accuracy!
Looks like a bigger model helped.

Cheers mrfabulous1 :smiley: :smiley: