--- 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 = 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).