VIDA-NYU / tile2net

Automated mapping of pedestrian networks from aerial imagery tiles
BSD 3-Clause "New" or "Revised" License
146 stars 22 forks source link

raster.create_mask() documentation clarification #32

Closed rafiibnsultan closed 12 months ago

rafiibnsultan commented 12 months ago

Hello, I was using raster.create_mask() to create annotated mask. Can you clarify these two parameters that the functions take?

usecols: list list of columns to be used col: dict column name to be used as the label

So, working with the sidewalk shapefile of Washington DC. The attributes/ columns are: ['OBJECTID', 'FEATURECOD', 'DESCRIPTIO', 'CAPTUREYEA', 'CAPTUREACT', 'GIS_ID', 'SHAPEAREA', 'SHAPELEN', 'geometry']

So, if I want to take only sidewalk and crosswalk here: usecols: 'DESCRIPTIO' col: ['Sidewalk', 'Crosswalk']

raster.create_mask( dest_path='./GT', # Specify the destination path for saving the masks class2={ 'path': '/source_path_of_shapefile', # Path to the shapefile for this class 'usecols': 'DESCRIPTIO', # List of columns to be used from the shapefile 'col': ['Sidewalk', 'Crosswalk'], # Column name to be used as the label 'color': ['red', 'blue'], # Color to be used for plotting this class 'order': 1 # Z-order (plotting order) for this class } )

This should be it, right? I am a bit confused here. If you could clarify this, it would be great!

Mary-h86 commented 12 months ago

@rafiibnsultan Thank you for your inquiry. Currently, we do not provide support for training and mask generation in our public repository. However, we have plans to incorporate mask generation support in the future along with comprehensive documentation.

The current method relies on utilizing another configuration file for mask generation and extracts input arguments from that dictionary. Your understanding is generally correct; nevertheless, there are some subtle considerations to regarding z-order and the list of columns to be utilized in the process, such as including the geometry column in the list of columns. We will ensure clarity on these matters when we integrate them fully in our public repo.

If you have any further questions or require assistance with any other parts, please feel free to ask!