Training, Evaluation and Inference
November 24, 2020 ยท View on GitHub
CancerNet-SCa models takes as input an image of shape (N, 224, 224, 3) and outputs the softmax probabilities as (N, 2), where N is the number of batches. If using the TF checkpoints, here are some useful tensors:
- input tensor:
input_1:0 - logit tensor:
probs/MatMul:0 - output tensor:
probs/Softmax:0 - label tensor:
probs_target:0 - loss tensor:
loss/mul:0 - training placeholder tensor:
keras_learning_phase:0
Steps for evaluation
- 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/CancerNet-SCa-A \
--metaname model.meta \
--ckptname model-0
- For more options and information,
python eval.py --help
Steps for inference
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 image to be inferenced
- To inference,
python inference.py \
--weightspath models/CancerNet-SCa-A \
--metaname model.meta \
--ckptname model-0 \
--imagepath assets/ex_malignant.jpg
- For more options and information,
python inference.py --help