• 카테고리

    질문 & 답변
  • 세부 분야

    컴퓨터 비전

  • 해결 여부

    미해결

Faster R-CNN을 이용한 Person Detection 에서 오류

22.09.06 10:49 작성 조회수 143

0

Faster R-CNN을 이용한 Person Detection 실행 중

detections, predictions_dict, shapes = detect_fn(input_tensor) label_id_offset = 1 image_np_with_detections = image_np.copy() # image_np_with_detections np.array에 시각화 결과를 반환합니다. viz_utils.visualize_boxes_and_labels_on_image_array( image_np_with_detections, detections['detection_boxes'][0].numpy(), (detections['detection_classes'][0].numpy() + label_id_offset).astype(int), detections['detection_scores'][0].numpy(), category_index, use_normalized_coordinates=True, max_boxes_to_draw=200, min_score_thresh=.30, agnostic_mode=False ) plt.figure(figsize=(20,20)) plt.imshow(image_np_with_detections) plt.show()

 

이 셀에서

detections, predictions_dict, shapes = detect_fn(input_tensor)

이 부분에 오류 발생하네요.

 

detections, predictions_dict, shapes = detect_fn(input_tensor)

답변 1

답변을 작성해보세요.

0

vctor님의 프로필

vctor

질문자

2022.09.06

cuda 라이브러리 초기화 문제 이슈가 있다고 합니다.

tensorflow와 cuda라이브러리를 아래와 같이 재 설치 후 해결되었습니다.

  1. factory reset runtime in colab runtime

  2. !pip install tensorflow==2.8

  3. !apt install --allow-change-held-packages libcudnn8=8.1.0.77-1+cuda11.2

     

https://github.com/tensorflow/models/issues/10590

vctor님의 프로필

vctor

질문자

2022.09.06

tensorflow 2.92에서

!apt install --allow-change-held-packages libcudnn8=8.1.0.77-1+cuda11.2

이것만 실행해도 잘 실행됩니다.

안녕하세요~. 반갑습니다.

정보 공유 감사합니다.

좋은 하루 되세요~.