Model Card

Roof Detection for Remote Sensing task.

Model Details

Model Description

  • Model type: Object Detection for Remote Sensing task.
  • License: MIT

Model Sources

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.

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]
Downloads last month
6,479
Safetensors
Model size
76.6M params
Tensor type
F32
ยท
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for Yifeng-Liu/rt-detr-finetuned-for-satellite-image-roofs-detection

Finetuned
(2)
this model

Dataset used to train Yifeng-Liu/rt-detr-finetuned-for-satellite-image-roofs-detection

Space using Yifeng-Liu/rt-detr-finetuned-for-satellite-image-roofs-detection 1

Evaluation results

  • AP @ IoU=0.50:0.95 | area=all | maxDets=100 on keremberke/satellite-building-segmentation
    self-reported
    0.434
  • AP @ IoU=0.50 | area=all | maxDets=100 on keremberke/satellite-building-segmentation
    self-reported
    0.652
  • AP @ IoU=0.75 | area=all | maxDets=100 on keremberke/satellite-building-segmentation
    self-reported
    0.464
  • AP @ IoU=0.50:0.95 | area=small | maxDets=100 on keremberke/satellite-building-segmentation
    self-reported
    0.248
  • AP @ IoU=0.50:0.95 | area=medium | maxDets=100 on keremberke/satellite-building-segmentation
    self-reported
    0.510
  • AP @ IoU=0.50:0.95 | area=large | maxDets=100 on keremberke/satellite-building-segmentation
    self-reported
    0.632
  • AR @ IoU=0.50:0.95 | area=all | maxDets=1 on keremberke/satellite-building-segmentation
    self-reported
    0.056
  • AR @ IoU=0.50:0.95 | area=all | maxDets=10 on keremberke/satellite-building-segmentation
    self-reported
    0.328
  • AR @ IoU=0.50:0.95 | area=all | maxDets=100 on keremberke/satellite-building-segmentation
    self-reported
    0.519
  • AR @ IoU=0.50:0.95 | area=small | maxDets=100 on keremberke/satellite-building-segmentation
    self-reported
    0.337