Как посчитать всех людей на картинке с помощью библиотеки Tensorflow
Написала код программы, но он распознает все объекты, а мне надо подсчитать всех людей. Как правильно написать запрос?
from imageai.Detection import ObjectDetection
import os
exec_path = os.getcwd()
detection = ObjectDetection()
detection.setModelTypeAsRetinaNet()
detection.setModelPath(os.path.join(exec_path, "retinanet_resnet50_fpn_coco-eeacb38b.pth"))
detection.loadModel()
list = detection.detectObjectsFromImage(input_image=(os.path.join(exec_path, "image2.jpg")),
output_image_path=(os.path.join(exec_path,"n_image2.jpg")))
Наверное надо создать класс "Человек", а дальше не знаю.
Источник: Stack Overflow на русском