open-forest-observatory / geograypher

Enabling Geospatial Predictions from Individual Drone Images
https://open-forest-observatory.github.io/geograypher/
BSD 3-Clause "New" or "Revised" License
11 stars 5 forks source link

Refactor CameraSet, especially subsetting #111

Open russelldj opened 7 months ago

russelldj commented 7 months ago

This is mostly a note to revisit this later. The camera set object is a bit of a headache, especially when it comes to producing a subset of it. Especially for the derived SegmentorCameraSet, there's some weird edge cases where it returns the base image instead of the segmented one. Ideally, the only methods that are implemented in the camera set are ones that cannot be handled directly by the individual cameras. And subsetting should be handled in a clear and consistent manner across all derived classes.

russelldj commented 7 months ago

Specifically, if you use [] indexing notation on the SegmentorCameraSet, it will no longer perform segmentation. For this to work, __getitem__ would need to be implemented in the derived class.

russelldj commented 4 months ago

This code is confusing and that's a big part of what we're trying to address here. One of the simplest ways we can think about this is we want to only use the self.cameras list. All of the lists of attributes starting here should be removed unless absolutely necessary.