Skip to content

Mattynb/AmpliVision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AmpliVision

AmpliVision is an open source program designed to Automate AMPLI rapid test workflows. Mainly, It is able to load and process AMPLI rapid test images from a specified folder, find the grid and Ampli blocks in the image, read the diagnostic result for each Ampli block, generate a synthetic dataset of images, train a CNN model to classify AMPLI tests with generated images, then run outlier detection.


Table of Contents


File Structure

image


Installation

Clone the repository:

git clone "https://github.com/mattynb/AmpliVision.git"

Ensure you have python3.11.9 and the compatible GPU-Enabled TensorFlow setup in your environment. Then, from the AmpliVision root directory run:

pip install -r AmpliVision/requirements.txt

Usage

AmpliVision package takes the following arguments:

Python AmpliVision USE_CASE DATASET TAG*
  1. Supported USE_CASE parameters:

    CORE


    EXTRA

  2. Supported DATASET parameters:

    Determines what dataset will be used.

    • MARKER - The Marker dataset used for proof of concept runs
    • YOUR_TARGET
    • _ - For use cases that do not need datasets. Such as history.
  3. TAG*

    optional ID string. Defaults to dataset if None


Pre-Defined Use Cases

CORE Use Cases

Scan AMPLI test images and extract results

Example command to scan and extract MARKER data. The scanned images will be in data/scanned_MARKER and extracted results in data/results/DATE

Python AmpliVision scan MARKER My_Identifiable_TAG

Train a CNN LENET model to clasify Ampli test images

python3 AmpliVision LENET scanned_MARKER MARKER

Detect Outliers With Trained Model And PyOD

python3 AmpliVision PyOD scanned_MARKER MARKER

EXTRA Use Cases

Test a trained CNN model in Predicting Never Seen Ampli tests

python3 AmpliVision test scanned_MARKER MARKER

Visualize Generated Data in Jupyter Notebook

python3 AmpliVision check_data scanned_MARKER MARKER

Display History After Trainings

python3 AmpliVision history scanned_MARKER MARKER

Contributing

If you'd like to contribute to this project, please follow these guidelines:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes.
  4. Test your changes thoroughly.
  5. Create a pull request.

Implementing Your AMPLI Tests

  1. Add the folder with your AMPLI test images in data. Make sure each file's name start with the result. For example, a test that shows positive result for DENV4 should be named DENV4_...

  2. Define the targets of your AMPLI rapid test in __main__.py. "YOUR_TARGET" is the placehoder implementation.

    def manage_targets(dataset):
        """ assigns targets user wants the CNN to predict in specific datasets """
        
        dataset = dataset.upper()
    
        if "MARKER" in dataset:    
            TAG = 'MARKER'
            TARGETS = ['lung', 'thyroid', 'ovarian', 'prostate', 'skin', 'control', 'breast']
        
        elif "YOUR_TARGET" in dataset:
            # Here is an example to show where you can assign your own targets to your dataset     
            print(" YOUR_TARGET not implemented yet in manage_targets() [__main__.py file], exiting...")
            exit()

More Resources

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

If you have any questions or need assistance, feel free to contact us:

We hope you find this repository useful for your automated Ampli needs!

Releases

No releases published

Packages

No packages published

Languages