ShadowSeg — From Research Bottleneck to Mask Factory
Inspiration
This project didn’t start as a hackathon idea.
It started as a frustration.
I was working on a research project involving rover-like terrain imagery. The goal was simple: analyze lighting effects and shadow regions in harsh environments. But there was one immediate blocker:
I didn’t have shadow masks.
And without masks, you can’t train, evaluate, or analyze anything.
At first, I tried manually labeling. That quickly became unrealistic. Even labeling 50 images is tedious. Scaling to hundreds or thousands? Impossible.
Then I experimented with quick hacks — even prompting GPT-based tools to approximate masks for small sets of images. That worked for demos, but it was inconsistent and not scalable.
That’s when the real idea emerged:
What if I built a system that could generate shadow masks at scale — reliably, reproducibly, and deployably?
ShadowSeg was born from that need.
The Real Problem
In robotics and autonomous systems, shadows are not cosmetic artifacts. They:
- Break obstacle detection
- Distort terrain classification
- Introduce false edges
- Confuse navigation pipelines
Yet most datasets don’t include high-quality shadow masks for extreme environments like rover terrain.
Even when you train on one dataset, performance collapses when lighting statistics change.
This is domain shift. We train on one lighting distribution. We deploy on another.
When lighting conditions shift, model reliability collapses.
So:
$$ D_{train} \neq D_{deploy} $$
That mismatch is what kills performance.
What We Actually Did
We didn’t invent a new neural architecture.
We built a robust mask production pipeline.
Step 1 — Baseline
We trained a segmentation model (FCN) on a large public shadow dataset (SBU).
It performed well in-domain.
It performed poorly on rover-like images.
That confirmed the domain shift problem.
Step 2 — Stronger Backbone
We upgraded to DeepLabV3+ (ResNet-50).
- Better context modeling
- Better boundary precision
- Improved feature aggregation
This improved structure, but transfer performance was still unstable.
Step 3 — The Key Realization
The problem wasn’t just the architecture.
It was calibration.
The model produced probability maps. Converting those probabilities into usable binary masks required tuning.
So we engineered:
- Probability caching
- Threshold calibration per domain
- Morphological closing to fix fragmentation
- Small-region filtering
The predicted mask is generated by applying a domain-specific confidence threshold to the model’s probability map.
Instead of retraining endlessly, we made the system adaptable.
Measurable Progress
Private rover-like performance improved significantly after calibration — without retraining.
That was the turning point.
We realized:
You don’t always need more data.
You need better deployment thinking.
What ShadowSeg Is Today
ShadowSeg is:
- A shadow segmentation engine
- A mask factory for rover-like imagery
- A domain-adaptive calibration system
- A CPU-deployable inference tool
- A configurable UI for tuning parameters
Upload image → Generate mask → Download result.
Scalable. Reproducible. Practical.
What We Learned
- Domain shift is real and brutal.
- Architecture upgrades help, but not enough.
- Calibration and post-processing matter more than expected.
- Deployable ML systems require transparency and control.
- Research bottlenecks are often data bottlenecks.
Why This Matters
For my original research goal, ShadowSeg changes everything.
Instead of manually labeling hundreds of rover images, I can:
Auto-generate masks → Review edge cases → Refine.
What was impossible becomes feasible.
That’s the real win.
Future Direction
ShadowSeg can evolve into:
- A robotics perception preprocessing module
- A terrain-analysis SDK
- A dataset bootstrapping tool
- A continual domain-adaptation system
At its core, it remains something simple:
A practical tool built to solve a real bottleneck.
Log in or sign up for Devpost to join the conversation.