NotJoeMartinez / APDL_Quality_Control

Computer Vision Quality control for the Advanced Particle Detector Laboratory at Texas Tech University
0 stars 1 forks source link

APDL_Quality_Control

Deep learning applications for quality control in particle detector construction:

https://arxiv.org/abs/2203.08969

Radom Samples

Installation

It's important to specify this version of python as Tenserflow has not been working on the latest release

git clone https://github.com/NotJoeMartinez/APDL_Quality_Control
cd APDL_Quality_Control 
virtualenv env --python=python3.9.2
source env/bin/activate 
pip install -r requirements.txt

If you still get an error installing tenserflow deactivate and remove

pip install --upgrade tensorflow

augment_imgs.py

train_model.py

test_model.py

transfer_learning.py

APDL_QC_API

Flask based API for interacting with the Tenserflow models

Usage

curl -X POST -F 'image=@imgs/[PATH/TO/IMAGE].jpg' http://127.0.0.1:5000/get-labels
{
  "All Predictions": {
    "Broken Wire": "42%", 
    "Glue": " 1%", 
    "Good": "12%", 
    "No Wires": " 0%", 
    "One Third Wire": "37%", 
    "Two Third Wires": " 5%", 
    "Unknown Debris": " 3%"
  }, 
  "Image Size": [
    640, 
    480
  ], 
  "Predicted Label": "Broken Wire", 
  "Prediction Confidence": "42%"
}

Installation

pip install -r requirements.txt
export FLASK_APP=APDL_QC_API/__init__.py
export FLASK_ENV=development
flask run