WorksAboutContact
← View All Projects
05
Computer Vision / AI2023

Oil Tank Shadow Removal

"Erasing shadows with AI"

Completed

A two-stage pipeline that automatically detects and removes shadows from crude oil storage tank images captured via satellite/aerial photography. Uses YOLOv8 for shadow detection and Vision Transformer (ShadowFormer) for shadow removal to restore clean imagery.

PythonPyTorchYOLOv8ShadowFormerOpenCVFlask
PROBLEM

When monitoring crude oil tank inventory via satellite imagery, shadows cast by tank structures cause serious issues. Shadow artifacts degrade tank boundary detection accuracy and introduce errors in oil volume estimation. Previously required manual correction or crude filtering.

SOLUTION

Designed a two-stage pipeline: YOLOv8 precisely masks shadow regions, then ShadowFormer (Vision Transformer) restores those regions to original quality. Trained 11 model versions to find the optimal accuracy-speed combination, with a Flask web demo for easy testing.

KEY FEATURES
01

YOLOv8 Shadow Detection

Detects tank shadows in satellite images using 5 YOLOv8 model sizes (nano to xlarge). Instance segmentation generates precise binary masks.

02

ShadowFormer Restoration

Vision Transformer with window-based local attention restores shadow regions to original quality. Tile-based inference handles large satellite images.

03

Multi-Metric Evaluation

Evaluates PSNR, SSIM, and RMSE separately for shadow and non-shadow regions. Perceptual quality measured in LAB color space.

04

Flask Web Demo

Web interface for image upload, model selection, result visualization, and download.

SCREENSHOTS
Screenshots coming soon
Screenshots coming soon
Screenshots coming soon
TECH STACK
PythonPyTorchYOLOv8ShadowFormerOpenCVFlask