PPPW / deep-learning-random-explore

194 stars 34 forks source link

Object detection models #13

Open denisvlr opened 4 years ago

denisvlr commented 4 years ago

Pytorch recently included pretrained object detection models such FastRCNN ( torchvision.models.detection.faster_rcnn). Do you know how to integrate them with fastai?

PPPW commented 4 years ago

Hi @denisvlr, PyTorch provided a very good tutorial on this topic: https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html

It does the transfer learning, and we can customize the learning rate scheduling. If we want to use it with fastai, we have to customize the data loader as well as the loss function, as the PyTorch model requires both image and target as input, and the forward returns the loss during training. I don't think it's worthy tweaking it to fit the fastai framework, I think it's much less work by customizing from the above tutorial...