IdeaCredIdeaCred

wasmiester/CapsuleGuard_AI

49

Computer vision system that detects capsules in a camera frame and classifies them as damaged, scuffed, or intact using OpenCV for detection and PyTorch for deep learning inference.

What's novel

Computer vision system that detects capsules in a camera frame and classifies them as damaged, scuffed, or intact using OpenCV for detection and PyTorch for deep learning inference.

Code Analysis

13 files read · 4 rounds

A real-time capsule anomaly detection system that uses OpenCV contour detection to crop individual capsules from webcam frames, then feeds them through Anomalib's Patchcore model (a memory-bank anomaly detector) to score whether each capsule is anomalous, with a Kafka-based frame streaming pipeline

Strengths

The ROI cropping before inference is a sensible design choice that reduces noise and computation, and the data augmentation pipeline (rotation × scale × brightness) is well-structured for anomaly detection training. The project demonstrates a working end-to-end pipeline from camera capture through inference to visualization.

Weaknesses

The README mischaracterizes the system as a 3-class classifier (intact/scuffed/damaged) when it's actually a single-score anomaly detector, and there are multiple bugs (test_brain.py uses an empty path, prepare_crop hardcodes .cuda() with no fallback, config specifies wide_resnet50_2 but code uses resnet18). The Kafka pipeline is disconnected from the main detection loop, and there are no real automated tests.

Score Breakdown

Innovation
4 (25%)
Craft
44 (35%)
Traction
6 (15%)
Scope
51 (25%)

Signal breakdown

Innovation

Not Fork+1
Code Novelty+1
Concept Novelty+1

Craft

Ci+0
Tests+0
Polish+0
Releases+0
Has License+0
Code Quality+12
Readme Quality+15
Recent Activity+7
Structure Quality+5
Commit Consistency+0
Has Dependency Mgmt+5

Traction

Forks+0
Stars+6
Hn Points+0
Watchers+0
Early Traction+0
Devto Reactions+0
Community Contribs+0

Scope

Commits+5
Languages+3
Subsystems+10
Bloat Penalty+0
Completeness+6
Contributors+5
Authored Files+8
Readme Code Match+3
Architecture Depth+3
Implementation Depth+8

Evidence

Commits

18

Contributors

1

Files

17

Active weeks

2

TestsCI/CDREADMELicenseContributing

Repository

Language

Python

Stars

1

Forks

0

License