Hello,
There is no need to write the results to the QVJ files.
Please insert the predicted lumen and outer wall contours into the existing QVS files, and insert the classification results to the Outer Wall Contour comments in the QVS files. Hope that the reference code for writing QVS files and the evaluation could help you.
Reference Code for Writing Annotations as CASCADE Format
If you need help on generating CASCADE format for submission, please read this notebook
https://drive.google.com/file/d/16u2-uKmdIlkLSL7_oMLL_V-PQZLD3GjS/view?usp=sharing
(note that you do not need to generate QVS QVJ files yourselves, just need to insert contours to existing QVS. In addition, please note that the writing order of the boundary points should follow the edge order of polygons, instead of simply sorting the points by X and Y coordinates, e.g. [[0, 0], [1,0], [1,1], [0,1]] instead of [[0, 0], [1,0], [0,1], [1,1]].)
# when you set wall contour
if wall_cont is not None:
set_contour(qvsroot, dicom_slicei, np.array(wall_cont), "Outer Wall", dcmsz, athero_status = 0) # Atherosclerosis diagnosis: 0 for Normal vessel wall, and 1 for Atherosclerotic vessel wall
Evaluation code
evaluate_carotid_challenge_v2.ipynb
https://drive.google.com/file/d/1m3qazpf1WnZLGFXlBeEM1AtIPNWxQJT1/view?usp=sharing
(Please change "if target_wall_cont is None:" to "if target_wall_cont is None or target_lumen_cont is None:" in the evaluation code)
Best regards,
COSMOS 2022 Organization Team