Keras
tensorflow
oil-spill-detection
semantic-segmentation
satellite-imagery
computer-vision
environmental-monitoring
Eval Results (legacy)
Instructions to use sahilvishwa2108/oil-spill-deeplab with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use sahilvishwa2108/oil-spill-deeplab with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://sahilvishwa2108/oil-spill-deeplab") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: tensorflow
|
| 3 |
+
license: mit
|
| 4 |
+
tags:
|
| 5 |
+
- oil-spill-detection
|
| 6 |
+
- semantic-segmentation
|
| 7 |
+
- satellite-imagery
|
| 8 |
+
- tensorflow
|
| 9 |
+
- keras
|
| 10 |
+
- computer-vision
|
| 11 |
+
- environmental-monitoring
|
| 12 |
+
metrics:
|
| 13 |
+
- f1-score
|
| 14 |
+
model-index:
|
| 15 |
+
- name: DeepLabV3+ Oil Spill Detection
|
| 16 |
+
results:
|
| 17 |
+
- task:
|
| 18 |
+
type: semantic-segmentation
|
| 19 |
+
name: Oil Spill Detection
|
| 20 |
+
dataset:
|
| 21 |
+
name: Oil Spill Satellite Images
|
| 22 |
+
type: satellite-imagery
|
| 23 |
+
metrics:
|
| 24 |
+
- type: f1-score
|
| 25 |
+
value: 0.9668
|
| 26 |
+
name: F1 Score
|
| 27 |
+
---
|
| 28 |
+
|
| 29 |
+
# DeepLabV3+ Oil Spill Detection - Oil Spill Detection
|
| 30 |
+
|
| 31 |
+
## Model Description
|
| 32 |
+
|
| 33 |
+
High-accuracy DeepLabV3+ model for oil spill detection from satellite images. Best performance for critical applications.
|
| 34 |
+
|
| 35 |
+
## Model Details
|
| 36 |
+
|
| 37 |
+
- **Model Size**: 204.56 MB
|
| 38 |
+
- **F1 Score**: 0.9668
|
| 39 |
+
- **Input Shape**: (256, 256, 3) - RGB satellite images
|
| 40 |
+
- **Output Shape**: (256, 256, 5) - 5-class semantic segmentation
|
| 41 |
+
- **Classes**: Background, Oil Spill, Ships, Look-alike, Wakes
|
| 42 |
+
- **Format**: TensorFlow Keras (.keras)
|
| 43 |
+
|
| 44 |
+
## Usage
|
| 45 |
+
|
| 46 |
+
```python
|
| 47 |
+
import tensorflow as tf
|
| 48 |
+
import numpy as np
|
| 49 |
+
from PIL import Image
|
| 50 |
+
|
| 51 |
+
# Load the model
|
| 52 |
+
model = tf.keras.models.load_model('model.keras', compile=False)
|
| 53 |
+
|
| 54 |
+
# Preprocess image
|
| 55 |
+
def preprocess_image(image_path):
|
| 56 |
+
image = Image.open(image_path).convert('RGB')
|
| 57 |
+
image = image.resize((256, 256))
|
| 58 |
+
img_array = np.array(image) / 255.0
|
| 59 |
+
img_array = np.expand_dims(img_array, axis=0)
|
| 60 |
+
return img_array
|
| 61 |
+
|
| 62 |
+
# Make prediction
|
| 63 |
+
image_array = preprocess_image('your_image.jpg')
|
| 64 |
+
prediction = model.predict(image_array)
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
## Model Performance
|
| 68 |
+
|
| 69 |
+
This model achieves an F1 score of 0.9668 on the oil spill detection task, making it suitable for production deployment in environmental monitoring systems.
|
| 70 |
+
|
| 71 |
+
## Deployment
|
| 72 |
+
|
| 73 |
+
This model is optimized for production deployment with:
|
| 74 |
+
- Fast inference times
|
| 75 |
+
- Memory-efficient architecture
|
| 76 |
+
- Support for batch processing
|
| 77 |
+
- Compatible with TensorFlow Serving
|
| 78 |
+
|
| 79 |
+
## License
|
| 80 |
+
|
| 81 |
+
MIT License - Free for academic and commercial use.
|