본문 바로가기

프로그래밍/CellGAN4

Installing OpenCV on Darwin https://docs.opencv.org/master/d0/db2/tutorial_macos_install.html OpenCV: Installation in MacOS Prev Tutorial: Use OpenCL in Android camera preview based CV application Next Tutorial: Cross compilation for ARM based Linux systems Original author @sajarindider Compatibility OpenCV >= 3.4 The following steps have been tested for MacOSX (Mavericks) but docs.opencv.org Clone OpenCV git repository gi.. 2021. 9. 3.
Printing out the list of files in the directory import os path = "/home/noh/noh/CellGAN/DCGAN/data_gan/par1/img_align_par1" files = os.listdir(path) for i, f in enumerate(files): if i == 0: print(type(f)) print(f) import cv2 import os path = "/home/noh/noh/CellGAN/DCGAN/data_gan/par1_img_align_par1" files = os.listdir(path) for i, f in enumerate(files): img = cv2.imread(path + f, flags=cv2.IMREAD_UNCHANGED) if i == 0: print(type(img)) print(i.. 2021. 8. 25.
Collecting the information of software and hardware environment from __future__ import print_function # Unlike the rest of the PyTorch this file must be python2 compliant. # This script outputs relevant system environment info # Run it with `python collect_env.py`. import datetime import locale import re import subprocess import sys import os from collections import namedtuple try: import torch TORCH_AVAILABLE = True except (ImportError, NameError, Attribute.. 2021. 8. 24.
Segmentation error Par1 형 세포 이미지를 Pytorch Tutorial에서 제공한 DCGAN의 샘플 코드로 실행을 했을 때 segmentation error가 발생했다. gdb(gnu debugger)를 이용해 추적했으나, 내가 본 에러의 해결책을 구글링만으로는 마땅히 찾지 못 하였다. import os import random import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data import torchvision.datasets as dset import torchvision.transforms as tra.. 2021. 8. 18.