metadata
tags:
- biology
- pytorch
metrics:
- accuracy
pipeline_tag: image-classification
Butterfly image classification model that use pre-trained cnn model resnet18 and fine-tuned the last fully connected layer to classify 75 categories of butterfly species. The model used the best checkpoint with 90% test accuracy. The model constructed on Pytorch environment.
training and testing result:
Epoch: 28 Train Loss: 0.17 Train Accuracy: 0.96 Test Accuracy: 0.90
to use this model you have to:
- download the model
- load pretrained model resnet18
- model = models.resnet18(pretrained=True)
- load checkpoint from your local
- checkpoint = torch.load('butterfly_resnet_checkpoint.model')
- model_for_predict.load_state_dict(checkpoint)
- predict the images
- model_for_predict.eval())