File size: 3,020 Bytes
842231b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9f6c0a3
842231b
9f6c0a3
842231b
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
---
license: apache-2.0
language:
- ar
- en
library_name: transformers
pipeline_tag: object-detection
tags:
- climate
---



# DETR-BASE_Marine

## Overview

+ Model Name: DETR-BASE_Marine
+ Model Architecture: DETR (End-to-End Object Detection) with ResNet-50 backbone.
+ Model Type: Object Detection
+ Framework: PyTorch
+ Dataset: Aerial Maritime Image Dataset
+ License: MIT License (for the dataset)


## Model Description
The DETR-BASE_Marine Aerial Maritime Detector is a deep learning model based on the DETR architecture with a ResNet-50 backbone. It has been fine-tuned on the "Aerial Maritime Image Dataset," which comprises 74 aerial photographs captured via a Mavic Air 2 drone. The model is designed for object detection tasks in maritime environments and can identify and locate various objects such as docks, boats, lifts, jetskis, and cars in aerial images.

## Key Features:
+ Multi-class object detection.
+ Object classes: Docks, Boats, Lifts, Jetskis, Cars.
+ Robust performance in aerial and maritime scenarios.

## Use Cases
+ **Boat Counting**: Count the number of boats on water bodies, such as lakes, using drone imagery.
+ **Boat Lift Detection**: Identify the presence of boat lifts on the waterfront via aerial surveillance.
+ **Car Detection**: Detect and locate cars within maritime regions using UAV drones.
+ **Habitability Assessment**: Determine the level of inhabitation around lakes and water bodies based on detected objects.
+ **Property Monitoring**: Identify if visitors or activities are present at lake houses or properties using drone surveillance.
+ **Proof of Concept**: Showcase the potential of UAV imagery for maritime projects and object detection tasks.

## Dataset
+ **Dataset Name**: Aerial Maritime Image Dataset
+ **Number of Images**: 74
+ **Number of Bounding Boxes**: 1,151
+ **Collection Method**: Captured via Mavic Air 2 drone at 400 ft altitude.

## Usage 

``` python
from transformers import DetrImageProcessor, DetrForObjectDetection
import torch
from PIL import Image

img_path = ""
image = Image.open(img_path)

extractor = AutoFeatureExtractor.from_pretrained("TuningAI/DETR-BASE_Marine")
model = AutoModelForObjectDetection.from_pretrained("TuningAI/DETR-BASE_Marine")

inputs = processor(images=image, return_tensors="pt")
outputs = model(**inputs)

# convert outputs (bounding boxes and class logits) to COCO API
# let's only keep detections with score > 0.9
target_sizes = torch.tensor([image.size[::-1]])
results = processor.post_process_object_detection(outputs, target_sizes=target_sizes, threshold=0.9)[0]

for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
    box = [round(i, 2) for i in box.tolist()]
    print(
            f"Detected {model.config.id2label[label.item()]} with confidence "
            f"{round(score.item(), 3)} at location {box}"
    )

```


## License

This model is provided under the MIT License.

The Aerial Maritime Image Dataset used for fine-tuning is also under the MIT License.