This file contains hidden or 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
sudo apt-get install zsh | |
sudo apt-get install git | |
sudo add-apt-repository ppa:webupd8team/sublime-text-3 | |
sudo apt-get update | |
sudo apt-get install sublime-text-installer | |
dropbox | |
teamviewer | |
google-chrome |
This file contains hidden or 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
running install | |
running bdist_egg | |
running egg_info | |
creating lltm_cuda.egg-info | |
writing lltm_cuda.egg-info/PKG-INFO | |
writing dependency_links to lltm_cuda.egg-info/dependency_links.txt | |
writing top-level names to lltm_cuda.egg-info/top_level.txt | |
writing manifest file 'lltm_cuda.egg-info/SOURCES.txt' | |
reading manifest file 'lltm_cuda.egg-info/SOURCES.txt' | |
writing manifest file 'lltm_cuda.egg-info/SOURCES.txt' |
This file contains hidden or 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
# taken and improvised from : https://github.com/jiyanggao/Video-Person-ReID/issues/6 | |
import numpy as np | |
from scipy.io import loadmat | |
q = loadmat('./mars/info/query_IDX.mat')['query_IDX'][0] | |
t = loadmat('./mars/info/tracks_test_info.mat')['track_test_info'] | |
query_inds = q - 1 # to get 0 based predefined array indices for query instances |
This file contains hidden or 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 __future__ import print_function | |
import torch.nn.functional as F | |
# from torch.autograd import Variable | |
# import copy | |
import torch | |
import torch.nn as nn | |
import torch.optim as optim | |
from torch.utils.data import DataLoader | |
from torchvision import datasets, transforms |
This file contains hidden or 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 __future__ import print_function | |
from __future__ import division | |
import torch | |
import torch.nn as nn | |
import torch.optim as optim | |
import numpy as np | |
import torchvision | |
from torchvision import datasets, models, transforms | |
from torch.autograd import Variable | |
import matplotlib.pyplot as plt |
This file contains hidden or 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 imgaug as ia | |
import imgaug.augmenters as iaa | |
print("loaded") | |
prob = 0.5 | |
sometimes = lambda aug: iaa.Sometimes(prob, aug) | |
output_shape=(473,473) | |
seq = iaa.Sequential([ | |
# apply the following augmenters to most images | |
iaa.Fliplr(0.5), | |
sometimes(iaa.Affine( |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
def get_dataloader_from_pth(path, batch_size=4): | |
contents = torch.load(path) | |
dataset = torch.utils.data.TensorDataset(contents['x'], contents['y']) | |
dataloader = torch.utils.data.DataLoader(dataset, batch_size=batch_size, | |
shuffle=True, num_workers=2) | |
return dataloader | |
#---------------------------------------------------------------------- | |
import os.path as osp |
This file contains hidden or 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 torch, torch.nn as nn | |
import torch.nn.functional as F | |
import os, sys | |
import copy | |
import torch.optim as optim | |
class ConvReLU(nn.Module): | |
def __init__(self, indim, outdim): | |
super().__init__() | |
self.conv = nn.Conv2d(indim, outdim, kernel_size=1) |