Downloads · 30 days
0
zocar5807/sar-mining-detector
sar-mining-detector is a image segmentation model from zocar5807. Use it for the image segmentation task on the model card, and read the license before you ship it in a product. It is set up for earthengine. The card lists the license as apache-2.0.
Open-source detector of illegal fluvial gold dredges in the Colombian Amazon, based on Sentinel-1 SAR imagery and Google Earth Engine.
Downloads · 30 days
0
Access
Public
Updated May 18, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md9.7 KB · 87%
From the Hugging Face model README
Open-source detector of illegal fluvial gold dredges in the Colombian Amazon, based on Sentinel-1 SAR imagery and Google Earth Engine.
Freddy Hg detects metallic dredges over Amazon rivers using a thresholded backscatter algorithm on Sentinel-1 SAR GRD (C-band, VV polarization). Dredges (15–25 m vessels with metallic decks and dredging gear) act as dihedral corner reflectors, returning 17–30 dB more backscatter than the specular water surface around them.
Repository: https://github.com/ByZocar/Freddy-Hg
The system enriches each detection with:
This is not a deep learning model with downloadable weights. It is a deterministic geospatial pipeline whose code is open-source. The "model card" exists to document its algorithm, intended use, evaluation, and known limitations following the same transparency standards used for trained models.
# Pseudocode of the core detection
roi = ee.Geometry.Rectangle([xmin, ymin, xmax, ymax])
# 1. Load Sentinel-1 IW GRD, VV polarization, last 60 days
s1 = (ee.ImageCollection("COPERNICUS/S1_GRD")
.filterBounds(roi)
.filterDate(start, end)
.filter(ee.Filter.eq("instrumentMode", "IW"))
.select("VV"))
# 2. Median composite reduces speckle and transient noise
median_current = s1.median()
# 3. Water mask: pixels where VV < -15 dB (specular reflector)
water_mask = median_current.lt(-15.0)
# 4. Bright targets: pixels where VV > -12 dB (corner reflector)
bright = median_current.gt(-12.0)
# 5. Candidates: bright AND on water AND ≥ MIN_PIXELS contiguous
candidates = bright.And(water_mask)
min_size_mask = candidates.connectedPixelCount(MIN_PIXELS + 1).gte(MIN_PIXELS)
candidates_filtered = candidates.And(min_size_mask)
# 6. Change detection vs 2018-2019 historical baseline
s1_baseline = (ee.ImageCollection("COPERNICUS/S1_GRD")
.filterBounds(roi)
.filterDate("2018-01-01", "2019-12-31")
.select("VV")).median()
change = median_current.subtract(s1_baseline)
new_activity = change.gt(5)
# 7. Vectorize centroids of candidate clusters
detections = candidates_filtered.reduceToVectors(geometryType="centroid")
Full implementation: github.com/ByZocar/Freddy-Hg/blob/main/pipeline/freddy_detection.py
This is not a trained model. The detection rules are based on:
The pilot ROIs used for system testing include ground truth from:
Empirically validated metrics for the Colombian Amazon basin are not yet available. The system is in pilot. Proxy metrics from analogous studies (Brazilian Amazon, same sensor, same vessel type):
| Source | Region | TPR | FPR | Threshold |
|---|---|---|---|---|
| Schwartz et al. 2019 | Madeira | 78% | 22% | VV > -10 dB |
| Goncalves et al. 2021 | Tapajós | 74% | 31% | VV > -10 dB |
Calibration work in progress with Corpoamazonía and CDA Guainía pilots. First field-validation report expected Q3 2026.
| Source | Mitigation |
|---|---|
| Sandbars in braided rivers (dry season) | Historical baseline (2018-2019) change detection |
| Legitimate boats in transit | Median multi-temporal compositing |
| Permanent riverside infrastructure (docks, camps) | Excluded by baseline comparison |
| Layover in narrow forested canyons | Documented; affected pixels excluded |
| Flooded vegetation with double-bounce | Strict water mask (VV < -15 dB) |
The system has only been tuned for three Colombian Amazon basins:
Performance outside these basins is unknown. Different river morphology, sediment loads, or vegetation density may require threshold recalibration.
The model implicitly assumes:
This model identifies coordinates where illegal activity may be occurring. That data is sensitive:
For environmental authorities (CARs):
For journalists and researchers:
/public are 30 days delayed (CC BY 4.0)./docs/accuracy before publishing impact figures.@software{freddy_hg_2026,
title = {Freddy Hg: SAR-based detection of illegal fluvial gold dredges
in the Colombian Amazon},
author = {Cardozo, Andrés Felipe and contributors},
year = {2026},
url = {https://github.com/ByZocar/Freddy-Hg},
license = {Apache-2.0},
version = {1.1.0}
}
Contributions are welcome under Apache 2.0. See CONTRIBUTING.md in the
repository for guidelines.
Last updated: May 2026 · v1.1.0