Skip to content

Commit

Permalink
Fix typos (#2389)
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs authored and calebrob6 committed Dec 8, 2024
1 parent 7774b8c commit d155eb8
Show file tree
Hide file tree
Showing 19 changed files with 26 additions and 25 deletions.
1 change: 1 addition & 0 deletions requirements/min-reqs.old
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/data/digital_typhoon/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/biomassters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/cms_mangrove_canopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/esri2020.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://www.arcgis.com/home/item.html?id=fc92d38533d440078f17678ebc20e8e2>`_.
If you use this dataset please cite the following paper:
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/forestdamage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/mapinwild.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/seasonet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/skippd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/ssl4eo_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/vhr10.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions torchgeo/models/dofa.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/models/rcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions torchgeo/models/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions torchgeo/models/swin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/models/vit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions torchgeo/trainers/byol.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
"""
Expand Down

0 comments on commit d155eb8

Please sign in to comment.