Baseline inference Algorithm for the STOIC2021 challenge.

Overview

STOIC2021 Baseline Algorithm

This codebase contains an example submission for the STOIC2021 COVID-19 AI Challenge. As a baseline algorithm, it implements a simple evaluation pipeline for an I3D model that was trained on the STOIC2021 training data. You can use this repo as a template for your submission to the Qualification phase of the STOIC2021 challenge.

If something does not work for you, please do not hesitate to contact us or add a post in the forum. If the problem is related to the code of this repository, please create a new issue on GitHub.

Table of Contents

Before implementing your own algorithm with this template, we recommend to first upload a grand-challenge.org Algorithm based on the unaltered template by following these steps:

Afterwards, you can easily implement your own algorithm, by altering this template and updating the Algorithm you created on grand-challenge.org.

Prerequisites

We recommend using this repository on Linux. If you are using Windows, we recommend installing Windows Subsystem for Linux (WSL). Please watch the official tutorial by Microsoft for installing WSL 2 with GPU support.

  • Have Docker installed.
  • Have an account on grand-challenge.org and make sure that you are a verified user there.

Building, testing, and exporting your container

Building

To test if your system is set up correctly, you can run ./build.sh (Linux) or ./build.bat (Windows), that simply implement this command:

docker build -t stoicalgorithm .

Please note that the next step (testing the container) also runs a build, so this step is not necessary if you are certain that everything is set up correctly.

Testing

To test if the docker container works as expected, test.sh/test.bat will build the container and run it on images provided in the ./test/ folder. It will then check the results (.json files produced by your algorithm) against the .json files in ./test/.

If the tests run successfully, you will see Tests successfully passed....

Note: If you do not have a GPU available on your system, remove the --gpus all flag in test.sh/test.bat to run the test. Note: When you implemented your own algorithm using this template, please update the the .json files in ./test/ according to the output of your algorithm before running test.sh/test.bat.

Exporting

Run export.sh/export.bat to save the docker image to ./STOICAlgorithm.tar.gz. This script runs build.sh/build.bat as well as the following command: docker save stoicalgorithm | gzip -c > STOICAlgorithm.tar.gz

Creating an Algorithm on grand-challenge.org

After building, testing, and exporting your container, you are ready to create an Algorithm on grand-challenge.org. Note that there is no need to alter the algorithm implemented in this baseline repository to start this step. Once you have created an Algorithm on grand-challenge.org, you can later upload new docker containers to that same Algorithm as many times as you wish.

You can create an Algorithm by following this link. Some important fields are:

  • Please choose a Title and Description for your algorithm;
  • Enter CT at Modalities and Lung (Thorax) at Structures;
  • Select a logo to represent your algorithm (preferably square image);
  • For the interfaces of the algorithm, please select CT Image as Inputs, and as Outputs select both Probability COVID-19 and Probability Severe COVID-19;
  • Choose Viewer CIRRUS Core (Public) as a Workstation;
  • At the bottom of the page, indicate that you would like your Docker image to use GPU and how much memory it needs. After filling in the form, click the "Save" button at the bottom of the page to create your Algorithm.

Uploading your container to your Algorithm

Uploading manually

You have now built, tested, and exported your container and created an Algorithm on grand-challenge.org. To upload your container to your Algorithm, go to "Containers" on the page for your Algorithm on grand-challenge.org. Click on "upload a Container" button, and upload your .tar.gz file. You can later update your container by uploading a new .tar.gz file.

Linking a GitHub repo

Instead of uploading the .tar.gz file directly, you can also link your GitHub repo. Once your repo is linked, grand-challenge.org will automatically build the docker image for you, and add the updated container to your Algorithm.

  • First, click "Link Github Repo". You will then see a dropdown box, where your Github repo is listed only if it has the Grand-Challenge app already installed. Usually this is not the case to begin with, so you should click on "link a new Github Repo". This will guide you through the installation of the Grand-challenge app in your repository.
  • After the installation of the app in your repository is complete you should be automatically returned to the Grand Challenge page, where you will find your repository now in the dropdown list (In the case you are not automatically returned to the same page you can find your algorithm and click "Link Github Repo" again). Select your repository from the dropdown list and click "Save".
  • Finally, you need to tag your repository, this will trigger Grand-Challenge to start building the docker container.

Make sure your container is Active

Please note that it can take a while until the container becomes active (The status will change from "Ready: False" to "Active") after uploading it, or after linking your Github repo. Check back later or refresh the URL after some time.

Submitting to the STOIC2021 Qualification phase

With your Algorithm online, you are ready to submit to the STOIC2021 Qualification Leaderboard. On https://stoic2021.grand-challenge.org/, navigate to the "Submit" tab. Navigate to the "Qualification" tab, and select your Algorithm from the drop down list. You can optionally leave a comment with your submission.

Note that, depending on the availability of compute nodes on grand-challenge.org, it may take some time before the evaluation of your Algorithm finishes and its results can be found on the Leaderboard.

Implementing your own algorithm

You can implement your own solution by editing the predict function in ./process.py. Any additional imported packages should be added to ./requirements.txt, and any additional files and folders you add should be explicitly copied in the ./Dockerfile. See ./requirements.txt and ./Dockerfile for examples. To update your algorithm, you can simply test and export your new Docker container, after which you can upload it to your Algorithm. Once your new container is Active, you can resubmit your Algorithm.

Please note that your container will not have access to the internet when executing on grand-challenge.org, so all model weights must be present in your container image. You can test this locally using the --network=none option of docker run.

Good luck with the STOIC2021 COVID-19 AI Challenge!

Tip: Running your algorithm on a test folder:

Once you validated that the algorithm works as expected in the Testing step, you might want to simply run the algorithm on the test folder and check the output .json files for yourself. If you are on a native Linux system you will need to create a results folder that the docker container can write to as follows (WSL users can skip this step).

mkdir ./results
chmod 777 ./results

To write the output of the algorithm to the results folder use the following command:

docker run --rm --memory=11g -v ./test:/input/ -v ./results:/output/ STOICAlgorithm
You might also like...
RL algorithm  PPO and IRL algorithm AIRL written with Tensorflow.
RL algorithm PPO and IRL algorithm AIRL written with Tensorflow.

RL algorithm PPO and IRL algorithm AIRL written with Tensorflow. They have a parallel sampling feature in order to increase computation speed (especially in high-performance computing (HPC)).

This repo is developed for Strong Baseline For Vehicle Re-Identification in Track 2 Ai-City-2021 Challenges
This repo is developed for Strong Baseline For Vehicle Re-Identification in Track 2 Ai-City-2021 Challenges

A STRONG BASELINE FOR VEHICLE RE-IDENTIFICATION This paper is accepted to the IEEE Conference on Computer Vision and Pattern Recognition Workshop(CVPR

Official implementation of ETH-XGaze dataset baseline

ETH-XGaze baseline Official implementation of ETH-XGaze dataset baseline. ETH-XGaze dataset ETH-XGaze dataset is a gaze estimation dataset consisting

Simple is not Easy: A Simple Strong Baseline for TextVQA and TextCaps[AAAI2021]

Simple is not Easy: A Simple Strong Baseline for TextVQA and TextCaps Here is the code for ssbassline model. We also provide OCR results/features/mode

 FairMOT - A simple baseline for one-shot multi-object tracking
FairMOT - A simple baseline for one-shot multi-object tracking

FairMOT - A simple baseline for one-shot multi-object tracking

Official Code for ICML 2021 paper
Official Code for ICML 2021 paper "Revisiting Point Cloud Shape Classification with a Simple and Effective Baseline"

Revisiting Point Cloud Shape Classification with a Simple and Effective Baseline Ankit Goyal, Hei Law, Bowei Liu, Alejandro Newell, Jia Deng Internati

Baseline model for
Baseline model for "GraspNet-1Billion: A Large-Scale Benchmark for General Object Grasping" (CVPR 2020)

GraspNet Baseline Baseline model for "GraspNet-1Billion: A Large-Scale Benchmark for General Object Grasping" (CVPR 2020). [paper] [dataset] [API] [do

A baseline code for VSPW

A baseline code for VSPW Preparation Download VSPW dataset The VSPW dataset with extracted frames and masks is available here.

 DFM: A Performance Baseline for Deep Feature Matching
DFM: A Performance Baseline for Deep Feature Matching

DFM: A Performance Baseline for Deep Feature Matching Python (Pytorch) and Matlab (MatConvNet) implementations of our paper DFM: A Performance Baselin

Comments
  • running test.sh

    running test.sh

    Hi Luuk,

    I'm trying to run the baseline example, but it doesn't seem to be completing successfully... The docker build process completes fine, but when running sudo ./test.sh I get the following error:

    ...
    build debug logs here
    ...
    Successfully built 45e1fdb80f76
    Successfully tagged stoicalgorithm:latest
    stoicalgorithm-output
    WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
    Could not load 1.0.000.000000.0.00.0.0000000000.0000.0000000000.000.zraw using <evalutils.io.SimpleITKLoader object at 0x7fd003f33a90>.
    0.5522074103355408
    0.5823957324028015
    Expected output was not found...
    stoicalgorithm-output
    farrell@skylab:~/stoic2021-baseline$ 
    

    Thanks!

    opened by farrell236 4
  • data input/output

    data input/output

    Hello,

    When running process.py with multiple images in test/images/ct, I also get the following error:

    RuntimeError: Multiple case prediction not supported with single-value output interfaces.
    

    I'm not familiar with the evalutils library, do you know whats going wrong here?

    Thanks!

    opened by farrell236 2
Owner
Luuk Boulogne
Luuk Boulogne
Image-retrieval-baseline - MUGE Multimodal Retrieval Baseline

MUGE Multimodal Retrieval Baseline This repo is implemented based on the open_cl

null 47 Dec 16, 2022
Image-generation-baseline - MUGE Text To Image Generation Baseline

MUGE Text To Image Generation Baseline Requirements and Installation More detail

null 23 Oct 17, 2022
Jingju baseline - A baseline model of our project of Beijing opera script generation

Jingju Baseline It is a baseline of our project about Beijing opera script gener

midon 1 Jan 14, 2022
ManiSkill-Learn is a framework for training agents on SAPIEN Open-Source Manipulation Skill Challenge (ManiSkill Challenge), a large-scale learning-from-demonstrations benchmark for object manipulation.

ManiSkill-Learn ManiSkill-Learn is a framework for training agents on SAPIEN Open-Source Manipulation Skill Challenge, a large-scale learning-from-dem

Hao Su's Lab, UCSD 48 Dec 30, 2022
Music Source Separation; Train & Eval & Inference piplines and pretrained models we used for 2021 ISMIR MDX Challenge.

Music Source Separation with Channel-wise Subband Phase Aware ResUnet (CWS-PResUNet) Introduction This repo contains the pretrained Music Source Separ

Lau 100 Dec 25, 2022
Torchserve server using a YoloV5 model running on docker with GPU and static batch inference to perform production ready inference.

Yolov5 running on TorchServe (GPU compatible) ! This is a dockerfile to run TorchServe for Yolo v5 object detection model. (TorchServe (PyTorch librar

null 82 Nov 29, 2022
Monocular 3D pose estimation. OpenVINO. CPU inference or iGPU (OpenCL) inference.

human-pose-estimation-3d-python-cpp RealSenseD435 (RGB) 480x640 + CPU Corei9 45 FPS (Depth is not used) 1. Run 1-1. RealSenseD435 (RGB) 480x640 + CPU

Katsuya Hyodo 8 Oct 3, 2022
PyTorch-LIT is the Lite Inference Toolkit (LIT) for PyTorch which focuses on easy and fast inference of large models on end-devices.

PyTorch-LIT PyTorch-LIT is the Lite Inference Toolkit (LIT) for PyTorch which focuses on easy and fast inference of large models on end-devices. With

Amin Rezaei 157 Dec 11, 2022
Data-depth-inference - Data depth inference with python

Welcome! This readme will guide you through the use of the code in this reposito

Marco 3 Feb 8, 2022
DTCN SMP Challenge - Sequential prediction learning framework and algorithm

DTCN This is the implementation of our paper "Sequential Prediction of Social Me

Bobby 2 Jan 24, 2022