Browse Source

Added some ReadMe files

Dimitri Korsch 6 years ago
parent
commit
fcd54ae000
3 changed files with 53 additions and 2 deletions
  1. 2 2
      README.md
  2. 36 0
      nabirds/dataset/README.md
  3. 15 0
      nabirds/dataset/mixins/README.md

+ 2 - 2
README.md

@@ -12,8 +12,8 @@ from nabirds import NAB_Annotations, Dataset
 
 annot = NAB_Annotations("path/to/nab/folder")
 
-train_data = Dataset(annot.train_uuids, annot)
-test_data = Dataset(annot.test_uuids, annot)
+train_data = Dataset(uuids=annot.train_uuids, annotations=annot)
+test_data = Dataset(uuids=annot.test_uuids, annotations=annot)
 
 print("Loaded {} training and {} test images".format(len(train_data), len(test_data)))
 ```

+ 36 - 0
nabirds/dataset/README.md

@@ -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).

+ 15 - 0
nabirds/dataset/mixins/README.md

@@ -0,0 +1,15 @@
+# Dataset Mixins
+
+Following mixin classes are available:
+
+- [Reading mixins](reading.py):
+	- `AnnotationsReadMixin`
+	- `ImageListReadingMixin`
+<!-- - [Post-processing mixins](postprocess.py): None (were factored out) -->
+- [Part and bounding box mixins](parts.py):
+	- `BBCropMixin`
+	- `PartsInBBMixin`
+	- `PartCropMixin`
+	- `PartsRevealMixin`
+	- `UniformPartMixin`
+	- `RandomBlackOutMixin`