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
# Crop the region out of the image with the bbox coordinates | |
# bbox = [x1 y1 x2 y2] | |
# size(im) = HEIGHT x WIDTH x NUM_CHANNELS | |
# window = im(y1:y2, x1:x2, all_channels) | |
# For every channel, crop out the height and the width | |
window = im(bbox(2):bbox(4), bbox(1):bbox(3), :); | |
# Warp the region | |
tmp = imresize(window, [crop_height crop_width], ... |
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
% compute selective search candidates | |
fprintf('Computing candidate regions...'); | |
th = tic(); | |
fast_mode = true; | |
boxes = selective_search_boxes(im, fast_mode); |
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
dets = spp_detect(im, spp_model, spm_im_size, use_gpu); |
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
spp_model_file = '.\data\spp_model\VOC2007\spp_model.mat'; | |
if ~exist(spp_model_file, 'file') | |
error('%s not exist ! \n', spp_model_file); | |
end | |
try | |
load(spp_model_file); | |
catch err | |
fprintf('load spp_model_file : %s\n', err.message); | |
end | |
caffe_net_file = fullfile(pwd, 'data\cnn_model\Zeiler_conv5\Zeiler_conv5'); |
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 os | |
import sys | |
from django.conf import settings | |
DEBUG = os.environ.get('DEBUG', 'on') == 'on' | |
SECRET_KEY = os.environ.get('SECRET_KEY', os.urandom(32)) | |
ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', 'localhost').split(',') |
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 cairo | |
import numpy as np | |
from PIL import Image | |
# imdata is a 2D numpy array of dtype np.uint8 containing grayscale pixel intensities on [0, 255] | |
# repeat for each of R, G, B, and add a deck of 255s for alpha | |
cairo_imdata = np.dstack([imdata, imdata, imdata, np.ones_like(imdata)*255]) | |
surface = cairo.ImageSurface.create_for_data(cairo_imdata, cairo.FORMAT_ARGB32, *(reversed(imdata.shape))) |
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
diff --git a/constants.py b/constants.py | |
index b6bb6f1..c68f453 100644 | |
--- a/constants.py | |
+++ b/constants.py | |
@@ -62,7 +62,7 @@ RIGHT_SIDE = SPACE_WIDTH*RIGHT | |
# Change this to point to where you want | |
# animation files to output | |
-MOVIE_DIR = os.path.join(os.path.expanduser('~'), "Dropbox/3b1b_videos/animations/") | |
+MOVIE_DIR = os.path.join(os.path.expanduser('~'), "dev/3b1b_videos/animations/") |
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
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded format=latex 2017.5.23) 4 OCT 2017 10:35 | |
entering extended mode | |
restricted \write18 enabled. | |
%&-line parsing enabled. | |
**/Users/ctang/dev/manim/files/Tex/8663884173924170067.tex | |
(/Users/ctang/dev/manim/files/Tex/8663884173924170067.tex | |
LaTeX2e <2017-04-15> | |
Babel <3.10> and hyphenation patterns for 84 language(s) loaded. | |
(/usr/local/texlive/2017/texmf-dist/tex/latex/standalone/standalone.cls | |
Document Class: standalone 2015/07/15 v1.2 Class to compile TeX sub-files stand |
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
diff --git a/assignment2/cs231n/solver.py b/assignment2/cs231n/solver.py | |
index 1733b52..905c109 100644 | |
--- a/assignment2/cs231n/solver.py | |
+++ b/assignment2/cs231n/solver.py | |
@@ -132,6 +132,7 @@ class Solver(object): | |
self.checkpoint_name = kwargs.pop('checkpoint_name', None) | |
self.print_every = kwargs.pop('print_every', 10) | |
self.verbose = kwargs.pop('verbose', True) | |
+ self.train_sample_indexes_seen_in_epoch = None | |
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
diff --git a/assignment2/cs231n/solver.py b/assignment2/cs231n/solver.py | |
index 1733b52..5a73fab 100644 | |
--- a/assignment2/cs231n/solver.py | |
+++ b/assignment2/cs231n/solver.py | |
@@ -132,6 +132,7 @@ class Solver(object): | |
self.checkpoint_name = kwargs.pop('checkpoint_name', None) | |
self.print_every = kwargs.pop('print_every', 10) | |
self.verbose = kwargs.pop('verbose', True) | |
+ self.train_sample_indexes_seen_in_epoch = None | |