File size: 3,844 Bytes
8ec0291 f7d0a1d 65f6bd8 f7d0a1d e9d1818 23a1e74 f7d0a1d e59e26c f7d0a1d 783db85 e46b579 f7d0a1d e0a73e4 f7d0a1d e0a73e4 f7d0a1d e0a73e4 f7d0a1d e0a73e4 f7d0a1d e0a73e4 f7d0a1d e0a73e4 f7d0a1d e0a73e4 f7d0a1d e0a73e4 f7d0a1d e0a73e4 f7d0a1d e0a73e4 f7d0a1d e0a73e4 f7d0a1d e0a73e4 f7d0a1d 8ec0291 0144301 8ec0291 096e78f 8ec0291 bdeb8c9 8ec0291 096e78f 8ec0291 c517963 2d799d8 8ec0291 2f5b029 8ec0291 2f5b029 8ec0291 0144301 94f84e2 d6592c2 94f84e2 0144301 94f84e2 0144301 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
---
base_model: PekingU/rtdetr_r101vd_coco_o365
datasets: keremberke/satellite-building-segmentation
library_name: transformers
license: mit
metrics:
- Average Precision (AP)
- Average Recall (AR)
pipeline_tag: object-detection
tags:
- remote sensing
- object detection
widget:
- src: img.png
output:
url: img.png
model-index:
- name: rt-detr-finetuned-for-satellite-image-roofs-detection
results:
- task:
type: object-detection
dataset:
name: keremberke/satellite-building-segmentation
type: image-segmentation
metrics:
- type: AP (IoU=0.50:0.95)
value: 0.434
name: AP @ IoU=0.50:0.95 | area=all | maxDets=100
- type: AP (IoU=0.50)
value: 0.652
name: AP @ IoU=0.50 | area=all | maxDets=100
- type: AP (IoU=0.75)
value: 0.464
name: AP @ IoU=0.75 | area=all | maxDets=100
- type: AP (IoU=0.50:0.95) small objects
value: 0.248
name: AP @ IoU=0.50:0.95 | area=small | maxDets=100
- type: AP (IoU=0.50:0.95) medium objects
value: 0.510
name: AP @ IoU=0.50:0.95 | area=medium | maxDets=100
- type: AP (IoU=0.50:0.95) large objects
value: 0.632
name: AP @ IoU=0.50:0.95 | area=large | maxDets=100
- type: AR (IoU=0.50:0.95) maxDets=1
value: 0.056
name: AR @ IoU=0.50:0.95 | area=all | maxDets=1
- type: AR (IoU=0.50:0.95) maxDets=10
value: 0.328
name: AR @ IoU=0.50:0.95 | area=all | maxDets=10
- type: AR (IoU=0.50:0.95) maxDets=100
value: 0.519
name: AR @ IoU=0.50:0.95 | area=all | maxDets=100
- type: AR (IoU=0.50:0.95) small objects
value: 0.337
name: AR @ IoU=0.50:0.95 | area=small | maxDets=100
- type: AR (IoU=0.50:0.95) medium objects
value: 0.601
name: AR @ IoU=0.50:0.95 | area=medium | maxDets=100
- type: AR (IoU=0.50:0.95) large objects
value: 0.714
name: AR @ IoU=0.50:0.95 | area=large | maxDets=100
---
# Model Card
Roof Detection for Remote Sensing task.
<!-- Provide a quick summary of what the model is/does. -->
## Model Details
### Model Description
<!-- Provide a longer summary of what this model is. -->
- **Model type:** Object Detection for Remote Sensing task.
- **License:** MIT
### Model Sources
<!-- Provide the basic links for the model. -->
- **GitHub:** [Jupyter Notebook](https://github.com/ownEyes/satellite-image-roofs-auto-annotation-sourcecode/blob/dev/notebooks/finetune_rtdetr.ipynb)
- **Demo:** [Hugging Face Space](https://huggingface.co/spaces/Yifeng-Liu/satellite-image-roofs-auto-annotation)
## Limitations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.
## How to Get Started with the Model
Use the code below to get started with the model.
```python
from transformers import AutoModelForObjectDetection, AutoImageProcessor
import torch
import cv2
image_path=YOUR_IMAGE_PATH
image = cv2.imread(image_path)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = AutoModelForObjectDetection.from_pretrained("Yifeng-Liu/rt-detr-finetuned-for-satellite-image-roofs-detection")
image_processor = AutoImageProcessor.from_pretrained("Yifeng-Liu/rt-detr-finetuned-for-satellite-image-roofs-detection")
CONFIDENCE_TRESHOLD = 0.5
with torch.no_grad():
model.to(device)
# load image and predict
inputs = image_processor(images=image, return_tensors='pt').to(device)
outputs = model(**inputs)
# post-process
target_sizes = torch.tensor([image.shape[:2]]).to(device)
results = image_processor.post_process_object_detection(
outputs=outputs,
threshold=CONFIDENCE_TRESHOLD,
target_sizes=target_sizes
)[0]
``` |