-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add example notebooks + multiple major changes #1470
Conversation
2c0dc46
to
e7cb076
Compare
69accd2
to
cab9765
Compare
- remove get_transformed_window() method from RasterioSource
- remove SubRasterSourceConfig - update usages in examples and tests
What was previously supposed to be num_channels is now num_channels_raw. num_channels is now defined to be len(channel_order). This is still problematic because there is not guarantee that the raster transformers won't change the number of output channels.
- move minimum necessary code to core/data/utils/vectorization.py - update usages - remove other references to mask_to_polygons - remove unused min_aspect_ratio field from BuildingVectorOutputConfig - set default denoise radius value to 8 - remove "vector evaluation"
- fix bug in buffer_geoms() - fix shapely deprecation warning: ``` ShapelyDeprecationWarning: __len__ for multi-part geometries is deprecated and will be removed in Shapely 2.0. Check the length of the `geoms` property instead to get the number of parts of a multi-part geometry. ``` guard against a sneaky bug - https://stackoverflow.com/questions/26320899/why-is-the-empty-dictionary-a-dangerous-default-value-in-python - allow geojson file to be cached in GeoJSONVectorSource - vector source performance improvements - cache transformed geojson - allow geojson utils to skip processing if no eligible geoms
- Add delay of 5 sec to progressbars in other FileSystems. This will cause the bars to only appear if it takes longer than 5 sec.
- doc fixes - make scene_dataset and window_opts optional in GeoDataConfig - allow calling Learner.train() with custom number of epochs
- add an extract() function to pipeline.file_system.utils that uses shutil.unpack_archive(). - add an item_limit arg to parse_stac()
These can be passed directly to matplotlib.color.ListedColorMap.
- Set skip_validation=True in torch.hub.load() to avoid the validation step that was the cause of the bug in the first place, since it's of dubious usefulness and still contains an infinite loop. - update unit tests
Unlike the parent class, RasterioSource applies channel_order before raster_transformers. So the number of output channels is not guaranteed to be equal to `len(channel_order)`.
- RasterSource.get_crs_transformer() - CRSTransformer: get_affine_transform(), get_image_crs(), get_map_crs() - ClassConfig.get_null_class_id()
Codecov Report
@@ Coverage Diff @@
## master #1470 +/- ##
==========================================
- Coverage 73.35% 71.70% -1.66%
==========================================
Files 184 186 +2
Lines 8884 8947 +63
==========================================
- Hits 6517 6415 -102
- Misses 2367 2532 +165
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
...ervision_core/rastervision/core/data/label_store/semantic_segmentation_label_store_config.py
Show resolved
Hide resolved
rastervision_core/rastervision/core/evaluation/semantic_segmentation_evaluation.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your clarifications made sense. I think we should leave things as is.
Overview
This PR adds the following 5 notebooks:
reading_raster_data.ipynb
(3.89 MB)reading_vector_data.ipynb
(218 KB)reading_labels.ipynb
(1.80 MB)ClassConfig
.sampling_training_data.ipynb
(2.57 MB)GeoDataset
.misc.ipynb
(2.32 KB)In service of the above, it makes the following major code changes:
ActivateMixin
entirely.STRTree
usage with GeoPandasGeoDataFrame
-based spatial joins inChipClassificaitonLabelSource
andRasterizedSource
.ShapelyDeprecationWarning: STRtree will be changed in 2.0.0 and will not be compatible with versions < 2.
ShapelyDeprecationWarning: Setting custom attributes on geometry objects is deprecated, and will raise an AttributeError in Shapely 2.0
mask-to-polygons
dependency.RasterSource
andLabelSource
.x_shift
andy_shift
inRasterioSource(Config)
into aVectorTransformer
.extent_crop
added in Add ability to crop raster source extent #1030.Other minor changes:
CRSTransformer
so that it can now operate directly on: RV Boxes, Rasterio Windows, and Shapely geoms.MultiRasterSource
by removingSubRasterSourceConfig
andraw_channel_order
.StatsTransformer.from_raster_sources()
for easy initialization.RasterioSource
so that it only reads the required bands.RasterSource.num_channels
intoRasterSource.num_channels
andRasterSource.num_channels_raw
.LocalFileSystem
.tqdm
-based.ClassConfig
.RasterSource
and other classes into properties.ChipClassificationLabels
.buffer_geoms()
plus other minor improvements ingeojson.py
.Learner
tweaks:GeoDataConfig
.Learner.train()
with custom number of epochs.Box
tweaks.grep
regex inDockerfile
to handle blank lines and comment lines.Checklist
[ ] Addedneeds-backport
label if PR is bug fix that applies to previous minor releaseNotes
Requirements changes:
mask-to-polygons
removed==1.8.4
.Backward-compatibility breaking changes:
SubRasterSourceConfig
.background_class_id
required inChipClassificationLabelSourceConfig
if inferring cells.Testing Instructions
Closes #1275
Part of #1460
Part of #1459