2
tensorflow detection tutorial, 을 사용하여 일괄 처리 검색을 수행하려고하지만 다음 코드는 setting an array element with a sequence.
오류를 표시합니다.Tensorflow 개체 검색 : 일괄 검색 방법
# load multiple images
np_images = []
for img_path in img_paths:
img = Image.open(image_path)
image_np = load_image_into_numpy_array(img)
image_np_expanded = np.expand_dims(image_np, axis=0)
np_images.append(image_np)
#Get input and output tensors
image_tensor = det_graph.get_tensor_by_name('image_tensor:0')
boxes = det_graph.get_tensor_by_name('detection_boxes:0')
scores = det_graph.get_tensor_by_name('detection_scores:0')
classes = det_graph.get_tensor_by_name('detection_classes:0')
num_detections = det_graph.get_tensor_by_name('num_detections:0')
# detect on batch of images
detection_results = sess.run(
[boxes, scores, classes, num_detections],
feed_dict={image_tensor: np_images})
이미지 배열을 올바르게 공급하는 방법은 무엇입니까?
스택 추적과 함께 오류 메시지를 제공 할 수 있습니까? –