dsa-helpers 1.1.5.dev4__tar.gz → 1.1.5.dev5__tar.gz
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.
- {dsa_helpers-1.1.5.dev4/dsa_helpers.egg-info → dsa_helpers-1.1.5.dev5}/PKG-INFO +1 -1
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/__init__.py +1 -1
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/segformer_semantic_segmentation/train.py +7 -21
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5/dsa_helpers.egg-info}/PKG-INFO +1 -1
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/pyproject.toml +1 -1
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/.gitignore +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/.readthedocs.yaml +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/LICENSE +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/README.md +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/app.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dev.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/docs/requirements.txt +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/docs/source/conf.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/docs/source/index.rst +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/cli_utils.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/dash/__init__.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/dash/dash_paperdragon_utils.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/dash/header.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/dash/header_callbacks.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/girder_utils.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/gpd_utils.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/image_utils.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/imread.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/imwrite.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/__init__.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/callbacks.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/datasets/SegFormerSegmentationDataset.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/datasets/__init__.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/datasets/utils.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/evaluate.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/metrics.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/object_detection/__init__.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/object_detection/get_pearce_roi_images.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/object_detection/tile_image.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/object_detection/utils.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/segformer_semantic_segmentation/__init__.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/segformer_semantic_segmentation/inference.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/transforms/__init__.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/transforms/segformer_transforms.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/mongo_utils.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/tile_utils.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/tiling.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/utils.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers.egg-info/SOURCES.txt +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers.egg-info/dependency_links.txt +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers.egg-info/requires.txt +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers.egg-info/top_level.txt +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/setup.cfg +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/tests/app/Dockerfile +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/tests/app/app.py +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/tests/docker-compose.yaml +0 -0
- {dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/tests/test.ipynb +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dsa_helpers
|
|
3
|
-
Version: 1.1.5.
|
|
3
|
+
Version: 1.1.5.dev5
|
|
4
4
|
Summary: Utility functions for working with the DSA girder client.
|
|
5
5
|
Author-email: "Juan C. Vizcarra" <jvizcar@emory.edu>
|
|
6
6
|
Maintainer-email: "Juan C. Vizcarra" <jvizcar@emory.edu>
|
|
@@ -41,7 +41,7 @@ def train_segformer_semantic_segmentation_model(
|
|
|
41
41
|
Args:
|
|
42
42
|
save_dir (str): Directory where model checkpoint directory will
|
|
43
43
|
be saved to.
|
|
44
|
-
|
|
44
|
+
train_csv_fp (str): Train data, should be a pandas
|
|
45
45
|
dataframe or a path to a csv file containing the train data.
|
|
46
46
|
Must have the "fp" and "mask_fp" columns, which are the
|
|
47
47
|
filepaths to the images and masks, respectively.
|
|
@@ -91,9 +91,6 @@ def train_segformer_semantic_segmentation_model(
|
|
|
91
91
|
if test_data is not None and isinstance(test_data, str):
|
|
92
92
|
test_data = pd.read_csv(test_data)
|
|
93
93
|
|
|
94
|
-
train_data_copy = train_data.copy()
|
|
95
|
-
val_data_copy = val_data.copy()
|
|
96
|
-
|
|
97
94
|
if device is None:
|
|
98
95
|
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
99
96
|
|
|
@@ -131,16 +128,14 @@ def train_segformer_semantic_segmentation_model(
|
|
|
131
128
|
|
|
132
129
|
# Create datasets for the model.
|
|
133
130
|
train_dataset = create_segformer_segmentation_dataset(
|
|
134
|
-
|
|
131
|
+
train_data, transforms=train_transforms
|
|
135
132
|
)
|
|
136
133
|
|
|
137
134
|
val_dataset = create_segformer_segmentation_dataset(
|
|
138
135
|
(
|
|
139
|
-
|
|
136
|
+
val_data
|
|
140
137
|
if max_val_size is None
|
|
141
|
-
else
|
|
142
|
-
n=max_val_size, random_state=random_state
|
|
143
|
-
)
|
|
138
|
+
else val_data.sample(n=max_val_size, random_state=random_state)
|
|
144
139
|
),
|
|
145
140
|
transforms=val_transforms,
|
|
146
141
|
)
|
|
@@ -246,12 +241,9 @@ def train_segformer_semantic_segmentation_model(
|
|
|
246
241
|
# For each of the datasets provided, get the metrics.
|
|
247
242
|
model = trainer.model
|
|
248
243
|
|
|
249
|
-
dataset = create_segformer_segmentation_dataset(
|
|
250
|
-
train_data, transforms=val_transforms
|
|
251
|
-
)
|
|
252
244
|
results["train"]["metrics"] = per_class_dice_on_dataset(
|
|
253
245
|
model,
|
|
254
|
-
|
|
246
|
+
train_data,
|
|
255
247
|
label2id,
|
|
256
248
|
batch_size=batch_size,
|
|
257
249
|
device=device,
|
|
@@ -259,12 +251,9 @@ def train_segformer_semantic_segmentation_model(
|
|
|
259
251
|
tqdm_notebook=tqdm_notebook,
|
|
260
252
|
)
|
|
261
253
|
|
|
262
|
-
dataset = create_segformer_segmentation_dataset(
|
|
263
|
-
val_data, transforms=val_transforms
|
|
264
|
-
)
|
|
265
254
|
results["val"]["metrics"] = per_class_dice_on_dataset(
|
|
266
255
|
model,
|
|
267
|
-
|
|
256
|
+
val_data,
|
|
268
257
|
label2id,
|
|
269
258
|
batch_size=batch_size,
|
|
270
259
|
device=device,
|
|
@@ -275,12 +264,9 @@ def train_segformer_semantic_segmentation_model(
|
|
|
275
264
|
if test_data is not None:
|
|
276
265
|
results["test"] = {}
|
|
277
266
|
|
|
278
|
-
dataset = create_segformer_segmentation_dataset(
|
|
279
|
-
test_data, transforms=val_transforms
|
|
280
|
-
)
|
|
281
267
|
results["test"]["metrics"] = per_class_dice_on_dataset(
|
|
282
268
|
model,
|
|
283
|
-
|
|
269
|
+
test_data,
|
|
284
270
|
label2id,
|
|
285
271
|
batch_size=batch_size,
|
|
286
272
|
device=device,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dsa_helpers
|
|
3
|
-
Version: 1.1.5.
|
|
3
|
+
Version: 1.1.5.dev5
|
|
4
4
|
Summary: Utility functions for working with the DSA girder client.
|
|
5
5
|
Author-email: "Juan C. Vizcarra" <jvizcar@emory.edu>
|
|
6
6
|
Maintainer-email: "Juan C. Vizcarra" <jvizcar@emory.edu>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/dash/dash_paperdragon_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/object_detection/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/object_detection/tile_image.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dsa_helpers-1.1.5.dev4 → dsa_helpers-1.1.5.dev5}/dsa_helpers/ml/transforms/segformer_transforms.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|