πŸ”₯ Forest Fire Detection Model

This model detects forest fires in images using a deep learning CNN trained on the Wildfire Dataset.

Model Details

  • Architecture: Sequential CNN with Conv2D, MaxPooling2D, Dense, Dropout layers.
  • Input Size: 150x150 RGB images
  • Output: Binary classification (fire or nofire)
  • Framework: TensorFlow / Keras

Training Data

  • Dataset: The Wildfire Dataset
  • Classes: fire, nofire
  • Preprocessing: Images resized to 150x150, normalized to [0, 1]

Training Script

The model was trained using the following script (see attached notebook for full details):

model = Sequential([
    Input(shape=(150, 150, 3)),
    Conv2D(32, (3,3), activation='relu'),
    MaxPooling2D(pool_size=(2,2)),
    Conv2D(64, (3, 3), activation='relu'),
    MaxPooling2D(pool_size=(2, 2)),
    Conv2D(128, (3, 3), activation='relu'),
    MaxPooling2D(pool_size=(2, 2)),
    Flatten(),
    Dense(512, activation='relu'),
    Dropout(0.5),
    Dense(1, activation='sigmoid')
])
model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
model.fit(...)

Intended Use

  • Use Case: Automated detection of forest fires in aerial or ground images.
  • Limitations: Not suitable for video, may not generalize to all forest types or lighting conditions.

How to Use

import requests

API_URL = "https://api-inference.huggingface.co/models/YOUR_USERNAME/YOUR_MODEL_NAME"
headers = {"Authorization": "Bearer YOUR_HF_API_TOKEN"}

with open("your_image.jpg", "rb") as f:
    data = f.read()
response = requests.post(API_URL, headers=headers, files={"file": data})
print(response.json())

Evaluation

  • Test Accuracy: 70%
  • Metrics: Not suitable for video, may not generalize to all forest types or lighting conditions.

Citation

If you use this model, please cite the dataset and this repository.

Downloads last month
15
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support