COVIDNet-CXR3 models takes as input an image of shape (N, 480, 480, 3) and outputs the softmax probabilities as (N, 3), where N is the number of batches. If using the TF checkpoints, here are some useful tensors:
- input tensor:
input_1:0
- logit tensor:
norm_dense_1/MatMul:0
- output tensor:
norm_dense_1/Softmax:0
- label tensor:
norm_dense_1_target:0
- class weights tensor:
norm_dense_1_sample_weights:0
- loss tensor:
loss/mul:0
TF training script from a pretrained model:
- We provide you with the tensorflow evaluation script, train_tf.py
- Locate the tensorflow checkpoint files (location of pretrained model)
- To train from a pretrained model:
python train_tf.py \
--weightspath models/COVIDNet-CXR3-B \
--metaname model.meta \
--ckptname model-1014 \
--trainfile train_split_v3.txt
- For more options and information,
python train_tf.py --help
- We provide you with the tensorflow evaluation script, eval.py
- Locate the tensorflow checkpoint files
- To evaluate a tf checkpoint:
python eval.py \
--weightspath models/COVIDNet-CXR3-B \
--metaname model.meta \
--ckptname model-1014
- For more options and information,
python eval.py --help
DISCLAIMER: Do not use this prediction for self-diagnosis. You should check with your local authorities for the latest advice on seeking medical assistance.
- Download a model from the pretrained models section
- Locate models and xray image to be inferenced
- To inference,
python inference.py \
--weightspath models/COVIDNet-CXR3-B \
--metaname model.meta \
--ckptname model-1014 \
--imagepath assets/ex-covid.jpeg
- For more options and information,
python inference.py --help
COVIDNet-Risk uses the same architecture as the existing COVIDNet - but instead it predicts the "number of days since symptom onset"* for a diagnosed COVID-19 patient based on their chest radiography (same data as COVIDNet). By performing offset stratification, we aim to provide an estimate of prognosis for the patient. Note that the initial dataset is fairly small at the time of writing and we hope to see more results as data increases.
- Complete data creation and training for COVIDNet (see Training above)
- run
train_risknet.py
(see-h
for argument help)
* note that definition varies between data sources