int(bndbox_anno.find("xmax").text),
int(bndbox_anno.find("ymax").text)]
// make pixel indexes 0-based
bbox_elem = [float(b - 1) for b in bbox_elem]
name = obj.find("name").text.lower().strip()
label.append(self.labels.index(name))
bbox.append(bbox_elem)
bbox = np.stack(bbox).astype(np.float32)
After Change
// substract 1 to make pixel indexes 0-based
bbox.append([
int(bndbox_anno.find(tag).text) - 1
for tag in ("xmin", "ymin", "xmax", "ymax")])
name = obj.find("name").text.lower().strip()
label.append(self.labels.index(name))
bbox = np.stack(bbox).astype(np.float32)