# Creating annotation tasks from saved fish crops
Here is a recipe for creating an annotation task for cvat. Bioscopes save lice crops by default, but these needs to be downloaded before disk fills up and old crops are deleted.
Let's go by example and say that bioscope 1129 have interesting images for lice counting the 10 days before and including 2023-08-13. This is how we would back up those lice crops:
```shell
cd download_pickle
python download.py -t lice-crop -b 1129 -d 2023-08-13 -n 10
```
If these images have been downloaded before, then this will finish quickly. Otherwise the operation may take a while depending on the amount of approved crops per day.
## Creating maturity annotation tasks
Extract the crops into a folder:
```shell
./start_docker.sh
cd fishrecordingarm
python -m process.extract_crop -o B1129-mature-2023-08-13 /mnt/NAS/lice_prototype/field_tests/B1129/2023_08_13/lice_crop*
```
## Creating louse annotation tasks
We show predicted louse boxes when creating annotation tasks for lice. We need to provide a config file for a lice detector to get the correct names of the labels. It is nice to use the most recent model to ease the annotation job and better show how the current models are performing. You can modify liceNetPath in fishrecordingarm/testdata/local_models.json to switch to a newer model. Here is an example creating one annotation task with max 100 images:
```shell
./start_docker.sh
cd fishrecordingarm
ls /mnt/NAS/lice_prototype/field_tests/B1129/2023_08_13/lice_crop* | head -n 100 | xargs python -m process.extract_crop -c testdata/local_models.json -o B1129-lice-2023-08-13 --update-detections --output-labels
```
## Uploading annotation tasks
Zip the output folders:
```shell
zip -r B1129-lice-2023-08-13.zip B1129-lice-2023-08-13
```
Create a new task in cvat and upload the image setting segment size (typically 100) and chunk size (16). Set image quality to 100% for louse tasks, 70% for maturity tasks.