CoolFace
Apppublic

pranayganvir/blood-cell-detection

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
App README

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

๐Ÿฉธ Blood Cell Detection App ๐Ÿ”ฌ

๐Ÿ“Œ Overview

The Blood Cell Detection App is a Streamlit-based application that allows users to upload an image and detect different types of blood cells (๐ŸŸฅ RBCs, ๐Ÿ”ต WBCs, and ๐ŸŸก Platelets) using a YOLO model. The detected image is displayed with bounding boxes and a table showing the count of each cell type.

The model was trained on the BCCD dataset, with annotations converted to TXT format using Roboflow for YOLO compatibility. The app processes images, draws bounding boxes around detected cells, and displays a count table, providing an efficient tool for blood cell analysis. ๐Ÿš€.

โœจ Features

โœ… Upload an image for blood cell detection โœ… Draw bounding boxes around detected ๐ŸŸฅ RBCs, ๐Ÿ”ต WBCs, and ๐ŸŸก Platelets โœ… Display a count table of detected cells โœ… Option to download the processed image

โš™๏ธ Installation

To run the app locally, follow these steps:

1๏ธโƒฃ Clone the Repository

sh
https://github.com/pranayganvir/blood-cell-detection-BCCD.git
cd blood-cell-detection-BCCD

2๏ธโƒฃ Install Dependencies

Make sure you have Python installed. Then, install the required packages:

sh
pip install -r requirements.txt

3๏ธโƒฃ Run the Application

sh
streamlit run app.py

๐Ÿ“Œ Requirements

  • โ€”๐Ÿ Python 3.7+
  • โ€”๐ŸŒ Streamlit
  • โ€”๐Ÿ“ท OpenCV
  • โ€”๐Ÿ”ข NumPy
  • โ€”๐Ÿ“Š Pandas
  • โ€”๐Ÿ–ผ๏ธ PIL (Pillow)
  • โ€”๐Ÿ† ultralytics (for YOLO model)

๐Ÿš€ Usage

1๏ธโƒฃ Upload an image containing blood cells. 2๏ธโƒฃ The model processes the image and detects ๐ŸŸฅ RBCs, ๐Ÿ”ต WBCs, and ๐ŸŸก Platelets. 3๏ธโƒฃ The detected image is displayed with bounding boxes. 4๏ธโƒฃ A table shows the count of each type of blood cell. 5๏ธโƒฃ Optionally, download the processed image.

๐Ÿ“ฆ Model Details

The application uses a YOLO model (best.pt) trained on the YOLO v10p framework with the BCCD dataset. Ensure the model file is available in the project directory.

  • โ€”๐Ÿ”— Dataset: BCCD Dataset
  • โ€”๐Ÿ“ Annotations Converted: Annotations were converted into the TXT format using Roboflow for compatibility with YOLO.

๐Ÿ™Œ Acknowledgments

  • โ€”๐Ÿ“š Dataset: BCCD Dataset
  • โ€”๐Ÿค– Model: YOLO v10p
  • โ€”๐Ÿ–ฅ๏ธ Framework: Streamlit
  • โ€”๐Ÿ› ๏ธ Annotation Conversion: Roboflow

๐Ÿ“œ License

This project is open-source and available under the MIT License.

Front UI Interface

UI Interface

Result

Result !

Count Table

Count Table

Downloaded Image

App Screenshot.jpg)