Small changes to README
Former-commit-id: 2c17549a3dc926730e9fcd16ec18610a9e5ec391
This commit is contained in:
parent
50cbf66b21
commit
617f334e06
|
@ -33,7 +33,14 @@ You can specify which model file to use with `--model MODEL.pth`.
|
|||
|
||||
`python train.py -h` should get you started. A proper CLI is yet to be added.
|
||||
## Warning
|
||||
In order to process the image, it is splitted into two squares (a left on and a right one), and each square is passed into the net. The two square masks are then merged again to produce the final image. As a consequence, the height of the image must be strictly superior than half the width. Make sure the width is even too.
|
||||
In order to process the image, it is split into two squares (a left on and a right one), and each square is passed into the net. The two square masks are then merged again to produce the final image. As a consequence, the height of the image must be strictly superior than half the width. Make sure the width is even too.
|
||||
|
||||
## Dependencies
|
||||
This package depends on [pydensecrf](https://github.com/lucasb-eyer/pydensecrf), available via `pip install`.
|
||||
|
||||
## Notes on memory
|
||||
|
||||
The model has be trained from scratch on a GTX970M 3GB.
|
||||
Predicting images of 1918*1280 takes 1.5GB of memory.
|
||||
Training takes approximately 3GB, so if you are a few MB shy of memory, consider turning off all graphical displays.
|
||||
This assumes you use bilinear up-sampling, and not transposed convolution in the model.
|
||||
|
|
3
eval.py
3
eval.py
|
@ -32,7 +32,7 @@ def eval_net(net, dataset, gpu=False):
|
|||
dice = dice_coeff(y_pred, y.float()).data[0]
|
||||
tot += dice
|
||||
|
||||
if 1:
|
||||
if 0:
|
||||
X = X.data.squeeze(0).cpu().numpy()
|
||||
X = np.transpose(X, axes=[1, 2, 0])
|
||||
y = y.data.squeeze(0).cpu().numpy()
|
||||
|
@ -47,7 +47,6 @@ def eval_net(net, dataset, gpu=False):
|
|||
ax3 = fig.add_subplot(1, 4, 3)
|
||||
ax3.imshow((y_pred > 0.5))
|
||||
|
||||
|
||||
Q = dense_crf(((X*255).round()).astype(np.uint8), y_pred)
|
||||
ax4 = fig.add_subplot(1, 4, 4)
|
||||
print(Q)
|
||||
|
|
Loading…
Reference in a new issue