일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- vscode
- 백신후원
- docker
- numpy
- 프로그래머스
- AIFFEL
- logistic regression
- Decision Boundary
- GIT
- HookNet
- 티스토리챌린지
- Jupyter notebook
- 기초확률론
- cocre
- airflow
- 사회조사분석사2급
- WSSS
- IVI
- 코크리
- ssh
- aiffel exploration
- Pull Request
- 히비스서커스
- docker exec
- CellPin
- docker attach
- cs231n
- Multi-Resolution Networks for Semantic Segmentation in Whole Slide Images
- 오블완
- 도커
- Today
- Total
목록분류 전체보기 (188)
히비스서커스의 블로그
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/xqTho/btrp00Cc7XE/6fsqEXpQNASFvhId0y8Ep0/img.png)
상황 메서드 오버라이딩 중 다음과 같은 에러가 발생하였다. 대략적인 코드 class Test: def __init__(self, base): self.base = base def add(self): self.base_100 = self.base + 100 self.base_200 = self.base + 200 return self.base_100, self.base_200 def mul(self): raise NotImplementedError class Test1(Test): def __init__(self, base): super(Test, self).__init__( base = base ) def mul(self): self.base_mul = self.add[0] * self.add[1] re..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cRc9TO/btrpJRc8cOT/lJKmrR1IjK5fEwbI6pw6W0/img.png)
상황 np.where 후 cv2.findContours을 해주었더니 에러가 발생하였다. 대략적인 코드 import numpy as np import cv2 mask = np.zeros((300,300)) pts1 = [np.array([(100, 200), (100, 200), (200, 200), (200, 100)], dtype=np.int32)] cv2.drawContours(mask, pts1, -1, 2.5, 10) cv2.findContours(mask, ,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_NONE) 에러메시지 error: OpenCV(4.5.4) /tmp/pip-req-build-sokf1_ny/opencv/modules/imgproc/src/contours.cp..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/dFAMwD/btrptz4Tld6/87tKLtscASIsRIOUTHD59K/img.jpg)
상황 torch로 segmentation model을 돌리는 상황에서 발생하였다. 대략적인 코드 # import unet from seg_model.py from seg_model import unet import torch # output 3 classes model = unet(class=3) # loss 4 classes weights = torch.tensor([1.2, 2.6, 7.5, 17.0], dtype=torch.float32) loss = torch.nn.CrossEntropyLoss(weight=weights) 에러메시지 RuntimeError: only batches of spatial targets supported (3D tensors) but got targets of size..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/dysQJV/btroZEyLLXE/Mqfd892eiTL9Rt5ga07Sdk/img.png)
10월 7일 백신 후원을 한 후 한동안 후원을 잊고 살다가 연말이자 성탄절 다음날인 오늘 백신 후원을 하였습니다. 요즘 저축과 절약하기 위해 좀 더 불편한 삶을 살아가고 있는데요, 결국에 제가 목표하는 큰 부를 이루어 개발도상국을 위해서나 불우이웃을 위해 쓰고 싶기 때문입니다. 큰 부를 이루고나서 후원도 하고 도울 수도 있겠지만, 적은 돈을 가지고 살아갈 때부터 도울 수 있어야 큰 부를 이루고서도 도울 수 있다는 저의 신념 때문에 지금부터라도 꾸준히 후원을 하려고 합니다. 근로소득으로는 노후를 준비하기 어려워진 요즘 다들 절약과 재테크에 관심이 많아지고 있는듯 한데요, 각자가 먹고 살아가기도 힘들지만 정말로 먹을 것이 없고 의료비가 없어 죽어가는 이들에게 관심을 조금 더 가져보면 어떨까요? -히비스서커스-
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bQ88xT/btroJ2zJzlP/UKPwgzXIo4FzwozW4odT31/img.jpg)
일반적으로 딥러닝 모델은 많은 이미지를 학습할수록 더 좋은 성능을 내지만 실질적으로 이미지의 수가 부족한 경우가 매우 많다. 그럴 때 사용하는 것이 image augmentation으로 가지고 있는 image를 변형하여 모델이 좀 더 다양한 데이터를 학습할 수 있도록 한다. 이런 image augmentation의 적용을 쉽게하고자 albumentations라는 라이브러리가 존재한다. 이 라이브러리를 더욱 확장성 있게 활용하는 방법(여러 이미지 적용, OneOf 활용 등)들을 알아보자. 기본 가장 간단한 활용할 수 있는 코드를 살펴보자. 먼저 augmentation 정의하는 코드는 다음과 같다. from albumentations import * def test_aug(): ret = Compose([ ..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/rUFHI/btroxpPMvD6/AQUTnBK78MNeTiFjkVhsuK/img.png)
상황 cv2.imwrite()를 쓰는 상황에서 에러가 발생하였다. 대략적인 코드 import numpy as np import cv2 name = 'sample_001.svs' mask = np.zeors((512,512), dtype=np.uint8) cv2.imwrite(f'../test_inference/results/{name[-7:-4]}/{name}', mask) 에러 메세지 error: OpenCV(4.5.4) /tmp/pip-req-build-sokf1_ny/opencv/modules/imgcodecs/src/loadsave.cpp:728: error: (-2:Unspecified error) could not find a writer for the specified extension in..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/batUZn/btrorCV87wb/HqNQ2rbp6ljKMQK1iCAfY1/img.png)
상황 np.argmax함수를 쓴 후 cv2.resize 해주려던 찰나 다음과 같은 에러 메세지를 마주하였다. 대략적인 코드 import numpy as np import cv2 # np.argmax를 위한 과정 arg_max = np.zeros((512,512,3)) arg_max[...,1] = np.where(mask==1,1,0) arg_max[...,2] = np.where(mask==2,1,0) arg_max[...,0] = np.ones((512,512)) - arg_max[...,1] - arg_max[...,2] arg_max = np.argmax(arg_max, axis=2) # cv2.resize를 위한 과정 arg_max_resized = cv2.resize(arg_max, (128,..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/JlAqK/btrn0XsVoCe/TdwDuqaLMIN9YoJHIasZc1/img.png)
pytorch tensorboard tutorial를 참조하며 코드를 작성한 후 모델을 돌려보던 중 다음과 같은 에러를 마주하였다. pytorch tensorboard tutorial https://tutorials.pytorch.kr/intermediate/tensorboard_tutorial.html TensorBoard로 모델, 데이터, 학습 시각화하기 — PyTorch Tutorials 1.10.0+cu102 documentation TensorBoard로 모델, 데이터, 학습 시각화하기 PyTorch로 딥러닝하기: 60분만에 끝장내기 에서는 데이터를 불러오고, nn.Module 의 서브클래스(subclass)로 정의한 모델에 데이터를 공급(feed)하고, 학습 데이 tutorials.pytorc..