diff --git a/README.md b/README.md index 12e6252..96890d1 100644 --- a/README.md +++ b/README.md @@ -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. +### 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 You can visualize in real time the train and test losses, the weights and gradients, along with the model predictions with tensorboard: diff --git a/train.py b/train.py index 200ccfa..c7bc600 100644 --- a/train.py +++ b/train.py @@ -130,7 +130,7 @@ def get_args(): help='Number of epochs', dest='epochs') parser.add_argument('-b', '--batch-size', metavar='B', type=int, nargs='?', default=1, 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') parser.add_argument('-f', '--load', dest='load', type=str, default=False, help='Load model from a .pth file')