Closed walli-like closed 3 months ago
Hi, @walli-like
Thank you for your point Your idea is right. I fixed README.md file correctly. If you have some help, feel free to ask me questions.
Thank you.
Hi, @walli-like
Thank you for your point Your idea is right. I fixed README.md file correctly. If you have some help, feel free to ask me questions.
Thank you.
@russel0719 Thank you for your reply, and your project really helps me a lot, the training result is mutch better than unet, but I still have doubts about how to use the predict.py.
Hi, I'm glad to hear that my project can help you a lot.
I apologize for using confusing filename. I used predict.py
for validating valid dataset before. So I fixed code that predict.py
is for inferencing image(test) and validate.py
is for validating image(val).
DATASET.TEST.IMAGES_PATH
and DATASET.TEST.MASK_PATH
.predict.py
line 87.I hope this answers can help you. Thank you for your interest in my project.
Hi, I'm glad to hear that my project can help you a lot.
I apologize for using confusing filename. I used
predict.py
for validating valid dataset before. So I fixed code thatpredict.py
is for inferencing image(test) andvalidate.py
is for validating image(val).
- So if you want to inference images after training, you should put each images and masks(optional) in
DATASET.TEST.IMAGES_PATH
andDATASET.TEST.MASK_PATH
.- I'm not sure which image has invalid shape among image, mask, and prediction. But all images should have shape (H, W) or (H, W, C). I can figure out problems well if you check shape of images(image, mask, prediction) in front of
predict.py
line 87.I hope this answers can help you. Thank you for your interest in my project.
@russel0719
For question 2 finally I found the reason
in prediction.py line 68
image = batch_images[index].cpu().numpy()
in my case now image is [3, 240, 240] means shape(C, H, W), so I just swap the elements in image to [240, 240, 3] and then I can inference images
codes is as blow:
image = image.swapaxes(0, 1)
image = image.swapaxes(1, 2)
I hope this can make your project better, thank you again for your patience to help me
@walli-like Thank you for your tests. I fixed the code. I'm sorry for late reply
Thank you!
is that wrong?