딥러닝/pytorch
-
IOU loss딥러닝/pytorch 2020. 2. 7. 17:49
hardnet을 학습하면서 validation 이미지들의 iou 값이 계속 0.9를 못넘었다 그래서 loss function 문제인가 하고 이전에 사용했던 cross entropy 대신 iou loss를 사용하였다 링크는 아래 https://discuss.pytorch.org/t/how-to-implement-soft-iou-loss/15152 How to implement soft-IoU loss? I am trying to implement soft-mIoU loss for semantic segmentation as per the following equation. but loss is very low and I am not able to find the wrong step in the implem..
-
아파서 내일 할 것만 정리딥러닝/pytorch 2020. 2. 6. 12:02
새벽부터 메스껍고 구토할 거 같아서 병원에서 약타고 오후 반차... 오늘 unet 을 써서 학습하려고 했는데 일단 찾아놓은 것만 올려놓고 ㅌㅌ한다 unet 코드 https://github.com/milesial/Pytorch-UNet milesial/Pytorch-UNet PyTorch implementation of the U-Net for image semantic segmentation with high quality images - milesial/Pytorch-UNet github.com 여기서는 dice loss를 쓴다고 했는데 뭔 주사위 loss인가 싶어서 좀 찾아서 읽다가 눈에 초점을 잃어버림 다양한 loss에 대한 정리 https://lars76.github.io/neural-networ..
-
HardNet 개발 (2)딥러닝/pytorch 2020. 2. 5. 17:41
어제부터 계속 학습을 진행하는데 IOU로 평가한 acc는 80%가 나오는데 이미지는 아무것도 안찍혀서 이상하다고 생각했다 ...는 학습할 때 이미지하고 테스트할 때 이미지를 다르게 해서 문제였다 (학습할 때는 255로 안나누고, 테스트할 때만 나눔) 그래도 일단은 IOU 코드는 아래와 같이 수정 def iou_pytorch(outputs: torch.Tensor, labels: torch.Tensor, device='cuda'): # You can comment out this line if you are passing tensors of equal shape # But if you are passing output from UNet or something it will most probably # be..
-
HardNet 개발딥러닝/pytorch 2020. 2. 5. 16:30
하도 정리가 안되서 정리용 블로그 시작 이미지에서 segmentation 을 추출하는 모델 input 이미지의 width,height와 output 이미지의 width, height가 동일 input은 [channel, width, height] 라면 output 은 [classes, width, height] 로 각 픽셀별로 이미지화하여 나오게 됨 논문은 아래 링크 https://arxiv.org/abs/1909.00948 HarDNet: A Low Memory Traffic Network State-of-the-art neural network architectures such as ResNet, MobileNet, and DenseNet have achieved outstanding accuracy..
-
pytorch gpu parallel 설정딥러닝/pytorch 2020. 2. 4. 17:44
언제나 그렇듯 gpu 설정은 빡치는 작업이다 nvidia-docker로 띄우고 끝나는게 아니라 cudnn 도 설정해줘야하고 등등등...... 아무튼 환경 설정은 어찌어찌 해서 gpu를 사용하는데 torch.nn.DataParallel을 사용해서 학습을 시키는데 메모리만 잡아먹고 오른쪽 사용량은 100%와 0%를 1:1 비율로 오락가락하는 모습을 보여준다 (딥빡) 그래서 아래 링크를 보고 gpu 병렬 처리를 다시 설정하려는데 https://medium.com/daangn/pytorch-multi-gpu-%ED%95%99%EC%8A%B5-%EC%A0%9C%EB%8C%80%EB%A1%9C-%ED%95%98%EA%B8%B0-27270617936b 🔥PyTorch Multi-GPU 학습 제대로 하기 PyTorch..