Breast health, in your hands.
PinkAlert pairs a low-cost, force-guided ultrasound probe with a machine-learning analyzer that reads each scan as normal, benign or malignant, and tells the user plainly when it is time to see a doctor.
- Patent pending
- Provisional patent filed
- Peer-reviewed
- Am. J. Student Research, 2026
- MIT licensed
- Code and models on GitHub
Early detection shouldn't depend on access to a radiology clinic.
Awareness
Young women are rarely taught what healthy breast tissue looks or feels like, so changes can go unnoticed.
Access
Clinical ultrasound is safe and effective, but cost and availability keep it out of reach for many people.
Interpretation
Reading an ultrasound takes expertise. PinkAlert turns an image into a clear, conservative next step.
Responsibility
PinkAlert is an early-warning aid designed to route people to a doctor, never to replace one.
A handheld probe that guides every scan.
The PinkAlert probe combines a central ultrasound transducer with four force sensors and an inertial measurement unit. It records not only the image, but how firmly and at what angle it was taken, so an untrained user can capture a scan that is consistent and comparable over time.

- Imaging
- 5–15 MHzHigh-frequency linear array
- Force sensing
- 4 corner sensorsF1–F4 map pressure and tilt
- Orientation
- 6-axis IMUAccelerometer and gyroscope
- Power & link
- 3.7 V LiPoUSB or Bluetooth to the app
From probe placement to a saved result.
- PositionThe app shows which breast region to scan next.
- Apply pressureForce sensors guide the user to firm, even contact.
- CaptureUltrasound frames are stored with force, angle and time.
- AnalyzeA quality gate checks the scan, then the analyzer classifies it.
- AlertA clear next step, saved for comparison with future scans.
Three models, one weighted decision.
The Breast Ultrasound Analyzer extracts 29 engineered features from each image and passes them to three classical machine-learning models. Their probabilities are combined in a weighted vote, and the result is mapped to a simple alert.
- PreprocessThe image is loaded, converted and resized to 224 × 224 pixels.
- Extract features29 measurements: intensity statistics, Sobel texture, lesion shape (area, perimeter, circularity, compactness) and HSV histograms.
- ClassifyRandom Forest, a multilayer perceptron and an RBF-kernel SVM each estimate class probabilities.
- Weighted voteProbabilities are combined 60 / 25 / 15 and mapped to one of three alert levels.
Ensemble weights
Random Forest was the strongest and most balanced individual model, so it carries the most weight. In the published study the ensemble detected malignant tissue more reliably than any single model.
| Model | Configuration | Weight |
|---|---|---|
| Random Forest | 100 trees | 60% |
| Multilayer perceptron | ReLU, Adam optimizer | 25% |
| Support vector machine | RBF kernel, C = 2.0 | 15% |
Soft-voting rule
P(c | x) = 0.60·PRF(c | x) + 0.25·PMLP(c | x) + 0.15·PSVM(c | x)
ŷ = argmaxc P(c | x), c ∈ {benign, normal, malignant}
Interpretable by design
Rather than learned convolutional embeddings, each B-mode image is mapped to a 29-dimensional hand-engineered feature vector: first- and second-order intensity statistics per RGB channel; Sobel gradient-magnitude texture descriptors (mean, standard deviation and energy); morphometric descriptors of the largest thresholded contour (area, perimeter, aspect ratio, circularity 4πA/P² and compactness); and 15 HSV histogram bins. Every dimension has a physical meaning, so Random Forest Gini importances can be read directly against the sonographic cues clinicians use, such as lesion shape and margin irregularity.
Features are z-score standardized per model. The class imbalance of the source data (309 benign, 159 malignant, 128 normal) was corrected by random oversampling with replacement before a stratified 70/30 split, with 5-fold cross-validation during training and per-class evaluation on row-normalized confusion matrices. Inference needs no GPU or network connection and runs on a standard laptop CPU.
What the user sees
Normal. Nothing stands out. Keep scanning regularly and save the result for comparison.
Benign. A region was found that is most likely benign. Book a routine check-up and bring the saved scans.
Malignant. The scan shares features with malignant tissue. Seek a professional exam promptly.
Open code for open science.
The analyzer, trained models and desktop application are published on GitHub under the MIT license, so researchers and students can inspect, reproduce and improve the work.
- Language
- Python 3
- Libraries
- scikit-learn, OpenCV
- Interface
- Tkinter desktop app
- License
- MIT
# Get the analyzer $ git clone https://github.com/arshiaghatak/breast_ultrasound_analyzer $ cd breast_ultrasound_analyzer $ pip install -r requirements.txt # Launch the desktop app $ python3 breast_cancer_gui.py # Or classify from the command line $ python3 predict_new_image.py
Built one validated generation at a time.
PinkAlert is a research prototype. Each generation adds one capability and is tested before the next begins. Human-subject evaluation will only follow under appropriate clinical, ethical and regulatory oversight.
- Generation 0 · CompleteSoftwareAnalyzer trained on existing ultrasound images, published and open-sourced.
- Generation 1 · In progressForce-sensing probeFour force sensors and an IMU in a 3D-printed probe: tilt, calibration and guidance.
- Generation 2Phantom testingForce sensing mounted on an ultrasound probe and tested on tissue phantoms.
- Generation 3Sensor fusionUltrasound score combined with a mechanical stiffness estimate; repeatability studies.
- Generation 4Guided scanningPhone interface with a scan map, live guidance and scan history.