Is FROC computation image-wise or patch-wise?

Is FROC computation image-wise or patch-wise?  

  By: sungdukcho_vuno on March 28, 2022, 8:24 a.m.

Dear organizers,

I have a question regarding the FROC computation. Is the FROC score compute per image or per patch of image?

For each input image, the detection output is JSON file where "points" have all the "point"s for the detected TILs. However when inferencing the image, the image may be divided into patches and each patch is processed separately. Elaborating the above questions, is FROC computed per divided patches then all FROC scores are averaged as mean FROC or are points for each patch is concatenated into single list corresponding to detection of input image then FROC is computed?

Thank you for opening such interesting challenge!

Yours sincerely, Sungduk Cho

Re: Is FROC computation image-wise or patch-wise?  

  By: crunch on March 28, 2022, 1:24 p.m.

Hi,

the froc is computed for the complete dataset (the true and false positives and the false negatives are computed per roi and aggregated).

Re: Is FROC computation image-wise or patch-wise?  

  By: qinghezeng29 on March 29, 2022, 9:45 a.m.

Dear Witali,

Could you please share the code that converts the json file per slide into predictions in each roi? Thank you very much!

Yours sincerely, Qinghe

Re: Is FROC computation image-wise or patch-wise?  

  By: crunch on March 29, 2022, 10:20 a.m.

Hi,

see the fct "read pred points probs" (with underscores) in the commit I just pushed for the froc_snippet.

 Last edited by: crunch on Aug. 15, 2023, 12:56 p.m., edited 2 times in total.

Re: Is FROC computation image-wise or patch-wise?  

  By: qinghezeng29 on March 31, 2022, 3:19 p.m.

Dear Witali,

Thank you for sharing the code! It looks like that the tps, tns, and fps are computed per slide and then aggregated. It should give the same results as per roi but perhaps slower? Please correct me if I've misunderstood.

Yours sincerely, Qinghe

Re: Is FROC computation image-wise or patch-wise?  

  By: a.tsakiroglou on March 31, 2022, 5:53 p.m.

On a similar thread, does this mean that the compute_scores function:

https://github.com/DIAGNijmegen/pathology-tiger-algorithm-example/blob/main/evaluations/eval_det_froc_snippet.py#L11

is meant to return the aggregated tps, fns and fps?

And if that is the case, does this mean that the area_mm here:

https://github.com/DIAGNijmegen/pathology-tiger-algorithm-example/blob/main/evaluations/eval_det_froc_snippet.py#L13

is the total tissue area across all slides?

Thank you for the clarifications!

Re: Is FROC computation image-wise or patch-wise?  

  By: crunch on April 1, 2022, 8:21 a.m.

Hi,

the tps, tns and fps are computed per roi (per slide) and summed up.

compute-scores returns indeed the aggregated tps, fns, fps. It gets as input a list of ground_truths and predictions (as arrays or lists, one per roi), computes for each the tp, fn and fp and sums them up. (this is done for each possible probability-threshold)

area-mm is indeed the total area of all rois.

let me know if there are more questions, Witali

 Last edited by: crunch on Aug. 15, 2023, 12:56 p.m., edited 1 time in total.