Error in reading the annotation files

Error in reading the annotation files


Hi All,

I have annotation files, which are included the location of the diagnostic tumor. I am trying to put a box around the tumor by using the annotation files through the following Python code running over the terminal:

python --dicom-mode="CT" --dicom-path="/Users/Lung_Dx-A0229" --annotation-path="/Users/A0229" --classfile="/Users/category.txt"

But for some images, I got the following errors:

unknown label: a
Traceback (most recent call last):
  File "", line 61, in <module>
  File "", line 42, in main
    roi2rect(img_name=dcm_name, img_np=img_bitmap, img_data=image_data, label_list=class_list)
  File "/Users/mostafa/Documents/Mostafa/UM/Papers/Data/TCIA/Lung-PET-CT-Dx/VisualizationTools/", line 43, in roi2rect
    index = int(np.where(label_array == np.float(1))[0])
TypeError: only size-1 arrays can be converted to Python scalars

I appreciate it if anyone knows how I can deal with this error. Thanks in advance!




Read more here: Source link