묻고 답해요
131만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨[입문자를 위한] 캐글로 시작하는 머신러닝 • 딥러닝 분석
[해결] 시계열 차수 추정하기 코드 에러 수정
from statsmodels.graphics.tsaplots import plot_pacf plot_pacf(pacf, lags=20, method='ols', title='pa').showValueError: Can only compute partial correlations for lags up to 50% of the sample size. The requested nlags 20 must be < 10.이런 에러가 떠서 좀 헤맸네요. 결론적으로 선생님 코드from statsmodels.tsa.stattools import pacfpacf = pacf(df['cnt'], nlags=20, method='ols')print(pacf)from statsmodels.graphics.tsaplots import plot_pacfplot_pacf(pacf, lags=20, method='ols', title='pa').show는from statsmodels.tsa.stattools import pacfpacf_values = pacf(df['cnt'], nlags=20, method='ols')print(pacf_values)from statsmodels.graphics.tsaplots import plot_pacfplot_pacf(df['cnt'], lags=20, method='ols', title='pa').show 로 바꿔주시면 에러 없이 차트 표출이 됩니다.
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
Opencv DNN을 이용한 Inference 수행 절차 시 Faster-RCNN 적용 시점
안녕하세요, OpenCV의 DNN을 이용한 Object Detection 구현 개요 및 관련 실습에서 질문이 있습니다. cv2.dnn.readNetFromTensorflow 라이브러리에서 Faster-RCNN ResNet-50 가중치 모델 파일과 환경 설정 파일을 통해 inference 네트웍 모델을 생성한다고 설명해주셨습니다. 또한, cvNet.forward()를 통해 생성한 inference 네트웍 모델에서 output을 추출, 그리고 추출한 output에서 detect 정보를 시각화 합니다. 제 질문은, Pretrained된 가중치 모델 파일은 구체적으로 무엇이며, 또한 Faster-RCNN 수업에서 설명해주신 RPN은 언제 수행하는지 궁금합니다. 제가 이해하지 못하는 부분은 다음과 같습니다.제가 이해하기로는, cvNet.forward를 통해 inference 네트웍에서 output을 추출하여, 추출한 output으로 부터 object detect를 할 수 있는데, 이때 object detect를 할 때 사용되는 알고리즘이 Faster-RCNN이라고 이해하였습니다. 그러나, Pretrained된 가중치 모델 파일은 Faster-RCNN, MobileNet, Mask-RCNN 등의 모델을 지원합니다. 가중치 모델 파일은 pretrained 된 것으로서, 이미 coco 데이터 세트 (80개의 object) 를 모두 학습해 놓은 모델이며, 즉 coco 데이터 세트를 학습할 때 Faster-RCNN 알고리즘으로 수행된 모델이라고 이해하면 될까요? 즉, Pretrained된 가중치 모델 파일이 Faster-RCNN을 지원한다는 것이 어떤 의미를 가지는지 궁금합니다.해당 pretrained된 가중치 모델 파일과 환경 설정을 통해 생성한 inference 네트웍을 통해 object detection 수행 시에 RPN을 기반으로 객체 탐지를 하는 것인지 궁금합니다. 감사합니다.
-
해결됨[입문자를 위한] 캐글로 시작하는 머신러닝 • 딥러닝 분석
[해결] 그래프를 통한 기초 데이터 분석 "ValueError: `orient` must start with 'v' or 'h' or be None, but `'V'` was passed."
def plot_bar(data, feature): fig = plt.figure(figsize=(12,3)) sns.barplot(x=feature, y='cnt', data=data, palette='Set3', orient='V') plot_bar(df, 'hour')선생님이 작성하신대로 치면ValueError: orient must start with 'v' or 'h' or be None, but 'V' was passed. 가 나옵니다. def plot_bar(data, feature): fig = plt.figure(figsize=(12,3)) sns.barplot(x=feature, y='cnt', data=data, palette='Set3', orient='v')로 소문자 v로 orient를 잡아야 정상적으로 표가 표출됩니다.
-
해결됨[입문자를 위한] 캐글로 시작하는 머신러닝 • 딥러닝 분석
[해결] 그래프를 통한 기초 데이터 분석 boxplot 에러 코드 수정
a, b = plt.subplots(1,1, figsize=(10, 5))sns.boxplot(df['year'], df['cnt'])을 작성시 TypeError: boxplot() takes from 0 to 1 positional arguments but 2 were given 이라고 나오네요. sns.boxplot(x=df['year'], y=df['cnt'])으로 해야 강의영상 그래프처럼 표시가 됩니다.
-
미해결핵심만 빠르게, 입문자를 위한 딥러닝(Deep Learning)과 텐서플로(TensorFlow)
다중분류, 소프트맥스 회귀 코드 실습 부분 질문 있습니다.
마지막 부분 새로운 데이터를 통한 label 예측 결과가 선생님과 다르게 나오는데 괜찮은건가요?그리고 학습 시키면 로스값이 점점 주는게 아니라 들쑥날쑥하고, 학습을 새로 시킬때마다 마지막 부분의 예측결과가 다르게 나옵니다.
-
미해결Google 공인! 텐서플로(TensorFlow) 개발자 자격증 취득
슬랙가입신청서
miele72@gmail.com 으로 보내주세요
-
미해결차량 번호판 인식 프로젝트와 TensorFlow로 배우는 딥러닝 영상인식 올인원
Object Detection (fasterrcnn) 공지해주신 소스의 오류 수정 부탁드립니다.
안녕하세요일전에 공지해주신 아래 파일에서 에러가 나는데 수정 좀 부탁 드립니다.1강_TF2_Detection_Model_ZOO_example_fasterrcnn_pedestrian_dataset_2022_11_11.ipynbhttps://colab.research.google.com/drive/1LIMGUFJtCWw3gdgWh3T2aorR4AwogyPS?usp=sharing 죄송합니만 개인 사정상 다소 급하오니 선처 부탁드립니다!
-
해결됨혼자 공부하는 머신러닝+딥러닝
왜 k 근접 회귀는 전처리를 안하나요
x축 y축 scale이 다르지 않나요?
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
MMDtection 관련 에러
안녕하세요 .교수님 제가 지금 faster rcnn를 코랩 환경 말고 vscode로 구현할려고 합니다. 그런데 강의 대로 하고 있는데 mmdet의 모듈이 불러오지를 못합니다. 파이썬 버전을 3.8에서 3.10해보고 torch랑 환경을 강의대로 했는데 에러가 뜹니다. vscode로는 작동이 안 되는 이유를 알고 싶고, 어떻게 해야 하는지를 알고 싶습니다.
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
이미지 레이블링 질문 있습니다.
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 강의 내용을 질문할 경우 몇분 몇초의 내용에 대한 것인지 반드시 기재 부탁드립니다. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요. 강의 잘 듣고 있습니다!라벨링 부터 시작하고 있는 학생입니다.라벨링을 진행중에 문득 어떻게 해야되는지 몰라서 질문을 남기게 됐습니다.라벨링 진행시 중복 이미지는 삭제 하는게 좋다고 알고 있습니다.혹시 아래와 사진과 같은 경우가 발생할 때는 어떻게 하는게 좋을까요?첫 번째 줄 사진은 먼저 모든 물체에 라벨링을 진행. 이후에 사진에서 달라진 부재만 라벨링 진행.두 번째 줄 사진은 먼저 모든 물체에 라벨링 진행, 이후에 달라진 부분과 이전에 진행한 물체에 라벨링을 똑같이 진행.답변 부탁드립니다!!
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
코랩 세션이 다운되었습니다
안녕하세요, 강사님.몇 가지 질문이 있어 조심스레 여쭤봅니다.1.mm_mask_rcnn_train_balloon를 커스텀 데이터 세트로 돌리고 있는데아래 코드에서 validate=False로 설정하면 문제가 없이 작동하는데True로 하면 36에포크로 설정을 해줬는데 12에포크까지만 돌고 검증이돼서 결과값이 나오고 세션이 종료됩니다어떤 문제를 해결해줘야할까요,,?# epochs는 config의 runner 파라미터로 지정됨. 기본 12회 train_detector(model, datasets, cfg, distributed=False, validate=True) 강의에서 제공되는 코드는 test set이 아닌 validation set으로 성능 검증을 하는 건가요? 아래 나오는 AP와 AR 값 말고 각 클래스 별로 precision 과 recall값도 확인할 수 있나요?
-
미해결처음하는 딥러닝과 파이토치(Pytorch) 부트캠프 [데이터과학 Part3]
nn.Parameter
class로 모델 만드는 설명 해주실 때, linear layer 예제 알려주실 때, 파라미터로 등록하려면 nn.Parameter()로 감싸주라고 하셨는데요, 이후의 코드들을 보면 따로 감싸주는 모습이 안보여서요.파라미터로 등록할 때 명시적으로 필요 없는 경우가 있는 건지요? 감사합니다.
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
mmcv 설치 오류? 문의
안녕하세요. 계속해서 jupyter를 통해 mmdetection을 설치하려고 하는데 error가 발생하여 문의드립니다.버전은 2.x로 다운그레이드하여 설치후 진행 중입니다. [1] 현재 torch version은 1.12.0, cuda version은 113으로 torch 버전을 변경하여 사용하려고 합니다. 아래 링크로 들어가면 설치가 가능한 걸로 이해를 했습니다. https://download.openmmlab.com/mmcv/dist/cu113/torch1.12.0/index.html따라서 명령어 : python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.12.0/index.html를 실행하여 진행하는데 위의 검정 화면과 같은 에러가 뜹니다. 파이썬이 여러 버전 설치되어 있을 경우의 해결책을 사용하여 명령어를 입력하였는데도 오류가 뜹니다. [2] jupyter에서 코드 실행시 ModuleNotFoundError: No module named 'mmcv._ext' 오류가 납니다.버전이 안 맞아서 생기는 오류 같은데, [1]이 근본적으로 설치가 안되어서 그러는건지, 아니면 다른 이슈인지 모르겠습니다. 감사합니다.
-
미해결딥러닝 CNN 완벽 가이드 - Fundamental 편
안녕하세요 교수님. fit()과 모델 생성할때 input 질문있습니다.
안녕하세요 교수님. model을 생성할때는 입력값을 만약 2차원 gray scale (크기 = 28 28)이 들어왔다면 tensor값을 받아야하니 이것을 3차원(1 28 * 28)으로 받는것을 이해했습니다.만약 RGB 이미지라면 (크기 : 28 28 3 )이 값을 그대로 받는건가요?? channel값은 임의의로 정했습니다.그렇다면 fit()함수는 x값과 y값은 numpy로 받는데 이 값을 numpy에서 tensor값으로 변경시켜주지않고 받는것일까요?? 궁금합니다
-
미해결예제로 배우는 딥러닝 자연어 처리 입문 NLP with TensorFlow - RNN부터 BERT까지
N-gram_example
colab에서 from nltk.lm.preprocessing import pad_both_ends from nltk.lm.preprocessing import flatten 이 두개가 import가 되지 않는데 해결방법이 있을까요?ImportError: cannot import name 'Sequence' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
-
미해결딥러닝 CNN 완벽 가이드 - Fundamental 편
선생님, 강의자료 ppt는 어디서 받나요?
선생님, 강의자료 ppt 얻을 수 있나요?감사합니다.
-
미해결차량 번호판 인식 프로젝트와 TensorFlow로 배우는 딥러닝 영상인식 올인원
craft와 crnn의 사이 연결관계에 대해서
craft에서 여러글자를 하나의 단어로 인식하는것이 맞는 것인가요 번호판 커스텀 데이터를 보면 bbox 와 하나의 라벨링이 있는데 해당 라벨링에 여러 단어가 들어가있습니다. 그래서 추측하기에 원래 기본적으로 하나의 단에 하나의 bbox가 있는것인데 이번 강의에서 여러 단어를 하나의 단어로 인식하는 방식이 맞는 것인지 궁금합니다. 아니면 라벨링은 무시하는 데이터 입니까?아니면 craft가 문자 인식에 탁월한 detection model이지만, 이를 글자가 아니라 애초에 번호판 박스를 인식하는데에 쓰는 것인가요?그리고 해당 bbox를 통해 전체 이미지중 해당 되는 img를 잘라서 crnn이 받아서 글자를 recognize 하는 것이 맞는것 인지 궁금합니다
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
CityscapeDataset으로 변경 시 오류
선생님 안녕하세요 저는 현재 cityscape dataset을 바탕으로 kaggle mask_rcnn_nucleus 코드를 활용하여 segmentation을 해보려고 하고 있습니다.차량으로 활영한 스트릿뷰에서 나무와 도로를 분리해내어 온도 차이를 보고자 해당 작업을 진행 중인데요,이에 cityscape에 맞는 config 파일과 pretrained model, Cityscapedataset을 활용하려고 하고 있는데, 기존 Nucleusdataset을 Cityscapedataset으로 대체해서 코드를 돌리니 config와 계속 충돌이 있어 train을 할수가 없어 어느 부분을 수정해야할지 모르겠어서 질문드립니다.활용한 config, checkpoint 파일# config_file (/content/mmdetection/configs/cityscapes/mask_rcnn_r50_fpn_1x_cityscapes.py 활용) mask_rcnn_r50_fpn_1x_cityscapes.py # checkpoint_file (cityscape웹에서 다운로드) mask_rcnn_r50_fpn_1x_cityscapes_20201211_133733-d2858245.pth https://download.openmmlab.com/mmdetection/v2.0/cityscapes/mask_rcnn_r50_fpn_1x_cityscapes/mask_rcnn_r50_fpn_1x_cityscapes_20201211_133733-d2858245.pth1차 수정한 dataset 코드# 기존 dataset 코드 from mmdet.datasets.builder import DATASETS from mmdet.datasets.coco import CocoDataset @DATASETS.register_module(force=True) class NucleusDataset(CocoDataset): CLASSES = ['nucleus'] # 변경한 dataset 코드 # Copyright (c) OpenMMLab. All rights reserved. # Modified from https://github.com/facebookresearch/detectron2/blob/master/detectron2/data/datasets/cityscapes.py # noqa # and https://github.com/mcordts/cityscapesScripts/blob/master/cityscapesscripts/evaluation/evalInstanceLevelSemanticLabeling.py # noqa from mmdet.datasets.builder import DATASETS from mmdet.datasets.coco import CocoDataset from typing import List @DATASETS.register_module() class Cityscape_Dataset_2(CocoDataset): """Dataset for Cityscapes.""" METAINFO = { 'classes': ('road', 'vegetation', 'sidewalk', 'car', 'building', 'person', 'sky', 'bicycle'), 'palette': [(128,64,128), (107,142,35), (152,251,152), (0,0,142), (70,70,70), (255,0,0), (70,130,180), (119,11,32)] } def filter_data(self) -> List[dict]: """Filter annotations according to filter_cfg. Returns: List[dict]: Filtered results. """ if self.test_mode: return self.data_list if self.filter_cfg is None: return self.data_list filter_empty_gt = self.filter_cfg.get('filter_empty_gt', False) min_size = self.filter_cfg.get('min_size', 0) # obtain images that contain annotation ids_with_ann = set(data_info['img_id'] for data_info in self.data_list) # obtain images that contain annotations of the required categories ids_in_cat = set() for i, class_id in enumerate(self.cat_ids): ids_in_cat |= set(self.cat_img_map[class_id]) # merge the image id sets of the two conditions and use the merged set # to filter out images if self.filter_empty_gt=True ids_in_cat &= ids_with_ann valid_data_infos = [] for i, data_info in enumerate(self.data_list): img_id = data_info['img_id'] width = data_info['width'] height = data_info['height'] all_is_crowd = all([ instance['ignore_flag'] == 1 for instance in data_info['instances'] ]) if filter_empty_gt and (img_id not in ids_in_cat or all_is_crowd): continue if min(width, height) >= min_size: valid_data_infos.append(data_info) return valid_data_infos1차 수정한 코드로 시도한 train 시 오류from mmdet.datasets import build_dataset from mmdet.models import build_detector from mmdet.apis import train_detector # train, valid 용 Dataset 생성. datasets_train = [build_dataset(cfg.data.train)] datasets_val = [build_dataset(cfg.data.val)] --------- TypeError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/mmcv/utils/registry.py in build_from_cfg(cfg, registry, default_args) 68 try: ---> 69 return obj_cls(**args) 70 except Exception as e: TypeError: CustomDataset.__init__() got an unexpected keyword argument 'times' During handling of the above exception, another exception occurred: TypeError Traceback (most recent call last) 2 frames /usr/local/lib/python3.10/dist-packages/mmcv/utils/registry.py in build_from_cfg(cfg, registry, default_args) 70 except Exception as e: 71 # Normal TypeError does not print class name. ---> 72 raise type(e)(f'{obj_cls.__name__}: {e}') 73 74 TypeError: Cityscape_Dataset_2: CustomDataset.__init__() got an unexpected keyword argument 'times'2차 수정한 코드 (chatGPT의 도움)도 또 다른 오류 뜸@DATASETS.register_module() class Cityscape_Dataset_times(CocoDataset): """Dataset for Cityscapes.""" METAINFO = { 'classes': ('road', 'vegetation', 'sidewalk', 'car', 'building', 'person', 'sky', 'bicycle'), 'palette': [(128,64,128), (107,142,35), (152,251,152), (0,0,142), (70,70,70), (255,0,0), (70,130,180), (119,11,32)] } def __init__(self, *args, times=1, **kwargs): self.times = times super().__init__(*args, **kwargs) def __getitem__(self, idx): # Get the real index by considering the 'times' argument. idx = idx % len(self.data_list) return super().__getitem__(idx) def __len__(self): # The length is the original length times the 'times' argument. return len(self.data_list) * self.times ..이하 동일from mmdet.datasets import build_dataset from mmdet.models import build_detector from mmdet.apis import train_detector # train, valid 용 Dataset 생성. datasets_train = [build_dataset(cfg.data.train)] datasets_val = [build_dataset(cfg.data.val)] --------- TypeError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/mmcv/utils/registry.py in build_from_cfg(cfg, registry, default_args) 68 try: ---> 69 return obj_cls(**args) 70 except Exception as e: 3 frames TypeError: CustomDataset.__init__() got an unexpected keyword argument 'dataset' During handling of the above exception, another exception occurred: TypeError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/mmcv/utils/registry.py in build_from_cfg(cfg, registry, default_args) 70 except Exception as e: 71 # Normal TypeError does not print class name. ---> 72 raise type(e)(f'{obj_cls.__name__}: {e}') 73 74 TypeError: Cityscape_Dataset_times: CustomDataset.__init__() got an unexpected keyword argument 'dataset'dataset 코드 자체를 전반적으로 수정해야하는 걸까요 아니면 config 파일을 수정해야하는 건지 알 수 있을까요?아니면 cocodataset의 class를 'road'와 'vegetation'으로 두는 방식으로 가능할까요? (cocodataset에는 도로나 나무를 분류하는 카테고리가 딱히 없어 보여서 가능한지 모르겠어서 cityscapedataset 코드를 따로 들고 온거긴 합니다.)졸업이 달려 있는 과제이다보니 마음이 급해지는데 너무 막막해서 도움을 청합니다. 감사합니다.
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
mask_rcnn활용, 데이터 coco 포맷 변환 오류
선생님 안녕하세요 저는 현재 cityscape dataset을 바탕으로 kaggle mask_rcnn_nucleus 코드를 활용하여 segmentation을 해보려고 하고 있습니다.그에 따라 cityscape 데이터를 nulceus 데이터와 동일한 구조의 디렉토리로 정리하였는데요,이를 coco 포맷으로 변환하려고 하니, 아래 오류가 떠서 문의드립니다.파일 경로는 모두 맞게 입력한 것 같은데, 이미지를 못 읽고 있는 것 같습니다.. 'convert_nucleus_to_coco' 함수를 수정하거나 하지 않았는데 왜 이미지를 못읽는 걸까요?(파일 경로)(오류 메세지)convert_nucleus_to_coco('/content/drive/MyDrive/vision/DLCV_New-main/kaggle/train_data_jskim/03_masks/aachen', train_ids, '/content/drive/MyDrive/vision/DLCV_New-main/kaggle/train_data_jskim/coco_output/train_coco.json') convert_nucleus_to_coco('/content/drive/MyDrive/vision/DLCV_New-main/kaggle/train_data_jskim/03_masks/aachen', val_ids, '/content/drive/MyDrive/vision/DLCV_New-main/kaggle/train_data_jskim/coco_output/val_coco.json') _____아래 오류 메세지_____ /content/drive/MyDrive/vision/DLCV_New-main/kaggle/train_data_jskim/03_masks/aachen/aachen_000033_000019_gtFine_color/image/aachen_000033_000019_gtFine_color.png --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-63-d95f91ecbcb7> in <cell line: 1>() ----> 1 convert_nucleus_to_coco('/content/drive/MyDrive/vision/DLCV_New-main/kaggle/train_data_jskim/03_masks/aachen', train_ids, '/content/drive/MyDrive/vision/DLCV_New-main/kaggle/train_data_jskim/coco_output/train_coco.json') 2 convert_nucleus_to_coco('/content/drive/MyDrive/vision/DLCV_New-main/kaggle/train_data_jskim/03_masks/aachen', val_ids, '/content/drive/MyDrive/vision/DLCV_New-main/kaggle/train_data_jskim/coco_output/val_coco.json') <ipython-input-61-6f0ad3172ae3> in convert_nucleus_to_coco(data_root_dir, image_ids, out_file) 15 16 print(image_path) ---> 17 height, width = cv2.imread(image_path).shape[0:2] 18 # 개별 image의 dict 정보 생성 19 image_info = dict(file_name=file_name, AttributeError: 'NoneType' object has no attribute 'shape'
-
미해결딥러닝 CNN 완벽 가이드 - Fundamental 편
Graph execution error: 에러
선생님 안녕하세요. 다른 데이터셋으로 alexnet 모델훈련 후 test데이터 셋으로 성능 평가 중 해당에러가 발생하는데 버전문제일까요? 캐글노트북에서 진행하고 있습니다.UnknownError: Graph execution error: