Closed ktakanopy closed 4 years ago
Do you mean without the pre-trained weights from PyTorch's model zoo or your own model_weights.pth file? If the former, then as of now no, as Detecto uses those weights for transfer learning on your custom dataset. If the latter, you can just not include the second line of code in your example (your model will not be accurate however until you train it again).
Do you mean without the pre-trained weights from PyTorch's model zoo or your own model_weights.pth file? If the former, then as of now no, as Detecto uses those weights for transfer learning on your custom dataset. If the latter, you can just not include the second line of code in your example (your model will not be accurate however until you train it again).
From what I understand every time I initialize a core.Model () model of the detector, pytorch downloads pre-trained weights and for this reason this line appears in my output: Downloading: "https://download.pytorch.org/models/fasterrcnn_resnet50_fpn_coco-258fb6c6.pth" to /root/.cache/torch/checkpoints/fasterrcnn_resnet50_fpn_coco-258fb6c6.pth
What I would like to do is avoid this download.
Unfortunately, there's no way to avoid this download, as Detecto is built specifically on top of PyTorch's Faster RCNN. In the future, I'm hoping to add more models including potentially allowing users to pass in custom models, but that might be a ways off. If this is something you feel strongly about though, I'm always open to pull requests for new features!
Is possible to initialize core.Model() without initialize pretrained model? I using this following code to load model weights: