Python library for cleaning data in large datasets of Xrays
Project description
cleanX
CleanX is an open source python library for exploring, cleaning and augmenting large datasets of Xrays as JPEG files. Please note you should have the file extension (.jpg or .jpeg) in lower case for some functions to work. (JPEG files can be extracted from DICOM files.)
The latest official release:
primary author: Candace Makeda H. Moore
other authors + contributors: Oleg Sivokon, Andrew Murphy
Continous Integration (CI) status
Requirements
- a python installation
- ability to create virtual environments (reccomended, not absolutely neccesary)
- tesseract-ocr and opencv
- anaconda is now supported, but not technically neccesary
Documentation
Online documentation at https://drcandacemakedamoore.github.io/cleanX/
We encourage you to build up-to-date documentation by command.
Documentation can be generated by command:
python setup.py apidoc
python setup.py build_sphinx
The documentation will be generated in ./build/sphinx/html
directory. Documentation is generated
automatically as new functions are added.
Installation
-
setting up a virtual environment is desirable, but not absolutely neccesary
-
activate the environment
Anaconda Installation
-
use command for conda as below
conda install -c doctormakeda -c conda-forge cleanx
You need to specify both channels because there are some cleanX dependencies that exist in both Anaconda main channel and in conda-forge
pip installation
-
use pip as below
pip install cleanX
About using this library
If you use the library, please credit me and my collaborators. You are only free to use this library according to license. We hope that if you use the library you will open source your entire code base, and send us modifications. You can get in touch with me by email (doctormakeda@gmail.com) if you have a legitamate reason to use my library without open-sourcing your code base, or following other conditions, and I can make you specifically a different license.
We are adding new functions all the time. Many unit tests are availalable in the test folder. Test coverage is currently partial. The library includes many functions. Some newly added functions allow for rapid automated data augmentation (in ways that are realistic for X-rays). Some other functions are for cleaning datasets including ones that:
Run on dataframes to make sure there is no image leakage
Run on a dataframe to look for demographic or other biases in patients
Crop off excessive black frames (run this on single images) one at a time
Run on a list to make a prototype tiny Xray others can be comapared to
Run on image files which are inside a folder to check if they are "clean"
Take a dataframe with image names and return plotted(visualized) images
Run to make a dataframe of pics in a folder (assuming they all have the same 'label'/diagnosis)
All important functions are documented in the online documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.