Views
No views yet
state_dict) of an EfficientNet-B0 model fine-tuned for binary classification of satellite images to detect the presence of forest fires.Note: This repository contains only the model weights (state_dict), not the complete serialized model.
state_dict is provided, recreate the model architecture before loading the weights.1import torch
2from torchvision.models import efficientnet_b0
3
4model = efficientnet_b0(num_classes=2)
5
6state_dict = torch.load(
7 "efficientnet_b0_state_dict.pt",
8 map_location="cpu"
9)
10
11model.load_state_dict(state_dict)
12model.eval()1from torchvision import transforms
2
3transform = transforms.Compose([
4 transforms.Resize((224,224)),
5 transforms.ToTensor(),
6 transforms.Normalize(
7 mean=[0.485,0.456,0.406],
8 std=[0.229,0.224,0.225]
9 )
10])