Downloads · 30 days
0
Akashhverma/hCG_detection_app
hCG_detection_app is a machine learning model from Akashhverma. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This project provides a comprehensive solution for automated pregnancy test strip analysis using YOLOv8 for object detection and XGBoost for hCG concentration prediction via image-based colorimetry.
Downloads · 30 days
0
Access
Public
Updated Sep 4, 2025
Repo size
12.5 MB
Likes
0
Public
Click a slice to open those files.
.pt12.5 MB · 95%
From the Hugging Face model README
This project provides a comprehensive solution for automated pregnancy test strip analysis using YOLOv8 for object detection and XGBoost for hCG concentration prediction via image-based colorimetry.
Developed as part of an M.Tech thesis at IIT Delhi, the system performs both qualitative and quantitative analysis of hCG test strips captured via a smartphone or imaging system.
🔍 YOLOv8 Object Detection: Detects Region of Interest (ROI), Control Line (C), and Test Line (T) 🧪 Qualitative Analysis: Generates intensity profiles from test strip lines 📈 Quantitative Analysis: Predicts hCG concentration in mIU/mL using trained XGBoost model 🧠 AI-Powered: Utilizes deep learning and machine learning for fast, accurate analysis 💻 Streamlit GUI: User-friendly interface for real-time image upload and testing 🗂️ Project Structure image
🔧 Installation Instructions
Clone the Repository
(Optional) Create Virtual Environment python -m venv venv source venv/bin/activate # On macOS/Linux venv\Scripts\activate # On Windows
Install Dependencies pip install -r requirements.txt ▶️ Running the App Launch the Streamlit app: streamlit run test.py Visit http://localhost:8501 in your browser to use the GUI.
YOLOv8 (Ultralytics) Detects: ROI (Test strip area) Control Line (C) Test Line (T)
XGBoost Regressor Input: Extracted color space features (RGB, HSV, LAB) from cropped C and T lines Output: hCG concentration in mIU/mL
Trained on labeled dataset using manual annotations and lab-calibrated values
✅ Qualitative Analysis Extracts and plots intensity values across C and T lines. Used for visual validation and line strength analysis.
📈 Quantitative Analysis Predicts actual hCG concentration using a trained machine learning model. Interprets result: Positive if concentration > threshold Negative if below threshold Invalid if C-line is missing
🖼️ Sample Output Screenshot 2025-03-05 152532 Screenshot 2025-04-16 170102 Screenshot 2025-03-05 152551
Streamlit link for app: https://hcgdetectionapp-jjss2yoggzzurpwnbuoh9w.streamlit.app/
🧑💻 Author
Akash Verma M.Tech, Instrument Technology (SeNSE), IIT Delhi 🔗 https://www.linkedin.com/in/akash-verma-525a88145/ 💻 https://github.com/Akashhverma
📄 License This project is licensed under the MIT License.