전체 글

Traceback (most recent call last): File "/opt/conda/lib/python3.8/site-packages/pdf2image/pdf2image.py", line 441, in pdfinfo_from_path proc = Popen(command, env=env, stdout=PIPE, stderr=PIPE) File "/opt/conda/lib/python3.8/subprocess.py", line 854, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/opt/conda/lib/python3.8/subprocess.py", line 1702, in _execute_child..
다른 형식으로된 label txt파일을 내가 원하는 형식 (이미지 경로 + '\t' + Label)으로 바꾸고, 기존 large dataset 중 내가 원하는 일부 이미지만을 다른 폴더에 옮기기 위한 코드 핵심은 shutil package에서 임포트한 copyfile함수 from shutil import copyfile gt_file = open('./new_gt.txt', 'r') label_file = open('./train_label.txt', 'w') lines = gt_file.readlines() new_folder = './Train/mlt_jp/images/' for idx, line in enumerate(lines): print('[%d/%d]'%(idx,len(lines))) fil..
Ubuntu나 Linux에서 Command를 사용해서 파일을 지울 때 rm -r 명령어를 사용한다. 이때, 그 안에있는 ./.git 폴더 내 git 정보까지 삭제하겠냐는 질문이 나온다. 매번 다 y를 입력해줘야 하는데 이런것 자체를 아예 묻지 않게끔 하기 위함 # 강제 삭제 rm -rf ./DIRECTORY_NAME # 모든 대답에 다 yes 입력, 디렉토리 삭제 yes | rm -r ./DIRECTORY_NAME
계속 정리해 나가기 https://backlog.com/git-tutorial/kr/stepup/stepup2_3.html git init git clone ~~ git branch -V : branch 확인 git pull / git pull origin $branch_name : 현재 branch($branch_name)에서 pull git checkout $branch_name : 브랜치 전환하기
· 환경구축
File "sample.py", line 9, in soup = BeautifulSoup(response.content, "lxml") File "/opt/conda/envs/imagemaker/lib/python3.6/site-packages/bs4/__init__.py", line 246, in __init__ % ",".join(features)) bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library? lxml 설치 pip install lxml
· 환경구축
No module named requests pip install requests No module named bs4 from bs4 import BeautifulSoup pip 또는 anaconda 환경에 맞게 설치 pip install BeautifulSoup4 conda install -c anaconda beautifulsoup4 No module named openpyxl pip install openpyxl
# FOR PNG shape import numpy from PIL import Image, ImageDraw # read image as RGB and add alpha (transparency) im = Image.open("crop.jpg").convert("RGBA") # convert to numpy (for convenience) imArray = numpy.asarray(im) # create mask polygon = [(444,203),(623,243),(691,177),(581,26),(482,42)] maskIm = Image.new('L', (imArray.shape[1], imArray.shape[0]), 0) ImageDraw.Draw(maskIm).polygon(polygon,..
논문 논문을 깊게 읽고 만든 자료가 아니므로, 참고만 해주세요. 얕은 지식으로 모델의 핵심 위주로만 파악한 자료이다 보니 없는 내용도 많습니다. 혹시 사용하실 경우 댓글 부탁드립니다. - 참고 블로그 RNN, OCR , Scene Text 2021.03.11 Read Like Humans: Autonomous, Bidirectional and Iterative Language Modeling for ... blog.naver.com
https://github.com/open-mmlab/mmocr GitHub - open-mmlab/mmocr: OpenMMLab Text Detection, Recognition and Understanding Toolbox OpenMMLab Text Detection, Recognition and Understanding Toolbox - GitHub - open-mmlab/mmocr: OpenMMLab Text Detection, Recognition and Understanding Toolbox github.com 1 . 데이터 전환(준비) 기존 LMDB format 데이터 -> image + Label based txt 로 변환 단순 코드 [LMDB] lmdb file loading, readi..
LMDB 안에 image와 label이 있다는 가정하에 로딩, txt파일의 경우 다음과 같은 형식으로 생성됨(여기서 구분자는 \t 사용) import lmdb from tqdm import tqdm import six from PIL import Image import os from glob import glob import concurrent.futures from concurrent.futures import ProcessPoolExecutor import functools import time def make_txt_lst_dict(data_dir_lst): txt_dict = {} txt_lst = [] for idx, data_dir in enumerate(data_dir_lst): if dat..
Js.Y
Y초보프로그래머