How to prepare datasets/CIHP/labels and datasets/CIHP/edges
See original GitHub issueHello!
Can you explain please how to prepare files, which should be located in this directories: datasets/CIHP/labels and datasets/CIHP/edges
I’ve prepared the image file datasets/CIHP/images/image.jpg,
file datasets/CIHP/list/val_id.txt with content:
image
and file datasets/CIHP/list/val.txt with content:
images/image.jpg /labels/image.png
But I don’t understand how I can generate datasets/CIHP/labels/image.png and datasets/CIHP/edges/image.png ?
Because I need them for test_pgn.py. You answered here that in this dir can be placed any png image. But if I just convert image.jpg to image.png and put converted file into labels and edges dir the execution of the test_pgn.py failed with error
InvalidArgumentError (see above for traceback): assertion failed: [`labels` out of bound] [Condition x < y did not hold element-wise:] [x (mean_iou/confusion_matrix/control_dependency:0) = ] [255 255 255...] [y (mean_iou/ToInt64_1:0) = ] [20]
Please explain how to prepare image files for starting the segmentation process? Because your README.md file doesn’t explain how to do it. Just “Prepare the images and store in $HOME/datasets”. But what steps need to be done to prepare images in datasets dir?
Inference
- Download the pre-trained model and store in $HOME/checkpoint.
- Prepare the images and store in $HOME/datasets.
- Run test_pgn.py.
- The results are saved in $HOME/output
- Evaluation scripts are in $HOME/evaluation. Copy the groundtruth files (in Instance_ids folder) - into $HOME/evaluation/Instance_part_val before you run the script.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (2 by maintainers)
Top GitHub Comments
I think a lot of people got confused about this. I was confused too, initially.
You don’t actually have to install MATLAB or Octave, create good
edges
andlabels
. That won’t make the result better. The only reason it takes in edges and labels at all is to measure accuracy and precision.I just wrote a method that doesn’t require MATLAB or Octave, only the
python
modules PGN already requires:You can use Logwell’s MATLAB code, but it won’t improve performance.
感觉作者的回复有些敷衍, 希望作者能把README写得更清楚点~