RLcapstone.ai

From dataset to demo

Every project on this site — whether it reads a heartbeat, a brain wave, or a blood cell — is built the same way. This page shows the six-stage pipeline I follow from a raw public dataset to a demo you can try, and then shows exactly how each project fills that pipeline in.

The pipeline every project follows

1

Dataset

Start from a real public research dataset (for two projects, a purpose-built environment) and figure out what's actually in it.

2

Prepare & split

Clean, label, and split the data so no information leaks between what the model trains on and what it's tested on.

3

Train

Fine-tune or train on an NVIDIA RTX 5060 Ti.

4

Evaluate

Score on held-out data and report per-class errors.

5

Export

Convert the trained model to run anywhere (ONNX, TensorFlow Lite) and verify the converted model still matches the original.

6

Ship

Wrap it in an in-browser demo and a phone app you can actually try, with the "not a medical device" disclaimer built in.

The split affects what a score means. When recordings from the same person appear in training and testing, a model may recognize the person rather than the condition. The ECG and EEG experiments keep patients or subjects in separate partitions. The first leukemia dataset lacked the identifiers needed for that check.

The pipeline, project by project

These are the datasets, splits, models, and results for each project.

MoleCheck

Skin-lesion photo → lower- or higher-risk, running entirely on the phone.

1 · DatasetISIC Archive — 11,720 dermatoscopy images (a HAM10000 superset), mostly benign.
2 · PrepareMap each diagnosis to benign / malignant; split by lesion so no lesion appears on both sides.
3 · TrainYOLO11s-cls, transfer-learned for 40 epochs on the RTX 5060 Ti.
4 · EvaluateROC-AUC 0.914 on dermoscopy; v2 recovers 0.920 on real phone photos (up from 0.743).
5 · ExportPyTorch → ONNX → TFLite; verified to match within 0.001.
6 · ShipBrowser demo + Flutter Android app; photo never leaves the device.

ECG Arrhythmia Classification

A single heartbeat → one of four clinical categories.

1 · DatasetMIT-BIH Arrhythmia Database — 48 records, ~100,000 cardiologist-labeled beats.
2 · PrepareCut a 0.7 s window per beat, map to 4 AAMI classes; split by patient.
3 · TrainA compact 1D CNN (77k parameters) with class weighting for the rare beats.
4 · Evaluate96% in validation → 44% macro-recall on 22 unseen patients.
5 · ExportONNX (28 KB) for the browser, TFLite for Android.
6 · ShipBrowser demo where you pick a real beat and watch it classified live.

ADHD Classification from EEG

A child's 19-channel EEG → study group, split strictly by child.

1 · DatasetNasrabadi EEG — 121 children (ages 7–12), 19 electrodes at 128 Hz.
2 · PrepareSegment into 2-second windows; keep every child entirely on one side of the split.
3 · TrainA multi-channel 1D CNN that reads all 19 electrodes at once (193k parameters).
4 · EvaluateScored per child: 91.7% (22 of 24 unseen kids), ROC-AUC 0.965 — no collapse.
5 · ExportTensorFlow Lite for the app; ONNX for the browser montage.
6 · ShipBrowser demo drawn like a clinical montage, plus the EEG Explorer app.

Leukemia Cell Subtyping

A single white blood cell → benign look-alike or a leukemia stage — and a lesson in data leakage.

1 · Datasetv1: Aria 2021 smears (3,256 cells, no patient IDs). v2: C-NMC 2019 (with patient IDs).
2 · Preparev1 could only split randomly; v2 holds out whole patients to measure performance on unseen patients.
3 · TrainYOLO11s-cls at 224×224, transfer-learned on the blood-cell images.
4 · Evaluatev1 99.8% (a red flag); v2 patient-split 80.8%; v3 across labs lifts unseen-lab specificity 20%→67%.
5 · ExportONNX + TFLite, both reproducing the original model.
6 · ShipBrowser "Cell Explorer" demo + Android app.

Stock Volatility & Sentiment

Price + news → next week's volatility risk — really an experiment about whether sentiment helps.

1 · DatasetYahoo Finance prices for 59 stocks + a public 2023 news-sentiment dataset.
2 · PrepareEngineer 12 features using only past data; split by time so tests follow training.
3 · TrainA small MLP — twice: once with sentiment, once without, to isolate its effect.
4 · Evaluate57.1% with sentiment vs 57.5% without (chance is 33%) — sentiment did not improve test accuracy.
5 · ExportONNX + TFLite.
6 · ShipBrowser demo comparing the prediction to what the stock actually did, + Risk Explorer app.

Autonomous Pentest Agent

The one that breaks the mold — a reinforcement-learning agent, not a trained classifier.

1 · EnvironmentNo dataset: a purpose-built "MiniBank" Flask app with 3 planted flaws (SQLi, XSS, IDOR).
2 · FrameModel it as a decision process — 16 states, 12 actions, each a real HTTP request.
3 · TrainTabular Q-learning over a few hundred episodes, rewarded for finding flaws fast.
4 · EvaluateFinds all 3 in 4 actions vs ~25 for random — 6× faster, every run.
5 · ReportAuto-generates a findings report: severity, OWASP class, and the fix for each.
6 · ShipBrowser replay of the trained agent, plus JADEPUFFER — a defensive detector.

Why it's laid out this way

The preparation and evaluation steps explain several of the results. Holding out patients exposed the ECG model's weak recall, and comparing stock models with and without sentiment showed that the extra features did not help. The linked write-ups give the details behind each summary.

Every project's full write-up, code, and evaluation results are linked from the projects page, and the complete source is on GitHub.

Educational content only. None of these projects is a certified product or medical device. See the full disclaimer.