전체 글

https://matplotlib.org/stable/gallery/shapes_and_collections/hatch_style_reference.html Hatch style reference — Matplotlib 3.7.1 documentation Note Click here to download the full example code Hatch style reference Hatches can be added to most polygons in Matplotlib, including bar, fill_between, contourf, and children of Polygon. They are currently supported in the PS, PDF, SVG, OSX, and Agg bac..
이미 예전부터 많은 사람들이 쓰고 있는 LR 스케줄러로, 통상적으로 이런 포맷을 만들 수 있다는 점에서 큰 장점을 가진다. Pytorch에 공식으로 구현된 CosineAnnealingWarmRestart는 Warmup start가 구현되어 있지 않고 lr 최댓값이 감소하는 방안에 대해서 구현되어 있지 않다고 한다. 아래 블로그 링크를 참고하면 친절하신 어느 개발자께서 구현해주신 Custom Cosine AnnealingWarmupRestart를 많이 사용하곤 하는데, 나는 이상하게 저분 코드만 사용하면 기대하는 모습의 lr_scheduler가 나오지 않는다. 더보기 (optimzer의 초기 lr을 0로 두고 진행하는데도, 이상하게 아래 이미지 초록색 라인처럼 자꾸 lr이 위로 올라감.) https://g..
· 머신러닝
https://github.com/open-mmlab/mmdetection/issues/2739#issuecomment-631196300 Loss becomes NAN after a few iterations · Issue #2739 · open-mmlab/mmdetection I am training a bespoke dataset using the default Mask RCNN parameterisation (see parameters below). I have converted my bespoke dataset to COCO format, with the annotations in JSON files (polygons... github.com TO DO LIST check if the datase..
https://github.com/python-pillow/Pillow/issues/1380 PNG write is failing due to IOError · Issue #1380 · python-pillow/Pillow Folks, I believe I have found an file (JPG) that is causing PIL to report a false IO Error, and write a zero byte file. Now the following code is working fine for other JPG, PNG, etc files: (Please... github.com from PIL import Image image_file = Image.open("./error_img.pn..
import torch from tqdm.notebook import tqdm import glob from PIL import Image from torchvision.transforms import ToTensor target_path = "./images/*" img_lst = glob.glob(target_path) totensor = ToTensor() img_val_lst = [] for img in tqdm(img_lst): img_RGB = Image.open(img).convert("RGB") img_val = totensor(img_RGB) img_val_lst.append(img_val) mean = torch.zeros(3) std = torch.zeros(3) print('==> ..
학습 과정에서 터미널에 뜨는 결과물을 따로 log파일로 저장해야 할 때가 있다. 간혹 터미널창을 재로딩하면, 기존의 내용이 날라가버려서 이 프로그램이 무슨 원인으로 꺼졌는지 확인할 수 없는 경우를 대비하기 위함이다. 보통 Logger라는 클래스로 python training 코드에 삽입하는 경우가 있는데, 간단하게 아래 명령어를 입력해서도, 진행할 수 있다. 이럴 때 다음 tee 명령어를 입력할 경우, 터미널 창에 내용을 띄우고 동시에 파일에 로깅할 수도 있다. python train.py 2>&1 | tee -a out1.log 이때 2>&1이라는 옵션이 있어야 터미널 창, log파일 모두 동일한 내용이 들어가게 된다. (1은 stdout, 2는 stderr 의미) 도움 주신 사이트 [Python] 콘..
Pytorch tensor 내 특정 값과 해당되는 index가 필요할 경우 아래 코드로 확인할 수 있다. x = torch.Tensor([11, 22, 33, 22]) print((x==22).nonzero(as_tuple=True)[0]) https://stackoverflow.com/questions/47863001/how-pytorch-tensor-get-the-index-of-specific-value How Pytorch Tensor get the index of specific value With python lists, we can do: a = [1, 2, 3] assert a.index(2) == 1 How can a pytorch tensor find the .index() direct..
https://jamoya.one/ 자모야 모여라 한글 자모가 분리되어 표시되는 파일 이름을 수정하는 온라인 도구입니다. 애플 기기에서 설정한 파일명이 윈도우에서 깨져 표시될 때 유용합니다. jamoya.one 상단 링크를 들어가면 변경하여 다운로드 가능 서버와의 통신 X, 파일 이름만 Unicode 정규화하여 다운로드하는 형태. 자세한 코드 Github : https://github.com/hyunbinseo/mac-filename-kr GitHub - hyunbinseo/mac-filename-kr: 자소가 분리된 한글 파일명을 고치는 도구 자소가 분리된 한글 파일명을 고치는 도구. Contribute to hyunbinseo/mac-filename-kr development by creating a..
https://80000coding.oopy.io/d5d36b7d-b605-4d1f-b2d9-ad0ddd8f1ff9 VSCode 파일 확장자로 정렬하기 개요 80000coding.oopy.io
https://pypi.org/project/polygon-pascalvoc-writer/ polygon-pascalvoc-writer For generating Pascal VOC XML image annotation files pypi.org 응용 코드 import glob from tqdm import tqdm import os import json import xmltodict import cv2 import codecs import numpy as np from shutil import copyfile from polygon_pascalvoc_writer import VocWriter CLASS_label = ['CLASS_A', 'CLASS_B', ...] #https://blog.actors..
Js.Y
Y초보프로그래머