Extract classification data

Use the teklia-yolo extract classification command to extract a dataset from an Arkindex export database (SQLite format) with the following parameters.

Parameter Description Type Default

database

Path to an Arkindex export database in SQLite format.

pathlib.Path

--output

Path to where the dataset will be generated. Will be used to create folders.

pathlib.Path or str

--dataset-id

ID of the dataset to extract from Arkindex.

uuid

--image-size

Maximum size allowed for the image.

int

640

--padding

Whether to add padding to have squared images of size --image-sizex--image-size.

False

--contrast

Whether to convert image in gray and contrast it.

False

--element-type

Type (slug) of element to extract. Only one type at a time can be extracted.

str

--worker-run

Source of the classifications. Use manual for manual classifications.

uuid

--class

Specify which classifications should be extracted. Multiple classes can be given (ex: <class1> <class2> <class3> ...). Extracts all by default.

str

--image-format

Format under which images are saved.

.jpg or .png

.jpg

Be careful, the elements of the types you want must be directly in the dataset, not just children of elements of the dataset.