inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

[개정판] 딥러닝 컴퓨터 비전 완벽 가이드

YOLOR 독학 중 질문드립니다.

213

딥러닝새싹

작성한 질문수 1

0

안녕하세요. 강의의 yolo 파트를 혼자 수강하고, 스스로 추가 실습으로 현재 real time detection의 sota인 YOLOR을 혼자 독학하고 있습니다.
 
5일 간 train evaluation에서 에러를 수정하지 못해서, 혹시나 하는 마음에 이렇게 도움을 요청해봅니다.
 
https://drive.google.com/file/d/1mNBu7aLV61pdet9X2dE2uGiacxFbKpAo/view?usp=sharing
 
현재 제가 작업하고 있는 colab파일인데, train까지는 문제 없이 잘 진행 됩니다. 근데 test.py를 통해서 mAP 값을 구하려고 하는데, 자꾸 에러가 뜨고, 아무리 구글링하고 찾아봐도 방법을 모르겠습니다.
 
!python test.py --data ./test.yaml --weights /content/drive/MyDrive/best.pt --img 416 --device 0
 
으로 실행시키면
Namespace(augment=False, batch_size=32, cfg='cfg/yolor_p6.cfg', conf_thres=0.001, data='./test.yaml', device='0', exist_ok=False, img_size=416, iou_thres=0.65, name='exp', names='data/coco.names', project='runs/test', save_conf=False, save_json=False, save_txt=False, single_cls=False, task='val', verbose=False, weights=['/content/drive/MyDrive/best.pt']) Using torch 1.7.0 CUDA:0 (Tesla T4, 15109MB) Model Summary: 665 layers, 36843816 parameters, 36843816 gradients, 80.379953800 GFLOPS WARNING: --img-size 416 must be multiple of max stride 64, updating to 448 Scanning labels valid/labels.cache3 (202 found, 0 missing, 70 empty, 0 duplicate, for 272 images): 272it [00:00, 21758.26it/s] Class Images Targets P R mAP@.5 mAP@.5:.95: 0% 0/9 [00:01<?, ?it/s] Traceback (most recent call last): File "test.py", line 330, in <module> save_conf=opt.save_conf, File "test.py", line 226, in test plot_images(img, output_to_target(output, width, height), paths, f, names) # predictions File "/content/yolor/utils/plots.py", line 108, in output_to_target return np.array(targets) File "/usr/local/lib/python3.7/dist-packages/torch/tensor.py", line 630, in __array__ return self.numpy() TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
 
 

tensorflow 딥러닝 python 머신러닝 배워볼래요? 컴퓨터-비전 keras

답변 1

1

권 철민

안녕하십니까, 

이건 강의에 사용된 패키지와 다른 패키지라 제가 답을 쉽게 찾아드리기가 어려울 것 같습니다. 

저도 사용해보지 않아서 배우는데 시간이 걸릴것 같습니다.

대강 test.py를 보고는 있는데 이걸 익히려면 시간이 필요할 것 같습니다.

아쉽지만 지금 제 일정상 이걸 익혀서 문제를 해결해 드리기는 어려울 것 같습니다. 

감사합니다. 

MMDetection 버전 이슈

0

58

2

강의 환경설정 질문

0

65

2

Custom Dataset에서의 polygon 정보 관련

0

114

3

cvat.ai 보안 수준이 궁금합니다

0

101

2

캐클 nucleus 챌린지 runpod 실습 코드 에러 질문드립니다.

0

120

3

추론 결과의 Precision(또는 mAP) 평가 방법

0

98

2

mmdetection mask rcnn inferenct 실습 시 runpod 템플릿 관해서 질문드립니다.

0

71

2

runpod에서 google drive 연결 시 오류 발생

0

128

2

로드맵 선택

0

74

1

mmcv

0

66

2

Anchor box의 Positive 처리 위치

0

71

2

해당 강의 runpod 적용 후 에러 제보드립니다

0

97

2

run pod credit 관련 제보

0

128

2

mmdetection 2.x과 3.x 호환 관련 표기

0

89

2

mm_faster_rcnn_train_kitti.ipynb 실행 오류

0

115

3

질문 드립니다.

0

89

3

mm_faster_rcnn_train_coco_bccd 실행 오류 질문드립니다.

0

90

1

강사님께 수정을 제안드리고 싶은 것이 있습니다.

0

103

1

google automl efficientdet 다운로드 및 설치 오류

0

87

1

이상 탐지에 사용할 비전 기술 조언 부탁드립니다.

0

113

2

OpenCV 관련 질문드립니다.

0

88

2

mmcv 설치관련해서 문의드려요

0

361

3

강의 구성 관련해서 질문이 있습니다

1

141

2

모델 변환 성능 질문드립니다.

0

129

1