softseg support
Browse files- README.md +1 -1
- dronescapes_reader/__init__.py +1 -0
- dronescapes_reader/multitask_dataset.py +3 -1
- scripts/cfg.yaml +1 -1
- scripts/dronescapes_viewer.ipynb +0 -0
README.md
CHANGED
@@ -107,7 +107,7 @@ python scripts/symlinks_from_txt_list.py raw_data/npz_540p/ --txt_file txt_files
|
|
107 |
python scripts/symlinks_from_txt_list.py raw_data/npz_540p/ --txt_file txt_files/manually_annotated_files/train_files_218.txt -o data/train_set_annotated_only --overwrite
|
108 |
python scripts/symlinks_from_txt_list.py raw_data/npz_540p/ --txt_file txt_files/manually_annotated_files/val_files_15.txt -o data/validation_set_annotated_only --overwrite
|
109 |
python scripts/symlinks_from_txt_list.py raw_data/npz_540p/ --txt_file txt_files/manually_annotated_files/semisup_files_207.txt -o data/semisupervised_set_annotated_nly --overwrite
|
110 |
-
python scripts/symlinks_from_txt_list.py raw_data/npz_540p/ --txt_file txt_files/manually_annotated_files/test_files_116.txt -o data/
|
111 |
```
|
112 |
|
113 |
Note: `add --copy_files` if you want to make copies instead of using symlinks.
|
|
|
107 |
python scripts/symlinks_from_txt_list.py raw_data/npz_540p/ --txt_file txt_files/manually_annotated_files/train_files_218.txt -o data/train_set_annotated_only --overwrite
|
108 |
python scripts/symlinks_from_txt_list.py raw_data/npz_540p/ --txt_file txt_files/manually_annotated_files/val_files_15.txt -o data/validation_set_annotated_only --overwrite
|
109 |
python scripts/symlinks_from_txt_list.py raw_data/npz_540p/ --txt_file txt_files/manually_annotated_files/semisup_files_207.txt -o data/semisupervised_set_annotated_nly --overwrite
|
110 |
+
python scripts/symlinks_from_txt_list.py raw_data/npz_540p/ --txt_file txt_files/manually_annotated_files/test_files_116.txt -o data/test_set_annotated_only --overwrite
|
111 |
```
|
112 |
|
113 |
Note: `add --copy_files` if you want to make copies instead of using symlinks.
|
dronescapes_reader/__init__.py
CHANGED
@@ -14,4 +14,5 @@ dronescapes_task_types = { # some pre-baked representations
|
|
14 |
"opticalflow_rife": OpticalFlowRepresentation,
|
15 |
"semantic_segprop8": SemanticRepresentation("semantic_segprop8", classes=8, color_map=_color_map),
|
16 |
_m2f_name: SemanticRepresentation(_m2f_name, classes=8, color_map=_color_map),
|
|
|
17 |
}
|
|
|
14 |
"opticalflow_rife": OpticalFlowRepresentation,
|
15 |
"semantic_segprop8": SemanticRepresentation("semantic_segprop8", classes=8, color_map=_color_map),
|
16 |
_m2f_name: SemanticRepresentation(_m2f_name, classes=8, color_map=_color_map),
|
17 |
+
"softseg_gb": ColorRepresentation("softseg_gb"),
|
18 |
}
|
dronescapes_reader/multitask_dataset.py
CHANGED
@@ -200,12 +200,14 @@ class MultiTaskDataset(Dataset):
|
|
200 |
|
201 |
def __getitem__(self, index: int | slice | list[int] | tuple) -> MultiTaskItem:
|
202 |
"""Read the data all the desired nodes"""
|
203 |
-
assert isinstance(index, (int, slice, list, tuple)), type(index)
|
204 |
if isinstance(index, slice):
|
205 |
assert index.start is not None and index.stop is not None and index.step is None, "Only reader[l:r] allowed"
|
206 |
index = list(range(index.stop)[index])
|
207 |
if isinstance(index, (list, tuple)):
|
208 |
return self.collate_fn([self.__getitem__(ix) for ix in index])
|
|
|
|
|
209 |
res = {}
|
210 |
item_name = self.file_names[index]
|
211 |
|
|
|
200 |
|
201 |
def __getitem__(self, index: int | slice | list[int] | tuple) -> MultiTaskItem:
|
202 |
"""Read the data all the desired nodes"""
|
203 |
+
assert isinstance(index, (int, slice, list, tuple, str)), type(index)
|
204 |
if isinstance(index, slice):
|
205 |
assert index.start is not None and index.stop is not None and index.step is None, "Only reader[l:r] allowed"
|
206 |
index = list(range(index.stop)[index])
|
207 |
if isinstance(index, (list, tuple)):
|
208 |
return self.collate_fn([self.__getitem__(ix) for ix in index])
|
209 |
+
if isinstance(index, str):
|
210 |
+
return self.__getitem__(self.file_names.index(index))
|
211 |
res = {}
|
212 |
item_name = self.file_names[index]
|
213 |
|
scripts/cfg.yaml
CHANGED
@@ -2,7 +2,7 @@ vre:
|
|
2 |
start_frame: ${oc.env:VRE_START_IX}
|
3 |
end_frame: ${oc.env:VRE_END_IX,null}
|
4 |
export_npy: True
|
5 |
-
export_png:
|
6 |
exception_mode: skip_representation
|
7 |
|
8 |
representations:
|
|
|
2 |
start_frame: ${oc.env:VRE_START_IX}
|
3 |
end_frame: ${oc.env:VRE_END_IX,null}
|
4 |
export_npy: True
|
5 |
+
export_png: False
|
6 |
exception_mode: skip_representation
|
7 |
|
8 |
representations:
|
scripts/dronescapes_viewer.ipynb
CHANGED
The diff for this file is too large to render.
See raw diff
|
|