Closed github-luffy closed 4 years ago
Maybe your network cannot reach the model server. You can download it manually here and rename it to "model". Then you can pass the directory of the folder containing the model file to the "model_folder" argument.
Check the model loading code here: https://github.com/hkchengrex/CascadePSP/blob/master/segmentation-refinement/segmentation_refinement/main.py
The input image and mask can be of any size?or What is this demo used for? image = cv2.imread('test/aeroplane.jpg') mask = cv2.imread('test/aeroplane.png', cv2.IMREAD_GRAYSCALE)
The input image/mask need to be of the same size. The demo images are located here: https://github.com/hkchengrex/CascadePSP/tree/master/segmentation-refinement/test.
The input image/mask need to be of the same size. The demo images are located here: https://github.com/hkchengrex/CascadePSP/tree/master/segmentation-refinement/test.
Thanks for replying. I want to test my own images. It doesn't work? Must I train my own dataset?
Train my own dataset, a bug as above:
Traceback (most recent call last):
File "train.py", line 124, in
The bug has been fixed, but will it affect training?
The input image/mask need to be of the same size. The demo images are located here: https://github.com/hkchengrex/CascadePSP/tree/master/segmentation-refinement/test.
Thanks for replying. I want to test my own images. It doesn't work? Must I train my own dataset?
How does not it work? Did it crash or just perform badly?
Train my own dataset, a bug as above: Traceback (most recent call last): File "train.py", line 124, in train_integrator.finalize('train', total_iter) File "/data/YXQ/CascadePSP/util/log_integrator.py", line 50, in finalize k, v = hook(self.values) File "/data/YXQ/CascadePSP/util/metrics_compute.py", line 16, in lambda x: get_new_iou_hook(x, '224'), lambda x: get_iou_gain(x, '224'), File "/data/YXQ/CascadePSP/util/metrics_compute.py", line 6, in get_new_iou_hook return 'iou/newiou%s'%size, values['iou/newi%s'%size]/values['iou/newu%s'%size] ZeroDivisionError: float division by zero
The bug has been fixed, but will it affect training?
Probably because not even a single pixel has been predicted as foreground. Usually doesn't happen, but it's fine if it is just the early stage of training and the network adapt itself later on.
The input image/mask need to be of the same size. The demo images are located here: https://github.com/hkchengrex/CascadePSP/tree/master/segmentation-refinement/test.
Thanks for replying. I want to test my own images. It doesn't work? Must I train my own dataset?
How does not it work? Did it crash or just perform badly?
perform badly.
I don't know what your test images are so I cannot comment on that. Training on your own images may help.
run demo.py for my own image and mask , make sure image and mask right, but get output image as below. nothing?
Can I take a look at the input image/mask? The output image isn't that useful.
- We assume the input mask to be a grayscale 0~255 image. You need to change the code for loading your mask to achieve that.
- The face regions do not have clear boundaries (e.g. not an object, but semantic regions) which are indeed very different than our training images. Training on your own dataset (e.g. faces with these kinds of label) would definitely help.
Thanks very much. Got it.
Downloading the model file into: /home/dell/.segmentation-refinement/model... How to get model ?thanks