Pretrained model in the README

Former-commit-id: 67bf11b4db4c5f2891bd7e8e7f58bcde8ee2d2db
This commit is contained in:
milesial 2020-08-12 00:42:01 -07:00
parent c3c2675369
commit d43eaa1115
2 changed files with 9 additions and 1 deletions

View file

@ -81,6 +81,14 @@ By default, the `scale` is 0.5, so if you wish to obtain better results (but use
The input images and target masks should be in the `data/imgs` and `data/masks` folders respectively. The input images and target masks should be in the `data/imgs` and `data/masks` folders respectively.
### Pretrained model
A [pretrained model](https://github.com/milesial/Pytorch-UNet/releases/tag/v1.0) is available for the Carvana dataset. It can also be loaded from torch.hub:
```python
net = torch.hub.load('milesial/Pytorch-UNet', 'unet_carvana')
```
The training was done with a 100% scale and bilinear upsampling.
## Tensorboard ## Tensorboard
You can visualize in real time the train and test losses, the weights and gradients, along with the model predictions with tensorboard: You can visualize in real time the train and test losses, the weights and gradients, along with the model predictions with tensorboard:

View file

@ -130,7 +130,7 @@ def get_args():
help='Number of epochs', dest='epochs') help='Number of epochs', dest='epochs')
parser.add_argument('-b', '--batch-size', metavar='B', type=int, nargs='?', default=1, parser.add_argument('-b', '--batch-size', metavar='B', type=int, nargs='?', default=1,
help='Batch size', dest='batchsize') help='Batch size', dest='batchsize')
parser.add_argument('-l', '--learning-rate', metavar='LR', type=float, nargs='?', default=0.1, parser.add_argument('-l', '--learning-rate', metavar='LR', type=float, nargs='?', default=0.0001,
help='Learning rate', dest='lr') help='Learning rate', dest='lr')
parser.add_argument('-f', '--load', dest='load', type=str, default=False, parser.add_argument('-f', '--load', dest='load', type=str, default=False,
help='Load model from a .pth file') help='Load model from a .pth file')