Mstfakts / Building-Detection-MaskRCNN

Building detection from the SpaceNet dataset by using Mask RCNN.
224 stars 22 forks source link

How to rename the file #3

Open nickzheng1 opened 3 years ago

nickzheng1 commented 3 years ago
  1. What are the total files that need to be renamed?
  2. What are the rules for renaming? Can you give an example of how to rename it? (I followed the rules of RGB-PanSharpen_AOI_2_Vegas_imgg1.tif, RGB-PanSharpen_AOI_2_Vegas_imgg2.tif..... and buildings_AOI_2_Vegas_imgg1.geojson. When the buildings_AOI_2_Vegas_imgg2.geojson is extracted, there will be an error that does not match the actual mask.
  3. Is the file extracted by create_mask.py useful? I see that the mask image is not used in SpacenetTrain.py. Thank you for your help! The following is the interface output by train.py after I renamed it according to my method 1 2
monykini commented 3 years ago

1) I personally renamed them to rgb0.tiff, geo0.geojson There are no specific rules to rename them, You just have to know how to read the train code , So you can import them as needed 2) The create Mask function is useful if you want to make sure the masks are accurate 3) The Create masks function is used in combination displaying Mask & Image side by Side , this can be used for confirmation that your files are sorted and correct :) 4) there are still somethings that could be better explained, Ill try and to write down some things as soon as im done

monykini commented 3 years ago

image

Mstfakts commented 3 years ago

Hello,

Sorry for the late response, I am really busy with my graduation project.

1- You only need to convert TIFF files into RGB files. Do not try to convert geojson files, which are the ground truths, into an image. This method, takes an image_id and find its corresponding ground-truth geojson file. Then returns a NumPy array which consists of ones and zeros for each building. If an RGB picture has 7 buildings, then this method returns a 7xHxW NumPy array.

2- When the masks and images do not match, please check if you shuffle data or not. Sometimes people miss it out.

Good luck!