geoai-py 0.3.6__py2.py3-none-any.whl → 0.4.0__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
geoai/segment.py CHANGED
@@ -1,13 +1,14 @@
1
1
  """This module provides functionality for segmenting high-resolution satellite imagery using vision-language models."""
2
2
 
3
3
  import os
4
+
4
5
  import numpy as np
6
+ import rasterio
5
7
  import torch
6
- from tqdm import tqdm
7
8
  from PIL import Image
8
- import rasterio
9
9
  from rasterio.windows import Window
10
- from transformers import CLIPSegProcessor, CLIPSegForImageSegmentation
10
+ from tqdm import tqdm
11
+ from transformers import CLIPSegForImageSegmentation, CLIPSegProcessor
11
12
 
12
13
 
13
14
  class CLIPSegmentation:
geoai/segmentation.py CHANGED
@@ -1,18 +1,19 @@
1
1
  import os
2
+
3
+ import albumentations as A
4
+ import matplotlib.pyplot as plt
2
5
  import numpy as np
3
- from PIL import Image
4
6
  import torch
5
- import matplotlib.pyplot as plt
6
- from torch.utils.data import Dataset, Subset
7
7
  import torch.nn.functional as F
8
- from sklearn.model_selection import train_test_split
9
- import albumentations as A
10
8
  from albumentations.pytorch import ToTensorV2
9
+ from PIL import Image
10
+ from sklearn.model_selection import train_test_split
11
+ from torch.utils.data import Dataset, Subset
11
12
  from transformers import (
13
+ DefaultDataCollator,
14
+ SegformerForSemanticSegmentation,
12
15
  Trainer,
13
16
  TrainingArguments,
14
- SegformerForSemanticSegmentation,
15
- DefaultDataCollator,
16
17
  )
17
18
 
18
19