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
# -*- coding: utf-8 -*- | |
import os | |
import requests | |
conf = 'CVPR2016' # CVPR2015/CVPR2014/CVPR2013/ICCV2013 | |
#header = 'http://www.cv-foundation.org/openaccess/' | |
header = 'http://openaccess.thecvf.com/' | |
def name_check(name): | |
name = name.replace('?','') |
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
# coding: utf-8 | |
import os | |
import os.path | |
import fnmatch | |
import subprocess | |
import argparse | |
# Parse the arguments | |
parser = argparse.ArgumentParser(description='Tile the first num-pages horizontally into a JPEG 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
from visdom import Visdom | |
import argparse | |
import numpy as np | |
DEFAULT_PORT = 8097 | |
DEFAULT_HOSTNAME = "http://localhost" | |
parser = argparse.ArgumentParser(description='Demo arguments') | |
parser.add_argument('-port', metavar='port', type=int, default=DEFAULT_PORT, help='port the visdom server is running on.') | |
parser.add_argument('-server', metavar='server', type=str, default=DEFAULT_HOSTNAME, help='Server address of the target to run the demo on.') |
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
# This code is for self study. | |
# Remider of the difference between copy.copy and copy.deepcopy | |
# immutable objects | |
print('immutable object') | |
a = 'abc' | |
b = a | |
print("a:{}, id(a):{}".format(a, id(a))) | |
print("b:{}, id(b):{}".format(b, id(b))) |
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 tqdm import tqdm | |
import time | |
from collections import OrderedDict | |
from random import random | |
with tqdm(range(10000), ncols=10) as pbar: | |
for i in pbar: | |
pbar.set_postfix(OrderedDict( | |
output='{:06d}'.format(i), | |
loss='{:.4f}'.format(random()) |
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 | |
import tqdm | |
import argparse | |
import torch | |
import torch.nn as nn | |
import torchvision | |
from skimage.io import imread, imsave |
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 random | |
import numpy as np | |
import copy | |
import torch | |
import torchvision | |
from torchvision import transforms | |
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 os | |
import sys | |
import torch | |
import torch.nn.functional as F | |
import pymesh | |
class VisCameras(): | |
init_front_vec = torch.tensor([1.0, 0.0, 0.0]).view(1,-1).float() |
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 | |
import sys | |
import torch | |
import torch.nn.functional as F | |
import pymesh | |
class VisCameras(): | |
init_front_vec = torch.tensor([1.0, 0.0, 0.0]).view(1,-1).float() |
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 | |
import argparse | |
import glob | |
import torch | |
import torch.nn as nn | |
import numpy as np | |
from skimage.io import imread, imsave | |
import tqdm | |
import imageio |
OlderNewer