Skip to main content

Antibiotic Resistance Image Process - ARIP

This software is aimed to quantify bacterial resistance to antibiotics by analysing pictures of phenotypic plates. Currently it supports 96 well plates where different bacteria are cultured with different concentrations of antibiotics, but the application adapt to different plates size in rows and columns. Computer vision algorithms have been implemented in order to detect different levels of bacterial growth. As a result, the software generates a report providing quantitative information for each well of the plate. Pictures should be taken so that the plate is square with the picture frame, the algorithm should be able to cope with a slight rotation of the plate.

plate .. image:: arip/images/sinteticplatebac.jpg

segmentated wells .. image:: arip/output/inteticplatebac/output2.jpg

extracted resistance .. image:: arip/output/report.png

report .. image:: arip/output/report_json.png

Key methods:

  • Hough Circles method to detect circles in an image doc

  • Wells segmentation using threshold feature of opencv doc combining binary and otsu threshold

  • Quality detection using a grid model by rows and columns and clustering them, robust to scale and sensible rotation.

Execution:

There are two ways for executing the process: binary or library * Binary using arip.py file allocated in the project:

python arip.py --image images/\<platename\>.png
  • Library installing as described below:

    import arip
    arip.process({'image': 'images/sinteticplate.jpg'})

input:

images/<platename>.png with a plate and ninety six wells

output:

  • Image with extracted wells: images/<platename>/outputXXX.png

  • Cropped image of extracted well: images/<platename>/<row><column><resistance>_<density>.png

  • Report in json format: images/<platename>/report.json

  • Log: images/<platename>/log.txt

description of schema: * row: well row index * column: well colmun index * total: well area in pixels * resistance: absolute resistance found in pixels * density: density of the resistance found

report example:

"7-J":{
   "density":0.17,
   "column":"A",
   "resistance":122,
   "total":706,
   "row":"4"
}

output images example:

4-A_122-0.23, is the well 4-A, with 122 pixels found as resistance with density of 17%

output log example:

customizing scale well: found False, num wells 93, min radius value 18, max radius value 23
customizing scale well: found False, num wells 96, min radius value 18, max radius value 24
customizing grid matching: found False, num wells recognized 96
Succesfully processed plate, found 96 wells

Installing dependencies

pip

sudo apt-get install python-pip ### opencv sudo apt-get install build-essential sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev sudo apt-get install python-opencv ### scilab sudo apt-get install python-scipy

Installing arip

There are two ways of installing pynteractive: * Cloning the project

$ git clone https://github.com/mazeitor/antibiotic-resistance-process.git
$ cd antibiotic-resistance-process
$ python setup.py install  ### (as root)

TODO

  • Normalizing radius by neighborhood instead of general average

  • Working with static grids or masks

Release files for arip 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arip 1.0.1
File Size Uploaded
arip-1.0.1.tar.gz 9.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for arip 1.0.1
File Interpreter ABI Platform
arip-1.0.1-py2.py3-none-any.whl Python 2, Python 3 none any Details
arip-1.0.1-py2-none-any.whl Python 2 none any Details

Total release size: 30.4 kB

Release files / arip-1.0.1.tar.gz

Download URL arip-1.0.1.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
066f24ad61996ea5c82fedc42ac4b846cd88c62227c48dee6788c46eb48d569a
BLAKE2b-256 checksum
How to use checksums
8a9189ab693a6e07560f1071e5b77b5f320738ba03d6c7f785374bb7a8ed7205
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / arip-1.0.1-py2.py3-none-any.whl

Download URL arip-1.0.1-py2.py3-none-any.whl
Size 10.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0c02225fe354072c8b58030d2b71a7412e0b83d0f7c9c039ac248097c5278ca9
BLAKE2b-256 checksum
How to use checksums
4ce8e272e7f0ad1a8e326136e3a28a72b804db9b7100f120f1002c697869a109
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / arip-1.0.1-py2-none-any.whl

Download URL arip-1.0.1-py2-none-any.whl
Size 10.7 kB
Tags Python 2
SHA-256 checksum
How to use checksums
b1b5e0fe1a3d1ab33956d2ff4f8e16371ad6b10a1c197651155ed143d91d4ea0
BLAKE2b-256 checksum
How to use checksums
05517c0a24e621f2d5dec76398cef154e29b24190a4d7d7ba0231159e9db973a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.0.2

3 release files

This release

1.0.1 This release

3 release files

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page