Active Learning Briefing Sabine
Detectron2 Case
- set up data structure (should be done with pipeline) and should look analog to:
-- data
|-- 00raw
| `-- Aufnahme-01_0,5Mio_nach_24h.jpg
|-- 01preprocessed
| `-- 1280_960
| `-- Aufnahme-01_0,5Mio_nach_24h.jpg
|-- 02annotated
| `-- 1280_960
| |-- masks
| | `-- Aufnahme-01_0,5Mio_nach_24h_mask.png
| |-- vis
| | |-- Aufnahme-01_0,5Mio_nach_24h_overlay.png
| |-- Aufnahme-01_0,5Mio_nach_24h_mask.png
| `-- annotations.json
|-- 03augmented
| `-- 1280_960
| |-- masks
| | `-- Aufnahme-01_0,5Mio_nach_24h_augmented1_mask.png
| |-- overlay
| | `-- Aufnahme-01_0,5Mio_nach_24h_augmented1.jpg
| |-- plots
| | `-- Aufnahme-01_0,5Mio_nach_24h_augmented1.jpg
| |-- test
| | `-- annotations.json
| |-- train
| | `-- annotations.json
| |-- Aufnahme-01_0,5Mio_nach_24h_augmented1.jpg
| `-- annotations_aug.json
|-- 04cur_data
| |-- test
| | |-- Aufnahme-01_0,5Mio_nach_24h.jpg
| | `-- annotations.json
| `-- train
| |-- Aufnahme-01_0,5Mio_nach_24h.jpg
| `-- annotations.json
- Create (fake, because you did not train detectron2 yet) output directory
mkdir output
2.1 move model_final.pth to output directory. Can be found here - Implement active learning strategy as discussed:
- create notebook
- investigate cur_pred object (see model.py line 83 and utils/utils.py line75 and following and https://detectron2.readthedocs.io/en/latest/tutorials/models.html
- goal: save image path and scores metric and sort
- ask questions in between if you're stuck. Ask me better earlier than later.
UNET Case
- Clone the unet repo: https://git.informatik.uni-leipzig.de/joas/confluence-unet/-/tree/main
- be sure to have the right data structure in place:
./data/
|-- annotation
|-- imgs
|-- masks
|-- original
| |-- imgs
| `-- masks
`-- test
|-- imgs
`-- masks
2.1 you can just use this folder (has already needed structure)
-
create the directory results/checkpoints and place the model_final.pth file there. Find model file here
-
make sense of the output object in predict_visualize.py and ideally get metric for active learning out of it.
Edited by Max Joas