GithubHelp home page GithubHelp logo

peppocola / ct-covid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from se4ai2122-cs-uniba/ct-covid

0.0 1.0 0.0 20.86 MB

Screening CT 3d images for interpretable COVID19 detection.

License: MIT License

Python 83.77% Dockerfile 0.73% Shell 1.02% CSS 1.29% Batchfile 0.10% HTML 2.97% JavaScript 10.12%

ct-covid's Introduction

CT-COVID codecov Pylint Report

Screening CT 3d images for interpretable COVID19 detection.

Usage

API Endpoints

The API is accessible at the following endpoints:

  • / which gives a welcome message
  • /docs which provides a documentation of the API
  • /models which provides a list of available models
  • /predict used to receive prediction for a given image and his bounding box

Request of prediction

The request is made by passing:

  • the image to be processed
  • the bounding box of the image

An example of request with curl:

curl -X 'POST' \
  'http://localhost:5000/predict?xmin=0&ymin=0&xmax=224&ymax=224' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'file=filename.png;type=image/png'

Container

Pull docker container

Our container is hosted on dockerhub:

docker pull peppocola/ct-covid:v1

Run container

It is preferable to run the container with a GPU, but if you don't have one, you can run it with a CPU without problems.

Run on CPU

docker run -p 5000:5000 --rm -it --name=ct-covid peppocola/ct-covid:v1

Run on GPU

docker run -p 5000:5000 --rm -it --gpus 1 --name=ct-covid peppocola/ct-covid:v1

Run locally

Requirements

If you just want to run the api:

pip install -r requirements.txt

If you want to use tools like locust, pytest and great_expectations:

pip install -r requirements_dev.txt

Run api

python src/api.py

Those commands will run the api, which will accept requests on port 5000.

Frontend

cd src/frontend
npm install
npm start

Prometheus

docker run -d -p 9090:9090 --add-host host.docker.internal:host-gateway \
    -v "$PWD/prometheus.yml":/etc/prometheus/prometheus.yml \
    --name=prometheus prom/prometheus

Grafana

docker run -d -p 3000:3000 --add-host host.docker.internal:host-gateway \
    --name=grafana grafana/grafana-enterprise

Locust

locust -f tests/locust.py --host http://localhost:5000

PyTest

To run pytest without gpu:

PYTHONPATH=src pytest -m "not gpu" --cov src/covidx tests/

To run pytest with gpu:

PYTHONPATH=src pytest --cov src/covidx tests/

Great Expectations

cd tests
for checkpoint in ct-train ct-valid ct-test
do
  great_expectations --v3-api checkpoint run $checkpoint
done

ct-covid's People

Contributors

loreloc avatar peppocola avatar itsfrank98 avatar danielagrassi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.