Closed varghesealex90 closed 6 years ago
The encoding of a 'healthy'/'no findings' patient would be a 14-dimensional vector of all zeros. For example, the first sample in the training set represents a healthy patient.
images_002/00001522_000.png 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The output of the neural network most likely would not be zero. But, it is possible to set a discrimination threshold for each pathology. If the obtained probability is less than that threshold, then the patient does not have that particular pathology.
Varying the discriminative threshold it is possible to achieve different values for true positive and false positive rates. That's how the ROC curves are built.
Hi;
The dataset comprises of 15 classes of which 14 of them fall under pathological conditions and the remaining one "No Finding" are scans from normal or healthy subjects. In the code provided, nclasses is set to 14 and the AUROC is computed for the 14 pathological condition.
No during inference time, if I provide a image with "No Finding" for example ` image_data = Image.open('/media/brats/0d4a2225-d6b1-4b80-94fd-7c8ae0b1fa102/chest_x_net/dataset/data/images_012/00028178_000.png').convert('RGB')
t_image_data = transformSequence(image_data) t_image_data = t_image_data.unsqueeze(0) bs, n_crops, c, h, w = t_image_data.size() varInput = torch.autograd.Variable(t_image_data.view(-1, c, h, w).cuda(), volatile=True) out = model(varInput) outMean = out.view(bs, n_crops, -1).mean(1) print (outMean) `
It returns
Columns 0 to 9 *1.00000e-02 0.1366 0.0459 0.0274 8.2003 0.2135 0.4988 0.0874 0.1249 0.0360 0.0008
Columns 10 to 13 1.00000e-02 * 0.0109 0.1713 0.1124 0.0045 [torch.cuda.FloatTensor of size 1x14 (GPU 0)]**
Now is there is a way for me to infer that this patient falls under the category of "No Findings" or "Healthy". As outMean.max() points to class 4?
Am I missing something very trivial here?