|
@@ -0,0 +1,36 @@
|
|
|
+# Dataset
|
|
|
+
|
|
|
+The provided [`Dataset`](__init__.py) class inherits from the [`AnnotationsReadMixin`](mixins/reading.py) and the [`PartMixing`](mixins/parts.py).
|
|
|
+Consequently, to create a `Dataset` instance an [`Annotation`](../annotations.py) object is required (it is necessary to pass the names of the arguments!):
|
|
|
+
|
|
|
+
|
|
|
+```python
|
|
|
+# replace NAB_Annotations with CUB_Annotations to load CUB200-2011 annotations
|
|
|
+from nabirds import NAB_Annotations, Dataset
|
|
|
+
|
|
|
+annot = NAB_Annotations("path/to/nab/folder")
|
|
|
+
|
|
|
+train_data = Dataset(uuids=annot.train_uuids, annotations=annot)
|
|
|
+test_data = Dataset(uuids=annot.test_uuids, annotations=annot)
|
|
|
+```
|
|
|
+
|
|
|
+In order to enable the [`PartMixing`](mixins/parts.py) functionalities pass the appropriate arguments to the initializer:
|
|
|
+
|
|
|
+```python
|
|
|
+data = Dataset(
|
|
|
+ uuids=uuids, annotations=annot,
|
|
|
+
|
|
|
+ uniform_parts=True,
|
|
|
+
|
|
|
+ crop_to_bb=True,
|
|
|
+ crop_uniform=True,
|
|
|
+
|
|
|
+ parts_in_bb=True,
|
|
|
+
|
|
|
+ rnd_select=True,
|
|
|
+ ratio=0.35,
|
|
|
+ seed=21486214
|
|
|
+)
|
|
|
+```
|
|
|
+
|
|
|
+Information about all possible [`PartMixing`](mixins/parts.py) functionalities can be found [here](mixins).
|