Geometric Anomaly Segmentation
Completed
Deep Learning / Computer Vision / Image Segmentation2026

Geometric Anomaly Segmentation.

An end-to-end GPU-optimized deep learning pipeline using PyTorch and U-Net to detect geometric anomalies in industrial images with 97.65% IoU.

PyTorchComputer VisionU-NetSegmentationDeep Learning
97.65%
Average IoU
Across 3 Folds
98.06%
Best Fold IoU
Peak Validation Score
3
Ensemble Models
Cross-Validation Folds
512px
Image Resolution
High-res input size
01. Overview

The Problem

Industrial inspection pipelines produce high-resolution RGB images containing unwanted geometric anomalies such as random noise, inverted colors, solid color blocks, and varying geometric shapes. Because these defects vary completely randomly in size, location, transparency, and color, classical computer vision algorithms fail to isolate them. The challenge is to identify these defects at the pixel level and segment them into a precise Binary Mask.

Our Solution

Developed a modular pipeline in PyTorch utilizing a U-Net architecture with a pretrained EfficientNet-B4 encoder. To handle class imbalance and small objects, a hybrid of Dice Loss and Focal Loss was implemented. The system uses a 3-Fold Ensemble strategy and morphological post-processing to maximize precision, achieving an IoU of 97.65%.

This project delivers a robust Deep Learning solution for autonomously segmenting and pixel-mapping geometric anomalies in high-resolution (512x512) industrial RGB images. The system effectively detects random noise, color inversions, solid color blocks, and structural defects. By combining a U-Net architecture with a pretrained EfficientNet-B4 encoder, advanced data augmentation via Albumentations, and a 3-Fold Cross-Validation strategy, the model achieves a highly accurate 97.65% IoU.

02. Methodology

Step-by-step Pipeline.

Data Preparation & Augmentation

Designed a custom PyTorch Dataset loader. To prevent model overfitting, the Albumentations library was used to drastically increase data variance through rotation, mirroring, brightness/contrast adjustments, and complex geometric distortions (Shift/Scale/Rotate).

Technologies Used
PyTorch DatasetAlbumentationsData Loaders
Key MetricAdvanced Augmentation
03. Outcomes

Key Metrics

Best Model IoU
98.06%
Ensemble Average
97.65%
Loss Function
Dice (0.5) + Focal (0.5)
Validation Strategy
3-Fold CV
Encoder
EfficientNet-B4
VRAM Limit
4GB Optimized

Stack

Deep Learning
PyTorchU-NetEfficientNet-B4Segmentation Models
Computer Vision
OpenCVAlbumentationsMorphological Processing
Infrastructure
PythonGPU/CUDAData Loaders
04. Visuals
Anomaly Detection Example 1

Anomaly Detection Example 1

Original image overlay showing segmented geometric anomalies and noise.

Anomaly Detection Example 2

Anomaly Detection Example 2

Precise segmentation of inverted colors and solid blocks.

Anomaly Detection Example 3

Anomaly Detection Example 3

Pixel-perfect mask generation for random structural defects.

Anomaly Detection Example 4

Anomaly Detection Example 4

Model prediction mapped onto a highly complex background.

05.Contact

Let's discuss
clean energy together.

I'm always open to discussing research collaborations, internship opportunities, or just talking about machine learning and renewable energy optimization. If you're passionate about building a sustainable future, reach out!

Wind EnergyML OptimizationGraph TheoryMILPPythonGeniusTUBİTAK

Send a Message

Best way to reach me for research inquiries and collaborations.

ahmettuncuge@gmail.com