You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
after training,model will save three ckpt files, .index .meta and .data, how can I run infer?I run the python main.py --ckpt=models/model.ckpt-4
but the pictures in output are all black. And there is no errors and warnings.
The text was updated successfully, but these errors were encountered:
The infer function is pretty basic, it was written for a binary class situation, you might have to modify it depending on the values your prediction contains.
The FC-DenseNet is also difficult to optimize for other datasets, see problems.
I have used this code to successfully train on a binary class situation, key things to keep in mind are that the model is sensitive to class imbalance, so if you have imbalanced classes (background dominates, then the model will tend to predict background), try the following:
If you have only 2 classes, use --num_classes=1, and use sigmoid cross entropy instead of softmax.
Try changing the loss function to dice coefficient, or weighted cross entropy, and weight the foreground class more.
Try playing around with batch_norm, turning it on or off works sometimes (since segmentation mini-batches are very small, the learned statistics may or may not be a good reflection of the true statistics).
Try using tensorboard logging to visualize the predictions during training and confirming that the network is not falling into a local minimum of predicting all black.
I am not aware of other settings of the problem you are trying to solve, so this is about as much help as I can give.
after training,model will save three ckpt files, .index .meta and .data, how can I run infer?I run the
python main.py --ckpt=models/model.ckpt-4
but the pictures in output are all black. And there is no errors and warnings.
The text was updated successfully, but these errors were encountered: