You can organize the images along similar to the organization in the VOC challenge.
That is, you should have the following directory tree:
my_dataset
|
+--- InputImages
| |
| +--- 000.png
| +--- 001.png
| +--- 002.png
| ...
|
+--- SegmentationMasks
| |
| +--- 000.png
| +--- 001.png
| +--- 002.png
| ...
|
+--- ImageSets
|
+--- train.txt
+--- val.txt
+--- test.txt
That is, you store all input images under InputImages
folder and all the segmentation masks you have under SegmentationMasks
folder. Make sure the mask SegmentationMasks/000.png
corresponds to InputImages/000.png
(and so on for all images and masks).
Additionally, you can have a fixed split of your dataset into "train", "validation" and "test" sets. This split is stored in the test files under ImageSets
:
The file train.txt
lists the image ids that are part of the train set, val.txt
lists the ids of the validation set and so on.
Make sure all ids are included in the split, and no image appears in two splits.
(That is, the union of "train.txt" + "val.txt" + "test.txt" = all ids, and the intersection is empty).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…