'How to get the coordinates of the bounding box in Pylidc
I want to feed a RCNN with images and bounding boxes. I work with Pylidc. So, for the vol_2 (as image) I need the corresponding bounding box with the coordinates. But according to the tutorial in the pylidc page ,when I code :
scan_2 = pl.query(pl.Scan).filter(pl.Scan.patient_id=='LIDC-IDRI-0001')
id=scan_2.all()[0].id
vol_2 = scan_2.all()[0].to_volume()
ann = pl.query(pl.Annotation).filter(pl.Annotation.scan_id == id)
bb = ann.all()[0].bbox()
print("bounding box:",bb)
i get insteed of something like (x1,y1,x2,y2) :
slice(340, 390, None), slice(297, 338, None), slice(86, 94, None)
and don't know how to convert it to the desired form.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
