File size: 1,246 Bytes
ee05b5c
46b277a
2789996
 
 
ee05b5c
2789996
 
 
d76a971
2789996
 
 
 
 
39744b0
2789996
 
 
d76a971
2789996
d76a971
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2789996
 
 
 
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
---
license: mit
tags:
  - vision
  - image-segmentation
---

# SegFormer (b0-sized) model fine-tuned on FLAME

The model was trained for a deep learning project titled [Forest Fire Detection](https://github.com/millionhz/forest-fire-detection).

## Model Description

The model is intended to be used for fire detection through image segmentation.

The provided pretrained model was finetuned on the [FLAME](https://dx.doi.org/10.21227/qad6-r683) dataset for 3 epochs with a learning rate of 1e-3 and was able to score an IOU score of **0.745** on the test examples.

# How to use

Here is how to use this model to segment an image:

```python
from transformers import SegformerImageProcessor, SegformerForSemanticSegmentation
from PIL import Image
import requests

processor = AutoFeatureExtractor.from_pretrained("millionhz/segformer-b0-finetuned-flame")
model = SegformerForSemanticSegmentation.from_pretrained("millionhz/segformer-b0-finetuned-flame")


url = <add url here>
image = Image.open(requests.get(url, stream=True).raw)

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

## License

The license for this model can be found [here](https://github.com/NVlabs/SegFormer/blob/master/LICENSE).