lindawangg / COVID-Net

COVID-Net Open Source Initiative
Other
1.15k stars 477 forks source link

COVIDNet CXR-3 #204

Closed mayaliliya closed 2 years ago

mayaliliya commented 2 years ago

Pull Request Template

Description

Added COVIDNet CXR-3 model with MEDUSA architecture including evaluation and inference scripts.

Type of change

Please mark any boxes that apply.

How Has This Been Tested?

Model weights were loaded from the Google Drive and then tested against the scripts. eval.py tested with:

python eval.py \
    --weightspath models/COVIDNet-CXR-3 \
    --metaname model.meta \
    --ckptname model \
    --n_classes 2 \
    --testfile labels/test_COVIDx8B.txt \
    --out_tensorname softmax/Softmax:0 \
    --is_medusa_backbone

inference.py tested with:

python inference.py \
    --weightspath models/COVIDNet-CXR-3 \
    --metaname model.meta \
    --ckptname model \
    --n_classes 2 \
    --imagepath assets/ex-covid.jpeg \
    --out_tensorname softmax/Softmax:0 \
    --is_medusa_backbone

Checklist:

Please mark any boxes that have been completed.

haydengunraj commented 2 years ago

Overall, I don't love the direction we're heading with respect to our scripts. As we add more and more models, it's becoming a bit difficult to keep track of the right tensor names, command line arguments, etc.

Ideally what we would have is a common library of all our shared code, and then a set of scripts/modules for each type of model we have. I don't think that kind of change is in the scope of this PR, but it's something to keep in mind so we don't end up with code that is cluttered and difficult to read/understand.

mayaliliya commented 2 years ago

Overall, I don't love the direction we're heading with respect to our scripts. As we add more and more models, it's becoming a bit difficult to keep track of the right tensor names, command line arguments, etc.

Ideally what we would have is a common library of all our shared code, and then a set of scripts/modules for each type of model we have. I don't think that kind of change is in the scope of this PR, but it's something to keep in mind so we don't end up with code that is cluttered and difficult to read/understand.

I fully agree, it is becoming difficult to add new models while attempting to make minimal changes to the pre-existing scripts. This is something we can bring up in the following meetings so we can plan a smooth refactoring process