вывести словарь:
{u'person': [(95, 11, 474, 466)],
u'chair': [(135, 410, 276, 587)],
u'book': [(127, 380, 161, 396)]}
Мне нужно только u'person': [(95, 11, 474, 466)]
как это отфильтровать?
это часть словаря в моем коде:
detected_objects = {}
# analyze all worthy detections
for x in range(worthy_detections):
# capture the class of the detected object
class_name = self._categories[int(classes[0][x])]
# get the detection box around the object
box_objects = boxes[0][x]
# positions of the box are between 0 and 1, relative to the size of the image
# we multiply them by the size of the image to get the box location in pixels
ymin = int(box_objects[0] * height)
xmin = int(box_objects[1] * width)
ymax = int(box_objects[2] * height)
xmax = int(box_objects[3] * width)
if class_name not in detected_objects:
detected_objects[class_name] = []
detected_objects[class_name].append((ymin, xmin, ymax, xmax))
detected_objects = detected_objects
print detected_objects
пожалуйста, помогите мне
Заранее спасибо