diff --git a/requirements/min-reqs.old b/requirements/min-reqs.old index a6e91f70fe9..52d8dcce018 100644 --- a/requirements/min-reqs.old +++ b/requirements/min-reqs.old @@ -26,6 +26,7 @@ h5py==3.6.0 laspy==2.0.0 opencv-python==4.5.4.58 pycocotools==2.0.7 +pyarrow==15.0.0 # Remove when we upgrade min version of pandas to `pandas[parquet]>=2` pyvista==0.34.2 scikit-image==0.19.0 scipy==1.7.2 diff --git a/tests/data/digital_typhoon/data.py b/tests/data/digital_typhoon/data.py index 6636a7cdbfa..bd5346e5d54 100644 --- a/tests/data/digital_typhoon/data.py +++ b/tests/data/digital_typhoon/data.py @@ -78,7 +78,7 @@ } ) - # Save the DataFrame to correspoding typhoon id as metadata + # Save the DataFrame to corresponding typhoon id as metadata df.to_csv(os.path.join(root, 'metadata', f'{typhoon_id}.csv'), index=False) all_dfs.append(df) diff --git a/torchgeo/datasets/biomassters.py b/torchgeo/datasets/biomassters.py index 5d3fe4b631f..70a53a4220a 100644 --- a/torchgeo/datasets/biomassters.py +++ b/torchgeo/datasets/biomassters.py @@ -40,7 +40,7 @@ class BioMassters(NonGeoDataset): * Sentinel 1 and Sentinel 2 data for each location * Sentinel 1 available for every month * Sentinel 2 available for almost every month - (not available for every month due to ESA aquisition halt over the region + (not available for every month due to ESA acquisition halt over the region during particular periods) If you use this dataset in your research, please cite the following paper: diff --git a/torchgeo/datasets/cms_mangrove_canopy.py b/torchgeo/datasets/cms_mangrove_canopy.py index f479d6989d9..f9db256238d 100644 --- a/torchgeo/datasets/cms_mangrove_canopy.py +++ b/torchgeo/datasets/cms_mangrove_canopy.py @@ -24,7 +24,7 @@ class CMSGlobalMangroveCanopy(RasterDataset): consists of a single band map at 30m resolution of either aboveground biomass (agb), basal area weighted height (hba95), or maximum canopy height (hmax95). - The dataset needs to be manually dowloaded from the above link, where you can make + The dataset needs to be manually downloaded from the above link, where you can make an account and subsequently download the dataset. .. versionadded:: 0.3 diff --git a/torchgeo/datasets/esri2020.py b/torchgeo/datasets/esri2020.py index 9753c0584c6..197272d6b48 100644 --- a/torchgeo/datasets/esri2020.py +++ b/torchgeo/datasets/esri2020.py @@ -41,7 +41,7 @@ class Esri2020(RasterDataset): 9. Snow/Ice 10. Clouds - A more detailed explanation of the invidual classes can be found + A more detailed explanation of the individual classes can be found `here `_. If you use this dataset please cite the following paper: diff --git a/torchgeo/datasets/forestdamage.py b/torchgeo/datasets/forestdamage.py index 33333b956ba..885ac21a471 100644 --- a/torchgeo/datasets/forestdamage.py +++ b/torchgeo/datasets/forestdamage.py @@ -206,7 +206,7 @@ def _load_target( """Load the target mask for a single image. Args: - bboxes: list of bbox coordinats [xmin, ymin, xmax, ymax] + bboxes: list of bbox coordinates [xmin, ymin, xmax, ymax] labels_list: list of class labels Returns: diff --git a/torchgeo/datasets/geo.py b/torchgeo/datasets/geo.py index 9dd886723bb..d86bc58e6ed 100644 --- a/torchgeo/datasets/geo.py +++ b/torchgeo/datasets/geo.py @@ -352,7 +352,7 @@ class RasterDataset(GeoDataset): #: Minimum timestamp if not in filename mint: float = 0 - #: Maximum timestmap if not in filename + #: Maximum timestamp if not in filename maxt: float = sys.maxsize #: True if the dataset only contains model inputs (such as images). False if the diff --git a/torchgeo/datasets/mapinwild.py b/torchgeo/datasets/mapinwild.py index 51289cf91cd..cd294014318 100644 --- a/torchgeo/datasets/mapinwild.py +++ b/torchgeo/datasets/mapinwild.py @@ -160,7 +160,7 @@ def __init__( ): self._merge_parts(mode) - # Masks will be loaded seperately in the :meth:`__getitem__` + # Masks will be loaded separately in the :meth:`__getitem__` if 'mask' in self.modality: self.modality.remove('mask') diff --git a/torchgeo/datasets/seasonet.py b/torchgeo/datasets/seasonet.py index 04cac92b36c..3e47a8ec491 100644 --- a/torchgeo/datasets/seasonet.py +++ b/torchgeo/datasets/seasonet.py @@ -39,7 +39,7 @@ class SeasoNet(NonGeoDataset): Dataset format: - * images are 16-bit GeoTiffs, split into seperate files based on resolution + * images are 16-bit GeoTiffs, split into separate files based on resolution * images include 12 spectral bands with 10, 20 and 60 m per pixel resolutions * masks are single-channel 8-bit GeoTiffs diff --git a/torchgeo/datasets/skippd.py b/torchgeo/datasets/skippd.py index a3a842561fa..3accf32d2af 100644 --- a/torchgeo/datasets/skippd.py +++ b/torchgeo/datasets/skippd.py @@ -91,7 +91,7 @@ def __init__( Args: root: root directory where dataset can be found split: one of "trainval", or "test" - task: one fo "nowcast", or "forecast" + task: one of "nowcast", or "forecast" transforms: a function/transform that takes an input sample and returns a transformed version download: if True, download dataset and store it in the root directory diff --git a/torchgeo/datasets/ssl4eo_benchmark.py b/torchgeo/datasets/ssl4eo_benchmark.py index fc9bb3883d3..7bc4f828974 100644 --- a/torchgeo/datasets/ssl4eo_benchmark.py +++ b/torchgeo/datasets/ssl4eo_benchmark.py @@ -320,7 +320,7 @@ def _load_mask(self, path: Path) -> Tensor: Args: path: path to mask - Retuns: + Returns: mask """ with rasterio.open(path) as src: diff --git a/torchgeo/datasets/utils.py b/torchgeo/datasets/utils.py index a3a39a0f844..e668e749840 100644 --- a/torchgeo/datasets/utils.py +++ b/torchgeo/datasets/utils.py @@ -536,7 +536,7 @@ def draw_semantic_segmentation_masks( colors: list of RGB int tuples, or color strings e.g. red, #FF00FF Returns: - a version of ``image`` overlayed with the colors given by ``mask`` and + a version of ``image`` overlaid with the colors given by ``mask`` and ``colors`` """ classes = torch.from_numpy(np.arange(len(colors) if colors else 0, dtype=np.uint8)) diff --git a/torchgeo/datasets/vhr10.py b/torchgeo/datasets/vhr10.py index 4840a788604..9adc2f44e9e 100644 --- a/torchgeo/datasets/vhr10.py +++ b/torchgeo/datasets/vhr10.py @@ -195,7 +195,7 @@ def __init__( Args: root: root directory where dataset can be found - split: one of "postive" or "negative" + split: one of "positive" or "negative" transforms: a function/transform that takes input sample and its target as entry and returns a transformed version download: if True, download dataset and store it in the root directory diff --git a/torchgeo/models/dofa.py b/torchgeo/models/dofa.py index cdbd8242873..12c627b21e3 100644 --- a/torchgeo/models/dofa.py +++ b/torchgeo/models/dofa.py @@ -428,7 +428,7 @@ def dofa_small_patch16_224(*args: Any, **kwargs: Any) -> DOFA: Args: *args: Additional arguments to pass to :class:`DOFA`. - **kwargs: Additional keywork arguments to pass to :class:`DOFA`. + **kwargs: Additional keyword arguments to pass to :class:`DOFA`. Returns: A DOFA small 16 model. @@ -452,7 +452,7 @@ def dofa_base_patch16_224( Args: weights: Pre-trained model weights to use. *args: Additional arguments to pass to :class:`DOFA`. - **kwargs: Additional keywork arguments to pass to :class:`DOFA`. + **kwargs: Additional keyword arguments to pass to :class:`DOFA`. Returns: A DOFA base 16 model. @@ -490,7 +490,7 @@ def dofa_large_patch16_224( Args: weights: Pre-trained model weights to use. *args: Additional arguments to pass to :class:`DOFA`. - **kwargs: Additional keywork arguments to pass to :class:`DOFA`. + **kwargs: Additional keyword arguments to pass to :class:`DOFA`. Returns: A DOFA large 16 model. @@ -525,7 +525,7 @@ def dofa_huge_patch16_224(*args: Any, **kwargs: Any) -> DOFA: Args: *args: Additional arguments to pass to :class:`DOFA`. - **kwargs: Additional keywork arguments to pass to :class:`DOFA`. + **kwargs: Additional keyword arguments to pass to :class:`DOFA`. Returns: A DOFA huge 16 model. diff --git a/torchgeo/models/rcf.py b/torchgeo/models/rcf.py index 079b1222867..cc330a0192c 100644 --- a/torchgeo/models/rcf.py +++ b/torchgeo/models/rcf.py @@ -78,7 +78,7 @@ def __init__( # We register the weight and bias tensors as "buffers". This does two things: # makes them behave correctly when we call .to(...) on the module, and makes - # them explicitely _not_ Parameters of the model (which might get updated) if + # them explicitly _not_ Parameters of the model (which might get updated) if # a user tries to train with this model. self.register_buffer( 'weights', diff --git a/torchgeo/models/resnet.py b/torchgeo/models/resnet.py index 122ec2ae904..7bbeab22dc8 100644 --- a/torchgeo/models/resnet.py +++ b/torchgeo/models/resnet.py @@ -760,7 +760,7 @@ def resnet18( Args: weights: Pre-trained model weights to use. *args: Additional arguments to pass to :func:`timm.create_model` - **kwargs: Additional keywork arguments to pass to :func:`timm.create_model` + **kwargs: Additional keyword arguments to pass to :func:`timm.create_model` Returns: A ResNet-18 model. @@ -795,7 +795,7 @@ def resnet50( Args: weights: Pre-trained model weights to use. *args: Additional arguments to pass to :func:`timm.create_model`. - **kwargs: Additional keywork arguments to pass to :func:`timm.create_model`. + **kwargs: Additional keyword arguments to pass to :func:`timm.create_model`. Returns: A ResNet-50 model. @@ -829,7 +829,7 @@ def resnet152( Args: weights: Pre-trained model weights to use. *args: Additional arguments to pass to :func:`timm.create_model`. - **kwargs: Additional keywork arguments to pass to :func:`timm.create_model`. + **kwargs: Additional keyword arguments to pass to :func:`timm.create_model`. Returns: A ResNet-152 model. diff --git a/torchgeo/models/swin.py b/torchgeo/models/swin.py index 314000126bc..dacf3a6f0c7 100644 --- a/torchgeo/models/swin.py +++ b/torchgeo/models/swin.py @@ -266,7 +266,7 @@ def swin_v2_t( weights: Pre-trained model weights to use. *args: Additional arguments to pass to :class:`torchvision.models.swin_transformer.SwinTransformer`. - **kwargs: Additional keywork arguments to + **kwargs: Additional keyword arguments to pass to :class:`torchvision.models.swin_transformer.SwinTransformer`. Returns: @@ -305,7 +305,7 @@ def swin_v2_b( weights: Pre-trained model weights to use. *args: Additional arguments to pass to :class:`torchvision.models.swin_transformer.SwinTransformer`. - **kwargs: Additional keywork arguments to + **kwargs: Additional keyword arguments to pass to :class:`torchvision.models.swin_transformer.SwinTransformer`. Returns: diff --git a/torchgeo/models/vit.py b/torchgeo/models/vit.py index 4d5bed9502f..3c876ed3fe7 100644 --- a/torchgeo/models/vit.py +++ b/torchgeo/models/vit.py @@ -235,7 +235,7 @@ def vit_small_patch16_224( Args: weights: Pre-trained model weights to use. *args: Additional arguments to pass to :func:`timm.create_model`. - **kwargs: Additional keywork arguments to pass to :func:`timm.create_model`. + **kwargs: Additional keyword arguments to pass to :func:`timm.create_model`. Returns: A ViT small 16 model. diff --git a/torchgeo/trainers/byol.py b/torchgeo/trainers/byol.py index 6cd4f50f8c5..e564d92673a 100644 --- a/torchgeo/trainers/byol.py +++ b/torchgeo/trainers/byol.py @@ -66,7 +66,7 @@ def __init__(self, image_size: tuple[int, int] = (256, 256)) -> None: ) def forward(self, x: Tensor) -> Tensor: - """Applys SimCLR augmentations to the input tensor. + """Applies SimCLR augmentations to the input tensor. Args: x: a batch of imagery @@ -137,7 +137,7 @@ def __init__( Args: model: model to encode - projection_size: size of the ouput layer of the projector MLP + projection_size: size of the output layer of the projector MLP hidden_size: size of hidden layer of the projector MLP layer: layer from model to project """