Skip to content

EdwinTSalcedo/CUBITAL

Repository files navigation

Edge AI-Based Vein Detector for Efficient Venipuncture in the Antecubital Fossa

This repository contains supplementary material for "Edge AI-Based Vein Detector for Efficient Venipuncture in the Antecubital Fossa" (MICAI 2023 Oral session). Authors: Edwin Salcedo, Patricia Peñaloza


Overview

Motivation

Assessing the condition and visibility of veins is an important step before obtaining intravenous access in the antecubital fossa. This is a common procedure to draw blood or administer intravenous therapies (IV therapies). Even though medical practitioners are highly skilled at intravenous cannulation, they usually struggle to perform the procedure in patients with low visible veins due to fluid retention, age, overweight, dark skin tone, or diabetes. Commonly, SOTA investigations propose combining Near Infrared imaging (NIR) and deep learning (DL) techniques for forearm vein segmentation. However, the more detailed the localization of veins in the antecubital fossa, the more helpful it would be in reducing the time required for venipuncture.

In view of the above, we introduce a new NIR-based forearm vein segmentation dataset of 2,016 labelled images collected from 1,008 subjects with low visible veins. Second, we propose a framework that locates veins specifically in the antecubital fossa region of a patient's arm. Additionally, a compressed version of the proposed framework is embedded inside a bespoke, portable vein finder device.

Proposed framework and DL architecture

The framework to extract veins in the antecubital region consists of the next steps:

The segmentation model, shown in blue, is depicted in the following figure:

Inference is performed with grayscale images of 512x512 pixels. The net outputs a mask, coordinates of the antecubital fossa, and an angle.

Proposed Hardware Device

Component CAD Design
Case Base Cover Charger
Battery Case Holder Battery
Camera Holder Picam Noir Leds Matrix
LCD Screen Screen LCD Assembly
Additional Parts Power bank Relay Raspberry Pi 4B

The complete device can be assembled by opening the file Ensamblaje.SLDASM.

Dataset

The database used for this work was built from scratch. 1,008 subjects with low-visible veins placed one arm at a time over a table. Then, we captured a NIR image with the initial version of the vein finder. For more specific information about the labelling process and data collection process, please refer to the paper. The final version of the dataset can be found here: Dataset. We created an additional Dataset version with normalized samples of 512x512 dimensions for immediate training with the proposed architecture.

NIR Images Preprocessing Annotations

Getting started

With the project, we provide you with one pretrained multi-task unet model, which is embedded inside a complete pipeline to generate inference given a NIR image. You can execute the latter by following the next steps:

# Clone the repository
git clone git@github.com:EdwinTSalcedo/CUBITAL.git cubital

# Create and activate a new conda environment
conda create -n new_env python=3.10.12
conda activate new_env

# Install the dependencies 
pip install -r requirements.txt

# Execute inference script
python inference.py

The pretrained serialized models for this pipeline are placed in edge/models, while their detailed implementations are located in notebooks.

Citation

If you find CUBITAL useful in your project, please consider to cite the following paper:

@inproceedings{salcedo2023,
  title={Edge AI-Based Vein Detector for Efficient Venipuncture in the Antecubital Fossa},
  author={Salcedo, Edwin and Pe{\~n}aloza, Patricia},
  booktitle={Mexican International Conference on Artificial Intelligence},
  pages={297--314},
  year={2023},
  organization={Springer}
}