All projects
Vision & model serving

CardioSentry

From an ECG photograph to a traceable research result.

An experimental workflow for printed ECG photographs, connecting image checks and crop correction to classification, visual explanations, and saved results.

  • React
  • TypeScript
  • FastAPI
  • PyTorch
  • PostgreSQL
Vision & model serving
Check the photographConfirm the geometryInspect and retain the result

A model is one part of the complete workflow.

The problem

THE STARTING POINT.

A photograph of a printed ECG is a different input from a clean training image. Paper boundaries, perspective, lighting, and preprocessing all affect the path from an upload to a meaningful research result.

The workflow

INPUT. PROCESS. OUTCOME.

Check the photograph

Validate the upload, inspect image quality, and detect the ECG paper.

Confirm the geometry

Adjust detected corners and straighten the sheet before preparing the model input.

Inspect and retain the result

Review classifier scores and Grad-CAM explanations, then revisit saved prediction records.

The intelligent system

WHERE INTELLIGENCE FITS.

The image classifier combines a ConvNeXt Tiny backbone with residual feature-pyramid fusion. Independent label thresholds support multi-label output, and Grad-CAM provides a label-specific view of model attention.

Engineering decisions

AROUND THE IDEA.

Combine automation with correction

OpenCV paper detection is paired with an editable corner selection. The backend validates the quadrilateral before perspective correction.

Specify the serving contract

A model descriptor records checkpoint identity, label order, preprocessing, thresholds, and explanation configuration. Strict loading detects incompatible weights.

Record the inference context

Saved runs include a descriptor snapshot, input digest, logits, scores, thresholds, and timing information. PostgreSQL stores capture and run records.

Connect research to the application

Local training materials include patient-level partitioning, validation-only threshold selection, and evaluation code. Test artifacts cover API behavior and preprocessing consistency.

Reliable AI integration includes the input pipeline, the serving configuration, the review experience, and the record of what was run.

Next project

TorresOCMS

Full-stack clinic software