The Image.sc Forum is the main discussion channel for BiaPy, hence we recommend to use it for any question or curisity related to it. Use a tag such as “biapy” so we can go through your questions.
My training is too slow. What should I do?
There are a few things you can do: 1) ensure
TRAIN.PATIENCEare set as you want ; 2) increase
TRAIN.BATCH_SIZE; 3) If you are not loading all the training data in memory, i.e.
False, try to setting it to speed up the training process.
I have no enough memory in my computer to set
DATA.TRAIN.IN_MEMORY, so I’ve been using
DATA.EXTRACT_RANDOM_PATCH. However, the training process is slow. Also, I need to ensure the entire training image is visited every epoch, not just a random patch extracted from it. What should I do?
Test image output is totally black or very bad. No sign of learning seems to be performed. What can I do?
In order to determine if the model’s poor output is a result of incorrect training, it is crucial to first evaluate the training process. One way to do this is to examine the output of the training, specifically the loss and metric values. These values should be decreasing over time, which suggests that the model is learning and improving. Additionally, it is helpful to use the trained model to make predictions on the training data and compare the results to the actual output. This can provide further confirmation that the model has learned from the training data.
Assuming that the training process appears to be correct, the next step is to investigate the test input image and compare it to the images used during training. The test image should be similar in terms of values and range to the images used during training. If there is a significant discrepancy between the test image and the training images in terms of values or range, it could be a contributing factor to the poor output of the model.
In the output a kind of grid or squares are appreciated. What can I do to improve the result?
Sometimes the model’s prediction is worse in the borders of each patch than in the middle. To solve this you can use
DATA.TEST.PADDINGvariables. This last especially is designed to remove that border effect. E.g. if
(256, 256, 1), try setting
(32, 32)to remove the jagged prediction effect when reconstructing the final test image.
I trained the model and predicted some test data. Now I want to predict more new images, what can I do?
You can disable
MODEL.LOAD_CHECKPOINT. Those variables will disable training phase and find and load the training checkpoint respectively. Ensure you use the same job name, i.e.
--nameoption when calling BiaPy, so the library can find the checkpoint that was stored in the job’s folder.
The test images and their labels (if exist) are large and I have no enough memory to make the inference. What can I do?
You can try setting
TEST.REDUCE_MEMORYwhich will save as much memory as the library can at the price of slow down the inference process.