Close
0%
0%

pyusbus: a python lib for ultrasound usb probes

An API for medical ultrasound usb probes

Public Chat
Similar projects worth following

Objective

The objective for this python lib is be able to get images from USB probes easily, under python, in a user-friendly API, getting images in 3 lines of code.

import pyusbus as usbProbe
probe = usbProbe.UP20() 
frames = probe.getImages(n=10) 

Getting signals and images from ultrasound mechanical probes is an interesting step to know what radiofrequency signals mean in ultrasound imaging, be it for non-destructive testing or medical imaging. The two pulse-echo boards are achieving this, however, this requires extra hardware (electronics, probes, a fair bit of soldering, ..).
Getting ultrasound images could be more straightforward, especially considering ~1kUSD usb probes available on the market. 

Let's see what we can do!

  • Interson probe

    kelu12405/24/2021 at 17:06 0 comments

    Now managing to get images from an interson probe. USB connection seems flaky as hacked, but maybe that's me pushing hard on it.

    In any case, it appears that by default we're getting 128 lines per image, going back and forth.

    The usb device is tricky, presents itself as a certain VID/PID, but needs to be programmed before it goes in a "programmed PID" mode. Emulating it, we get access to another device, from which we can control, it seems, most of the commands. 

    Already identified the "start / stop" ones, including both on motors and electrical pulser.

    Now the challenge is to correctly take the beginning and end of a frame.

    From there, the video can be extracted, and one can see what the other registers will do!

  • An ultrasound app in 10 LOC

    kelu12404/14/2021 at 19:46 0 comments

    Now faster with the linear probe! Optimized code would look like:

    import streamlit as st
    import pyusbus as usbProbe
    import cv2
    
    image_zone = st.empty()
    
    probe = usbProbe.UP20()
    
    while True:     
        img = probe.getImage()   
        rgb = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR) 
        res = cv2.resize(rgb, dsize=(440, 500), interpolation=cv2.INTER_CUBIC)    
        image_zone.image(res)

    See the full streamlit app.

  • First log

    kelu12404/06/2021 at 11:29 0 comments

    Objective

    The objective for this python lib is be able to get images from USB probes easily, under python, in a user-friendly API, getting images in 3 lines of code.

    import pyusbus as usbProbe
    probe = usbProbe.UP20() 
    frames = probe.getImages(n=10) 
    

    Getting signals and images from ultrasound mechanical probes is an interesting step to know what radiofrequency signals mean in ultrasound imaging, be it for non-destructive testing or medical imaging. The two pulse-echo boards are achieving this, however, this requires extra hardware (electronics, probes, a fair bit of soldering, ..). Getting ultrasound images could be more straightforward, especially considering ~1kUSD usb probes available on the market. Their image quality is quite good at first glance.

    Target devices

    This lib was tested on both a convex and a linear probe, each from a different manufacturer. Would you be interested in getting one, let me know so that I can refer to the fab contact at un0rick.cc.

    Result

    Not so bad for a first test ;)




View all 3 project logs

Enjoy this project?

Share

Discussions

helge wrote 04/14/2021 at 23:53 point

Interesting, considering that I happen to have a Globalmed ClearProbe at my disposal, which isn't supported anymore.

  Are you sure? yes | no

kelu124 wrote 04/15/2021 at 09:05 point

Hey @helge ! Happy to give it a try if you still have the original install files (app/drivers), and if you could loan me the probe ;)

  Are you sure? yes | no

Dan Maloney wrote 04/06/2021 at 16:28 point

Interesting - where do you get the probes?

  Are you sure? yes | no

kelu124 wrote 04/06/2021 at 17:26 point

Alibaba - and I've good contacts with the suppliers, happy to connect if it helps =)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates