묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
안녕하세요 선생님 질문입니다!
4:34를 보면서 질문드리고 있는데 이해하고 있는 부분이 맞는지 모르겠습니다 첫번째 300* 300* 3의 이미지가 첫번째 conv를 통과하여 생성된 38*38*512의 feature map에서 3*3 4(anchor box개수)*(pascal data set이라면 20 + 1+ 4: 바운딩박스 좌표)를 해서 마지막 detection 단으로 보내서 학습을 하는 것 까지 이해를 하겠는데, 3*3 과 같은 컨볼루션을 통해 바운딩박스가 학습되는 원리를 모르겠습니다. 여기서 2가지 conv연산이 들어가는데 그 중 하나는 앵커박스를 통하여 바운딩박스를 학습하고 다른 하나는 컨볼루션 연산을 통해서 feature map의 사이즈를 줄이는(정보를 압축?) 하는 쪽으로 하는게 맞는지요..글 주변이 없어서 죄송합니다.
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
NMS 및 Confidence Score와 관련하여 질문이 있습니다.
안녕하세요. Mask RCNN으로 프로젝트 진행하던 중 하나의 객체에 대해 영역이 매우 유사한 BBox가 2개씩 나타나는 현상이 생겨 NMS에 관해 다시 공부하던 중 수행 로직과 관련하여 몇가지 궁금증이 생겨 글 남깁니다.우선 Confidence Score란 것이 단순히 박스안에 물체가 있을 확률을 의미하는 것인지, 아니면 박스안에 물체가 해당 Class일 확률을 의미하는 것인지 헷갈립니다. 단순히 물체가 있을 확률만을 의미하는 것이라면, 저의 경우에서 영역이 매우 유사한 BBox간은 IOU가 매우 높으니 제거되어야 하는게 아닌가요?? 만약 해당 Class일 확률을 의미하는 것이라면 NMS 과정이 예측된 Class별로 수행이 되는 것인지(ex. 차에 대한 BBox들끼리 NMS수행) 궁금합니다.학습 과정에서 문제가 생겼을 수 있다 판단하여 모델 전체를 재학습을 진행하고 있긴 합니다만, 위 질문들에 대해 궁금점이 남아 글 남깁니다.
-
해결됨[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
Segmentation Polyline
안녕하세요, 강사님.CVAT로 Segmentation 커스텀 데이터셋을 만들 때폴리곤을 이용하여 해당 영역을 마스크를 해주었을 때는 결과가 잘 나오는데폴리라인으로 영역을 표시해주고 테스트를 하니 마스크 형태로 영역이 잡혀서 나오더라구요.폴리곤이 아닌 폴리라인을 이용하여서는 segmentation 결과를 얻을 수 없나요?
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
Selective Search를 도면에서 특정 기호 찾는 데 활용할 수 있을까요?
안녕하세요. 선생님의 강의를 열심히 듣고 있는 직장인입니다.다름이 아니라 설계도면에서 특정 기호를 찾아야 하는 업무가 있는데 Selective Search를 이용하여 특정 기호의 이미지를 먼저 인식시키고, 그 다음에 입력되는 도면들에서 해당 기호가 있는 곳을 표시하는 작업을 해보고 싶습니다.해당 방법을 이용하면 될지, 아니면 더 좋은 방법이 있을지 문의드립니다.
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
선생님 질문입니다!
3:23 에서 질문을 드리고 있습니다!예측 BBbox 와 positive 좌표차이가 Ground truth와 positive 좌표차이와 같게 만든다고 하셨는데 가령 빨간점이 파랑 점과의 거리 가 같은 곳은 무수히 많다고 생각하는데 단순히 거리를 줄이는 것이 어떤 원리로 regression이되는지 이해가 되지 않습니다.
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
mask 없이 mask-RCNN 사용이 가능할까요??
안녕하세요 선생님,궁금한 점이 생겨 이렇게 질문 남깁니다.지금 torchvision의 faster r-cnn을 이용해서 object detection 프로젝트를 수행하고 있는데여기서 제가 궁금한 점은 2가지 입니다.사용하고 있는 데이터가 mask 정보가 없는, bounding box와 카테고리 정보만 담겨있는 custom data인데 mask정보 없이 mask R-CNN에서도 실행해볼 수 있을까요??mask 정보 없이 mask R-CNN을 사용하는 것은 faster R-CNN을 사용하는 것과 차이가 없을까요?? 1번을 시도하는 것은 의미 없는 일인 것인지 궁금합니다.감사합니다.
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
선생님 질문입니다!
1:01의 그림을 보면서 질문드리고 있습니다!원래 CNN을 거치면 FC layer에 가기전에 여러개의 피처맵을 Flatten 해서 맞춰주는데 지금 그림에서 Conv Network를 통과한 feature 이미지는 하나만 있다고 표현되는데 왜 그런건가요? 제 생각대로라면 Flatten이 되기전에는 여러 피처맵이 있는걸로 알고 있습니다.그리고 이미 vggnet 을 통해서 나온 피처맵을 3*3 conv를 하는 이유를 모르겠습니다. conv를 적용하지 않고 그냥 1*1 conv를 하는 것이 나을거라 생각하는데 이해가 잘 되지 않습니다.
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
multi-class segmentation mask일 때 COCO format으로 변환하는 방법
구글링을 해도 도저히 답을 못 찾겠어서 질문 드립니다. 지금 맡고 있는 프로젝트에서는, 총 4개의 class가 masking되어있는 이미지 형태로 annotation이 준비되어 있고 이걸 json annotation으로 만들어야 하는데 이럴 경우에는 어떻게 해야 하죠?
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
선생님 질문입니다!
구글링을 해도 잘 이해가 안되서 이렇게 질문을 남깁니다.원본이미지는 이미지내에 오브젝트가 어떤 것이 있는지, 어디에 있는지에 대한 정보인 레이블 값과 비슷한 Annotation 파일과 1:1 매치가 됩니다. (pascal데이터라는 가정하에) 그러한 이미지를 selective search를 통해서 예측한 box와 실제위치 (ground truth)의 겹치는 정도(IOU)가 0.5 이상인 이미지를 미리 학습된 CNN(Alexnet)에 넣어 이 이미지가 예측한 이 곳이 "사람"이다. 라고 분류를 해주는 순으로 가는거라 생각하는데. 제가 이해한게 맞는건지 잘 모르겠습니다. 또한 IOU가 0.5이상인 ss predicted 된 박스의 레이블은 어떻게 결정되는 건가요? 머릿속이 너무 뒤죽박죽이라 질문이 두서가없는 점 죄송합니다.
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
안녕하세요 선생님
선생님 제가 생각하는 annotation 파일에 대한 생각이 맞는지 궁금합니다.이전에 배웠던 mnist 파일에 빗대어 표현하자면숫자 '1'이라는 이미지에 레이블값 '1' 이 같이 매핑되어있지 않았습니까? 그렇다면 pascal voc에서는 '1' (물론 없지만) 이미지에 레이블값'1', 1이 있는 위치(bounding box), 또는 사진내 다른 이미지의 위치(bounding box)와 같은 좀 더 세분화 된 레이블 내용을 가진 것이 annotation 파일인가요? 그래서 이러한 많은 정보에 다가가기 위해 파싱을 통해 접근하는 거구요.
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
코랩 파이토치 환경 변화 관련
안녕하세요 선생님가장 최근에 코랩 파이토치 환경이 변경되어 선생님께서 코멘트 주신 내용이 있었는데요저도 그 글을 보고 파이토치를 재설치해서 mmcv를 사용하고 있었습니다.그런데 오늘 오후부터 mmdetection 첫번째 사진과 같은 방법으로 코드를 돌리면mmengine 이 인식되지 않는다는 오류가 발생합니다. 확인한번 부탁드려도 될까요?혼자 해결해보려고 mmdetection installation 페이지에서 아래와 같이 설치해보았는데그 때는 mmengine이 없다는 말은 안나오는데 mmdet.datasets.builder가 인식이 안되더라구요실제로 mmdet.dataset 폴더 안에 builder.py가 없더라구요. 제가 어느 부분을 놓친건지.. 조언부탁드립니다.
-
해결됨[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
mmdetection mask-rcnn 모델 훈련 성공 후 inference 오류
안녕하세요... 좋은 강의 감사합니다. 제가 질문 드리고자 하는 부분은 다음과 같습니다.이미지 데이터셋을 자체적으로 만들어서 코랩에서 학습을 시키고, 학습된 모델을 코랩에서 inference 는 되는데, 이 모델을 제 개인 컴퓨터 ( GPU가 없는 cpu 로 진행)에서 진행하면 아래와 같은 오류가 발생하면서 작동이 되지 않습니다. 진행순서는 다음과 같습니다.자체 이미지셋 50장을 코랩에서 mmdetection mask-rcnn 으로 학습 (pre-train 모델 사용)학습 성공후, 코랩 유지상태에서 테스트용 이미지 inference 성공, 보기 및 저장 성공학습된 epoch.pth 모델을 다운받아서 개인 pc (CPU only) inference. 할 경우 아래와 같은 오류발생, mmdetection 예제 모델로 예제 이미지를 개인 pc에 다운받아서 inference 할 경우느 성공혹시 몰라서 tools 폴더내 publish.py로 모델을 생성해서도 해보았으나, 동일한 오류 발생오류 내용은 다음과 같습니다.load checkpoint from local path: /Users/category/Projects/WatizB/mmdetection/checkpoints/mask_rcnn_r101_fpn_1x_WatizB-ddc77fa4.pthThe model and loaded state dict do not match exactlysize mismatch for roi_head.bbox_head.fc_cls.weight: copying a param with shape torch.Size([12, 1024]) from checkpoint, the shape in current model is torch.Size([81, 1024]).size mismatch for roi_head.bbox_head.fc_cls.bias: copying a param with shape torch.Size([12]) from checkpoint, the shape in current model is torch.Size([81]).size mismatch for roi_head.bbox_head.fc_reg.weight: copying a param with shape torch.Size([44, 1024]) from checkpoint, the shape in current model is torch.Size([320, 1024]).size mismatch for roi_head.bbox_head.fc_reg.bias: copying a param with shape torch.Size([44]) from checkpoint, the shape in current model is torch.Size([320]).size mismatch for roi_head.mask_head.conv_logits.weight: copying a param with shape torch.Size([11, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([80, 256, 1, 1]).size mismatch for roi_head.mask_head.conv_logits.bias: copying a param with shape torch.Size([11]) from checkpoint, the shape in current model is torch.Size([80]).[[[148 148 148] [147 147 147] [147 147 147] ... [150 148 140] [152 149 141] [151 149 139]] [[147 147 147] [147 147 147] [147 147 147] ... [154 151 146] [154 151 143] [151 149 139]] [[147 147 147] [147 147 147] [147 147 147] ... [157 154 149] [155 152 144] [152 149 141]] ... [[155 155 155] [154 154 154] [154 154 154] ... [150 148 148] [151 149 149] [151 149 149]] [[153 153 153] [154 154 154] [154 154 154] ... [149 147 147] [150 148 148] [150 148 148]] [[152 152 152] [153 153 153] [155 155 155] ... [149 147 147] [149 147 147] [150 148 148]]]/Users/category/Projects/WatizB/mmdetection/mmdet/datasets/utils.py:66: UserWarning: "ImageToTensor" pipeline is replaced by "DefaultFormatBundle" for batch inference. It is recommended to manually replace it in the test data pipeline in your config file. warnings.warn( 바쁘시겟지만 확인 혹시 이런 상황에 대한 경험이 있으시면 답변 부탁드립니다. 수고하세요>~~
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
dataset 질문
정말 간단한 질문 하나만 하겠습니다..datasets 는 config.data.train을 통해서 말그대로 모든 데이터의 집합인 datasets를 만듭니다.이때 datasets과 datasets[0]을 출력 하게 되면 다른게 없는데 차이점이 뭔가요?? - 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 강의 내용을 질문할 경우 몇분 몇초의 내용에 대한 것인지 반드시 기재 부탁드립니다. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
mmdetection에서 테스트 수행 관련 문의
안녕하세요 선생님항상 강의 잘 듣고 있습니다.강의목록을 보면 bccd 데이터셋에서는 test를 수행하는데 oxford pet 데이터 셋에서는 test를 수행하는 과정이 없어서요 bccd 강의에서 했던 그대로 하면 다른 데이터셋도 test와 evaluation이 가능한가요? bccd 강의를 참고하여 test와 evaluation을 수행하고 싶은데 다음과 같은 오류가 발생합니다.- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 강의 내용을 질문할 경우 몇분 몇초의 내용에 대한 것인지 반드시 기재 부탁드립니다. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.
-
해결됨[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
config 파일 수정 문의
안녕하세요 선생님선생님 강의를 통해서 custom dataset을 이용하여faster-rcnn 모델을 돌려볼 수 있었습니다.이 custom dataset으로 다른 모델(swin)도 적용해보려고 하는데요 https://github.com/open-mmlab/mmdetection/tree/master/configs/swin 이 페이지의 mask_rcnn_swin-t-p4-w7_fpn_1x_coco.py 파일을 이용해보려고 합니다. 그에 맞게 config파일과 checkpoints를 변경하고 모델을 구동하려고 하니 mask관련해 오류가 발생했습니다. 아마 mask-rcnn으로인해 발생한 오류처럼 보입니다. 구글링을 해보니 이 부분을 주석 처리해서 실행해보라고 하던데 colab에서 해당 부분을 주석처리할 수 있는 방법이 있을까요? 혹시 더 좋은 방법이 있다면 가르쳐 주시면 감사하겠습니다.2023-03-27 14:19:05,247 - mmdet - INFO - Automatic scaling of learning rate (LR) has been disabled. <ipython-input-14-f8ce61995cc8>:47: DeprecationWarning: `np.long` is a deprecated alias for `np.compat.long`. To silence this warning, use `np.compat.long` by itself. In the likely event your code does not need to work on Python 2 you can use the builtin `int` for which `np.compat.long` is itself an alias. Doing this will not modify any behaviour and is safe. When replacing `np.long`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations 'labels': np.array(gt_labels, dtype=np.long), <ipython-input-14-f8ce61995cc8>:49: DeprecationWarning: `np.long` is a deprecated alias for `np.compat.long`. To silence this warning, use `np.compat.long` by itself. In the likely event your code does not need to work on Python 2 you can use the builtin `int` for which `np.compat.long` is itself an alias. Doing this will not modify any behaviour and is safe. When replacing `np.long`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations 'label_ignore':np.array(gt_labels_ignore, dtype=np.long) 2023-03-27 14:19:08,688 - mmdet - INFO - load checkpoint from local path: checkpoints/mask_rcnn_swin-t-p4-w7_fpn_1x_coco_20210902_120937-9d6b7cfa.pth 2023-03-27 14:19:08,849 - mmdet - WARNING - The model and loaded state dict do not match exactly size mismatch for roi_head.bbox_head.fc_cls.weight: copying a param with shape torch.Size([81, 1024]) from checkpoint, the shape in current model is torch.Size([16, 1024]). size mismatch for roi_head.bbox_head.fc_cls.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([16]). size mismatch for roi_head.bbox_head.fc_reg.weight: copying a param with shape torch.Size([320, 1024]) from checkpoint, the shape in current model is torch.Size([60, 1024]). size mismatch for roi_head.bbox_head.fc_reg.bias: copying a param with shape torch.Size([320]) from checkpoint, the shape in current model is torch.Size([60]). size mismatch for roi_head.mask_head.conv_logits.weight: copying a param with shape torch.Size([80, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([15, 256, 1, 1]). size mismatch for roi_head.mask_head.conv_logits.bias: copying a param with shape torch.Size([80]) from checkpoint, the shape in current model is torch.Size([15]). 2023-03-27 14:19:08,856 - mmdet - INFO - Start running, host: root@06d3ab7dae34, work_dir: /content/gdrive/MyDrive/htp_dir_swin 2023-03-27 14:19:08,858 - mmdet - INFO - Hooks will be executed in the following order: before_run: (VERY_HIGH ) StepLrUpdaterHook (NORMAL ) CheckpointHook (LOW ) EvalHook (VERY_LOW ) TextLoggerHook -------------------- before_train_epoch: (VERY_HIGH ) StepLrUpdaterHook (NORMAL ) NumClassCheckHook (LOW ) IterTimerHook (LOW ) EvalHook (VERY_LOW ) TextLoggerHook -------------------- before_train_iter: (VERY_HIGH ) StepLrUpdaterHook (LOW ) IterTimerHook (LOW ) EvalHook -------------------- after_train_iter: (ABOVE_NORMAL) OptimizerHook (NORMAL ) CheckpointHook (LOW ) IterTimerHook (LOW ) EvalHook (VERY_LOW ) TextLoggerHook -------------------- after_train_epoch: (NORMAL ) CheckpointHook (LOW ) EvalHook (VERY_LOW ) TextLoggerHook -------------------- before_val_epoch: (NORMAL ) NumClassCheckHook (LOW ) IterTimerHook (VERY_LOW ) TextLoggerHook -------------------- before_val_iter: (LOW ) IterTimerHook -------------------- after_val_iter: (LOW ) IterTimerHook -------------------- after_val_epoch: (VERY_LOW ) TextLoggerHook -------------------- after_run: (VERY_LOW ) TextLoggerHook -------------------- 2023-03-27 14:19:08,859 - mmdet - INFO - workflow: [('train', 1)], max: 5 epochs 2023-03-27 14:19:08,860 - mmdet - INFO - Checkpoints will be saved to /content/gdrive/MyDrive/htp_dir_swin by HardDiskBackend. --------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-35-c8cc0d536607> in <module> 4 mmcv.mkdir_or_exist(os.path.abspath(cfg.work_dir)) 5 # epochs는 config의 runner 파라미터로 지정됨. 기본 12회 ----> 6 train_detector(model, datasets, cfg, distributed=False, validate=True) 6 frames/usr/local/lib/python3.9/dist-packages/mmdet-2.28.2-py3.9.egg/mmdet/apis/train.py in train_detector(model, dataset, cfg, distributed, validate, timestamp, meta) 244 elif cfg.load_from: 245 runner.load_checkpoint(cfg.load_from) --> 246 runner.run(data_loaders, cfg.workflow) /usr/local/lib/python3.9/dist-packages/mmcv/runner/epoch_based_runner.py in run(self, data_loaders, workflow, max_epochs, **kwargs) 134 if mode == 'train' and self.epoch >= self._max_epochs: 135 break --> 136 epoch_runner(data_loaders[i], **kwargs) 137 138 time.sleep(1) # wait for some hooks like loggers to finish /usr/local/lib/python3.9/dist-packages/mmcv/runner/epoch_based_runner.py in train(self, data_loader, **kwargs) 47 self.call_hook('before_train_epoch') 48 time.sleep(2) # Prevent possible deadlock during epoch transition ---> 49 for i, data_batch in enumerate(self.data_loader): 50 self.data_batch = data_batch 51 self._inner_iter = i /usr/local/lib/python3.9/dist-packages/torch/utils/data/dataloader.py in __next__(self) 626 # TODO(https://github.com/pytorch/pytorch/issues/76750) 627 self._reset() # type: ignore[call-arg] --> 628 data = self._next_data() 629 self._num_yielded += 1 630 if self._dataset_kind == _DatasetKind.Iterable and \ /usr/local/lib/python3.9/dist-packages/torch/utils/data/dataloader.py in _next_data(self) 1331 else: 1332 del self._task_info[idx] -> 1333 return self._process_data(data) 1334 1335 def _try_put_index(self): /usr/local/lib/python3.9/dist-packages/torch/utils/data/dataloader.py in _process_data(self, data) 1357 self._try_put_index() 1358 if isinstance(data, ExceptionWrapper): -> 1359 data.reraise() 1360 return data 1361 /usr/local/lib/python3.9/dist-packages/torch/_utils.py in reraise(self) 541 # instantiate since we don't know how to 542 raise RuntimeError(msg) from None --> 543 raise exception 544 545 KeyError: Caught KeyError in DataLoader worker process 0. Original Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop data = fetcher.fetch(index) File "/usr/local/lib/python3.9/dist-packages/torch/utils/data/_utils/fetch.py", line 58, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/usr/local/lib/python3.9/dist-packages/torch/utils/data/_utils/fetch.py", line 58, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "/usr/local/lib/python3.9/dist-packages/mmdet-2.28.2-py3.9.egg/mmdet/datasets/custom.py", line 220, in __getitem__ data = self.prepare_train_img(idx) File "/usr/local/lib/python3.9/dist-packages/mmdet-2.28.2-py3.9.egg/mmdet/datasets/custom.py", line 243, in prepare_train_img return self.pipeline(results) File "/usr/local/lib/python3.9/dist-packages/mmdet-2.28.2-py3.9.egg/mmdet/datasets/pipelines/compose.py", line 41, in __call__ data = t(data) File "/usr/local/lib/python3.9/dist-packages/mmdet-2.28.2-py3.9.egg/mmdet/datasets/pipelines/loading.py", line 398, in __call__ results = self._load_masks(results) File "/usr/local/lib/python3.9/dist-packages/mmdet-2.28.2-py3.9.egg/mmdet/datasets/pipelines/loading.py", line 347, in _load_masks gt_masks = results['ann_info']['masks'] KeyError: 'masks'
-
해결됨최신 딥러닝 기술과 객체인식
YOLOv4 Receptive field관련 질문
안녕하세요 Receptive field관련 강의를 듣는 중 궁금한게 생겨 질문드립니다.제가 이해한 Receptive field는 출력 레이어의 노드 하나에 영향을 미치는 입력 노드의 크기로 layer를 깊게 쌓아서 최대로 가질 수 있는 크기는 입력 크기로 이해를 했습니다.하지만 다음의 결과에서는 입력 크기보다 더 큰 Receptive field size를 가지는데 이게 가능한 것인가요?감사합니다.
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
안녕하세요 선생님 질문입니다!
선생님 제가 가지고 있는 이미지를 가지고 모듈을 활용해 보려고 하는데 error: OpenCV(4.7.0) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'이러한 오류가 뜹니다. 스택오버플로우나 다른 곳을 찾아봐도 잘 안나오는데 이유가 뭔지 알려주실 수 있으신가요?
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
Segmentation
안녕하세요, 선생님.pretrained 모델을 기반으로 해서 segmentation하는 custom 모델을 만드려고합니다.관련 코드가 섹션 15 Mask RCNN에 opencv_mask_rcnn_infrence인 것 같아 참고하고 있는데요.그래서 먼저 CVAT 툴을 이용하여 train, val job을 각각 만들고 폴리곤으로 이미지에 손상 영역을 그려주었습니다.이후, Export job dataset - coco 1.0 포맷으로 내보냈는데coco 1.0과 coco kepoints 1.0의 포맷 차이가 궁금합니다. 그리고 어떤 포맷으로 내보내는게 정답인지도 궁금합니다. 또, 그리고 나서 labels_to_names_seq= {0:'gap'} 로 클래스명을 수정 매핑해주고다른 코드는 수정하지 않고 돌리는데 오류가 떠서 무슨 문제인지 몰라 여쭤봅니다. 추가적으로 전혀 다른 분야의 새로운 이미지를 라벨링해서 쓸 때 어떠한 부분을 수정하여야 하고 유의해서 써야하는 지 답변해주실 수 있으실까요..부탁드립니다!
-
미해결[라즈베리파이] IoT 딥러닝 Computer Vision 실전 프로젝트
64bit picamera 관련 질문
OS를 64bit로 설치하고 tensorflow까지 설치를 했는데 picamera가 안깔립니다.32bit에만 설치된다고 인터넷에서 봤는데, 어떻게 해결할 수 있을까요?
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
setuptools 버전 오류
pip install -r yolov3/requirements.txt모듈 설치중에"ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. cvxpy 1.3.0 requires setuptools<=64.0.2, but you have setuptools 67.6.0 which is incompatible."setuptools 버전 오류가 뜨면서 모듈 설치가 원활하게 진행되지 않습니다.어떤 방법으로 해결해야 할까요?모든 코드Cloning into 'yolov3'... remote: Enumerating objects: 10324, done. remote: Counting objects: 100% (246/246), done. remote: Compressing objects: 100% (193/193), done. remote: Total 10324 (delta 110), reused 148 (delta 52), pack-reused 10078 Receiving objects: 100% (10324/10324), 9.70 MiB | 12.12 MiB/s, done. Resolving deltas: 100% (6909/6909), done. Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/ Collecting gitpython Downloading GitPython-3.1.31-py3-none-any.whl (184 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 184.3/184.3 KB 10.1 MB/s eta 0:00:00 Requirement already satisfied: ipython in /usr/local/lib/python3.9/dist-packages (from -r yolov3/requirements.txt (line 6)) (7.9.0) Requirement already satisfied: matplotlib>=3.2.2 in /usr/local/lib/python3.9/dist-packages (from -r yolov3/requirements.txt (line 7)) (3.7.1) Requirement already satisfied: numpy>=1.18.5 in /usr/local/lib/python3.9/dist-packages (from -r yolov3/requirements.txt (line 8)) (1.22.4) Requirement already satisfied: opencv-python>=4.1.1 in /usr/local/lib/python3.9/dist-packages (from -r yolov3/requirements.txt (line 9)) (4.7.0.72) Requirement already satisfied: Pillow>=7.1.2 in /usr/local/lib/python3.9/dist-packages (from -r yolov3/requirements.txt (line 10)) (8.4.0) Requirement already satisfied: psutil in /usr/local/lib/python3.9/dist-packages (from -r yolov3/requirements.txt (line 11)) (5.9.4) Requirement already satisfied: PyYAML>=5.3.1 in /usr/local/lib/python3.9/dist-packages (from -r yolov3/requirements.txt (line 12)) (6.0) Requirement already satisfied: requests>=2.23.0 in /usr/local/lib/python3.9/dist-packages (from -r yolov3/requirements.txt (line 13)) (2.27.1) Requirement already satisfied: scipy>=1.4.1 in /usr/local/lib/python3.9/dist-packages (from -r yolov3/requirements.txt (line 14)) (1.10.1) Collecting thop>=0.1.1 Downloading thop-0.1.1.post2209072238-py3-none-any.whl (15 kB) Requirement already satisfied: torch>=1.7.0 in /usr/local/lib/python3.9/dist-packages (from -r yolov3/requirements.txt (line 16)) (1.13.1+cu116) Requirement already satisfied: torchvision>=0.8.1 in /usr/local/lib/python3.9/dist-packages (from -r yolov3/requirements.txt (line 17)) (0.14.1+cu116) Requirement already satisfied: tqdm>=4.64.0 in /usr/local/lib/python3.9/dist-packages (from -r yolov3/requirements.txt (line 18)) (4.65.0) Requirement already satisfied: tensorboard>=2.4.1 in /usr/local/lib/python3.9/dist-packages (from -r yolov3/requirements.txt (line 22)) (2.11.2) Requirement already satisfied: pandas>=1.1.4 in /usr/local/lib/python3.9/dist-packages (from -r yolov3/requirements.txt (line 27)) (1.4.4) Requirement already satisfied: seaborn>=0.11.0 in /usr/local/lib/python3.9/dist-packages (from -r yolov3/requirements.txt (line 28)) (0.12.2) Collecting setuptools>=65.5.1 Downloading setuptools-67.6.0-py3-none-any.whl (1.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 55.5 MB/s eta 0:00:00 Requirement already satisfied: wheel>=0.38.0 in /usr/local/lib/python3.9/dist-packages (from -r yolov3/requirements.txt (line 43)) (0.40.0) Collecting gitdb<5,>=4.0.1 Downloading gitdb-4.0.10-py3-none-any.whl (62 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.7/62.7 KB 7.6 MB/s eta 0:00:00 Requirement already satisfied: decorator in /usr/local/lib/python3.9/dist-packages (from ipython->-r yolov3/requirements.txt (line 6)) (4.4.2) Requirement already satisfied: pygments in /usr/local/lib/python3.9/dist-packages (from ipython->-r yolov3/requirements.txt (line 6)) (2.6.1) Requirement already satisfied: pickleshare in /usr/local/lib/python3.9/dist-packages (from ipython->-r yolov3/requirements.txt (line 6)) (0.7.5) Requirement already satisfied: traitlets>=4.2 in /usr/local/lib/python3.9/dist-packages (from ipython->-r yolov3/requirements.txt (line 6)) (5.7.1) Requirement already satisfied: prompt-toolkit<2.1.0,>=2.0.0 in /usr/local/lib/python3.9/dist-packages (from ipython->-r yolov3/requirements.txt (line 6)) (2.0.10) Requirement already satisfied: pexpect in /usr/local/lib/python3.9/dist-packages (from ipython->-r yolov3/requirements.txt (line 6)) (4.8.0) Collecting jedi>=0.10 Downloading jedi-0.18.2-py2.py3-none-any.whl (1.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 64.3 MB/s eta 0:00:00 Requirement already satisfied: backcall in /usr/local/lib/python3.9/dist-packages (from ipython->-r yolov3/requirements.txt (line 6)) (0.2.0) Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.9/dist-packages (from matplotlib>=3.2.2->-r yolov3/requirements.txt (line 7)) (1.4.4) Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.9/dist-packages (from matplotlib>=3.2.2->-r yolov3/requirements.txt (line 7)) (23.0) Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.9/dist-packages (from matplotlib>=3.2.2->-r yolov3/requirements.txt (line 7)) (3.0.9) Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.9/dist-packages (from matplotlib>=3.2.2->-r yolov3/requirements.txt (line 7)) (1.0.7) Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.9/dist-packages (from matplotlib>=3.2.2->-r yolov3/requirements.txt (line 7)) (4.39.0) Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.9/dist-packages (from matplotlib>=3.2.2->-r yolov3/requirements.txt (line 7)) (2.8.2) Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.9/dist-packages (from matplotlib>=3.2.2->-r yolov3/requirements.txt (line 7)) (0.11.0) Requirement already satisfied: importlib-resources>=3.2.0 in /usr/local/lib/python3.9/dist-packages (from matplotlib>=3.2.2->-r yolov3/requirements.txt (line 7)) (5.12.0) Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.9/dist-packages (from requests>=2.23.0->-r yolov3/requirements.txt (line 13)) (2.0.12) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.9/dist-packages (from requests>=2.23.0->-r yolov3/requirements.txt (line 13)) (2022.12.7) Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.9/dist-packages (from requests>=2.23.0->-r yolov3/requirements.txt (line 13)) (1.26.15) Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.9/dist-packages (from requests>=2.23.0->-r yolov3/requirements.txt (line 13)) (3.4) Requirement already satisfied: typing-extensions in /usr/local/lib/python3.9/dist-packages (from torch>=1.7.0->-r yolov3/requirements.txt (line 16)) (4.5.0) Requirement already satisfied: google-auth<3,>=1.6.3 in /usr/local/lib/python3.9/dist-packages (from tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (2.16.2) Requirement already satisfied: protobuf<4,>=3.9.2 in /usr/local/lib/python3.9/dist-packages (from tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (3.19.6) Requirement already satisfied: absl-py>=0.4 in /usr/local/lib/python3.9/dist-packages (from tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (1.4.0) Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /usr/local/lib/python3.9/dist-packages (from tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (0.4.6) Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /usr/local/lib/python3.9/dist-packages (from tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (0.6.1) Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /usr/local/lib/python3.9/dist-packages (from tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (1.8.1) Requirement already satisfied: werkzeug>=1.0.1 in /usr/local/lib/python3.9/dist-packages (from tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (2.2.3) Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.9/dist-packages (from tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (3.4.1) Requirement already satisfied: grpcio>=1.24.3 in /usr/local/lib/python3.9/dist-packages (from tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (1.51.3) Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.9/dist-packages (from pandas>=1.1.4->-r yolov3/requirements.txt (line 27)) (2022.7.1) Collecting smmap<6,>=3.0.1 Downloading smmap-5.0.0-py3-none-any.whl (24 kB) Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.9/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (5.3.0) Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.9/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (0.2.8) Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python3.9/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (1.15.0) Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.9/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (4.9) Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.9/dist-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (1.3.1) Requirement already satisfied: zipp>=3.1.0 in /usr/local/lib/python3.9/dist-packages (from importlib-resources>=3.2.0->matplotlib>=3.2.2->-r yolov3/requirements.txt (line 7)) (3.15.0) Requirement already satisfied: parso<0.9.0,>=0.8.0 in /usr/local/lib/python3.9/dist-packages (from jedi>=0.10->ipython->-r yolov3/requirements.txt (line 6)) (0.8.3) Requirement already satisfied: importlib-metadata>=4.4 in /usr/local/lib/python3.9/dist-packages (from markdown>=2.6.8->tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (6.0.0) Requirement already satisfied: wcwidth in /usr/local/lib/python3.9/dist-packages (from prompt-toolkit<2.1.0,>=2.0.0->ipython->-r yolov3/requirements.txt (line 6)) (0.2.6) Requirement already satisfied: MarkupSafe>=2.1.1 in /usr/local/lib/python3.9/dist-packages (from werkzeug>=1.0.1->tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (2.1.2) Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.9/dist-packages (from pexpect->ipython->-r yolov3/requirements.txt (line 6)) (0.7.0) Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /usr/local/lib/python3.9/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (0.4.8) Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.9/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard>=2.4.1->-r yolov3/requirements.txt (line 22)) (3.2.2) Installing collected packages: smmap, setuptools, jedi, thop, gitdb, gitpython Attempting uninstall: setuptools Found existing installation: setuptools 63.4.3 Uninstalling setuptools-63.4.3: Successfully uninstalled setuptools-63.4.3 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. cvxpy 1.3.0 requires setuptools<=64.0.2, but you have setuptools 67.6.0 which is incompatible. Successfully installed gitdb-4.0.10 gitpython-3.1.31 jedi-0.18.2 setuptools-67.6.0 smmap-5.0.0 thop-0.1.1.post2209072238