Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,47 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
+
tags:
|
4 |
+
- UAV
|
5 |
+
- Deadwood
|
6 |
+
- detectron2
|
7 |
---
|
8 |
+
|
9 |
+
## Model description
|
10 |
+
|
11 |
+
This model is trained for detecting both standing and fallen deadwood from UAV RGB images. More thorough description is available on [https://mayrajeo.github.io/maskrcnn-deadwood](https://mayrajeo.github.io/maskrcnn-deadwood).
|
12 |
+
|
13 |
+
## Training data
|
14 |
+
|
15 |
+
The model was trained on expert-annotated deadwood data, acquired on during leaf-on season 16.-17.7.2019 from Hiidenportti, Sotkamo, Eastern-Finland. The ground resolution for the data varied between 3.9 and 4.4cm. In addition, the model was tested with data collected from Evo, Hämeenlinna, Southern-Finland, acquired on 11.7.2018. The data from Evo was used only for testing the models.
|
16 |
+
|
17 |
+
## Metrics
|
18 |
+
|
19 |
+
|Metric|Hiidenportti|Evo|
|
20 |
+
|------|------------|---|
|
21 |
+
|Patch AP50|0.704|0.519|
|
22 |
+
|Patch AP|0.366|0.252|
|
23 |
+
|Patch AP groundwood|0.326|0.183|
|
24 |
+
|Patch AP uprightwood|0.406|0.321|
|
25 |
+
|Scene AP50|0.683|0.511|
|
26 |
+
|Scene AP|0.341|0.236|
|
27 |
+
|Scene AP groundwood|0.246|0.160|
|
28 |
+
|Scene AP uprightwood|0.436|0.311|
|
29 |
+
|
30 |
+
## How to use
|
31 |
+
|
32 |
+
```python
|
33 |
+
from detectron2.engine import DefaultPredictor
|
34 |
+
from detectron2.config import get_cfg
|
35 |
+
from detectron2.data import build_detection_test_loader
|
36 |
+
import cv2
|
37 |
+
|
38 |
+
cfg = get_cfg()
|
39 |
+
cfg.merge_from_file(<path_to_model_config>)
|
40 |
+
cfg.OUTPUT_DIR = '<path_to_output>'
|
41 |
+
cfg.MODEL.WEIGHTS = '<path_to_weights>'
|
42 |
+
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.5 # score threshold for detections
|
43 |
+
predictor = DefaultPredictor(cfg)
|
44 |
+
|
45 |
+
img = cv2.imread('<path_to_image_patch>')
|
46 |
+
outputs = predictor(image)
|
47 |
+
```
|