Downloads · 30 days
20
12% of all-time downloads
gaoqie/Glm-Edge-V-5B-fire
Glm-Edge-V-5B-fire is a visual question answering model from gaoqie. Use it for the visual question answering task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Using Multimodal Large Language Models for False Alarm Reduction in Image-based Fire Detection https://doi.org/10.1007/s10694-026-02000-3
Downloads · 30 days
20
12% of all-time downloads
All-time downloads
161
Public
Parameters
4.9B
9.7 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors9.7 GB · 100%
How the weights are stored.
BF164.9B · 100%
From the Hugging Face model README
Using Multimodal Large Language Models for False Alarm Reduction in Image-based Fire Detection
https://doi.org/10.1007/s10694-026-02000-3
Existing vision-based methods suffer from high false alarm rates in urban flame detection. Applying Multimodal Large Language Models (MLLMs) for secondary filtering shows great potential in reducing false alarms, yet they have high inference latency and are prone to reasoning collapse on negative samples without explicit Chain-of-Thought (CoT) guidance. To overcome these challenges, this study proposed Flash-Cascade, the first sub-second MLLM-based firewall to leverage CoT to efficiently filter false alarms. We deconstructed the flame detection process into four logical stages (planning, observation, analysis, and judgment), which informed the design of three switchable reasoning modes (Detailed, Quick, and Rapid) to achieve inference acceleration via CoT compression. We fine-tuned Qwen2-VL-7B-Instruct on a multi-grained instruction dataset via Low-Rank Adaptation. This process internalizes explicit reasoning logic into implicit parameter representations, enabling the model to maintain robust reasoning capability even without explicit CoT guidance. On our newly constructed benchmark incorporating real-world hard negatives, Flash-Cascade achieves an accuracy of 97.79% and an F1-score of 0.9767 in Rapid mode, outperforming the baseline by 61.63 percentage points (pp) and 0.5152, respectively. Furthermore, it outperforms the state-of-the-art object detector DEIMv2 by 14.64 pp in accuracy. The method exhibits exceptional sample efficiency, converging with only 600 samples and 2 epochs, and improves inference speed by 810% over standard CoT. This study will open a door for robust and efficient flame detection in high-interference scenarios.

For installation instructions, please refer to zai-org/glm-edge-v-5b.
import torch
from PIL import Image
from transformers import (
AutoTokenizer,
AutoImageProcessor,
AutoModelForCausalLM,
)
model_dir = "" # */gaoqie/Glm-Edge-V-5B-fire
processor = AutoImageProcessor.from_pretrained(model_dir, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(model_dir, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_dir,
torch_dtype=torch.bfloat16,
device_map="cuda:0",
trust_remote_code=True,
)
def infer(img_path):
messages = [{"role": "user", "content": [{"type": "image"}, {"type": "text", "text": f"图像中是否存在火焰?详细分析。"}]}]
image = Image.open(img_path)
inputs = tokenizer.apply_chat_template(
messages, add_generation_prompt=True, return_dict=True, tokenize=True, return_tensors="pt"
).to(next(model.parameters()).device)
generate_kwargs = {
**inputs,
"pixel_values": torch.tensor(processor(image).pixel_values).to(next(model.parameters()).device),
}
output = model.generate(**generate_kwargs, max_new_tokens=200)
output_text = tokenizer.decode(output[0][len(inputs["input_ids"][0]):], skip_special_tokens=True)
print(output_text)
if __name__=="__main__":
image_path = ""
infer(image_path)
This code repository is licensed under the Apache license 2.0.