This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from os.path import join | |
import json | |
import cv2 | |
import numpy as np | |
from tqdm import tqdm | |
import json | |
from pycocotools import mask as maskUtils | |
from scipy import ndimage | |
from PIL import Image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
from pathlib import Path | |
import os | |
import re | |
import pandas as pd | |
import numpy as np | |
from tqdm import tqdm | |
def main(input_dirs, output_dir): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from scipy.signal import convolve | |
from numpy import linalg | |
# implementation of RGB2SUV http://vision.ucsd.edu/~spmallick/research/suv/index.html | |
def get_rot_mat(rot_v, unit=None): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Proxy list graper | |
# https://github.com/abdallahelsokary/Proxy-Collector-/blob/master/Proxy_Collector.py | |
import urllib.request | |
import urllib.error | |
import time | |
def proxy_list(): | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collecting horovod | |
Using cached horovod-0.10.1.tar.gz | |
Building wheels for collected packages: horovod | |
Running setup.py bdist_wheel for horovod: started | |
Running setup.py bdist_wheel for horovod: still running... | |
Running setup.py bdist_wheel for horovod: finished with status 'error' | |
Complete output from command /beegfs/home/hd/hd_hd/hd_tn445/.venvs/tf_r1/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/hd_tn445_job_5405240/pip-build-o4EglG/horovod/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/hd_tn445_job_5405240/tmpABgSLhpip-wheel- --python-tag cp27: | |
running bdist_wheel | |
running build | |
running build_py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tsne import bh_sne | |
import numpy as np | |
from skimage.transform import resize | |
from matplotlib import pyplot as plt | |
def gray_to_color(img): | |
if len(img.shape) == 2: | |
img = np.dstack((img, img, img)) | |
return img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 23.03.16, Artsiom Sanakoyeu | |
import caffe | |
from caffe import layers as L, params as P | |
def alexnet(train_data_source, test_data_source, mean_file, train_batch_size=128, test_batch_size=50, database_backend=P.Data.LEVELDB): | |
""" | |
Generate the caffe's network specification train_val.prototxt file for Alexnet model, | |
described in the [AlexNet](http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks) publication. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from caffeext import * | |
import caffe | |
import os.path | |
from scipy import misc | |
import time | |
def run_test_on_images(net, transformer, data, batch_size): | |
data_blob_shape = net.blobs['data'].data.shape | |
data_blob_shape = list(data_blob_shape) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "art_cnn" | |
input: "data" | |
input_shape { | |
dim: 1 | |
dim: 3 | |
dim: 227 | |
dim: 227 | |
} | |
layer { | |
name: "conv1" |