- create tasks T{NNNN} asign them
- create a branch with name like "T{NNNN}-boo-hoo"
git checkout -b T1234-boo-foo
- commit changes on that branch until it gets ready to be reviewed
git commit -am 'first'
git commit -am 'now it works'
- check if it's lint free (NOTE: it runs lint against only modified files)
arc lint
- push a review request to the server. This will create a diff with id D{NNNN}
arc diff
MATLAB code to show epipolar geometry with OpenCV (using mexopencv), based on code from OpenCV-Python Tutorials.
#include <iostream> | |
#include <string> | |
#include <ctime> | |
#include <cstdlib> | |
namespace da{ | |
struct nullstream: std::ostream{ | |
nullstream(): std::ostream(0){} | |
}; |
#include <opencv2/opencv.hpp> | |
#include <opencv2/core/core_c.h> // needed for IplImage ;( | |
#include <dlib/image_processing.h> | |
#include <dlib/opencv/cv_image.h> | |
// IMPORTANT: | |
// do **not** use namespace cv or dlib, | |
// but prefix everything correctly !!! |
import numpy as np | |
from scipy.ndimage.interpolation import map_coordinates | |
from scipy.ndimage.filters import gaussian_filter | |
def elastic_transform(image, alpha, sigma, random_state=None): | |
"""Elastic deformation of images as described in [Simard2003]_. | |
.. [Simard2003] Simard, Steinkraus and Platt, "Best Practices for | |
Convolutional Neural Networks applied to Visual Document Analysis", in | |
Proc. of the International Conference on Document Analysis and | |
Recognition, 2003. |
/** | |
* Convert standard camera intrinsic and extrinsic parameters to a vtkCamera instance for rendering | |
* Assume square pixels and 0 skew (for now). | |
* | |
* focal_len : camera focal length (units pixels) | |
* nx,ny : image dimensions in pixels | |
* principal_pt: camera principal point, | |
* i.e. the intersection of the principal ray with the image plane (units pixels) | |
* camera_rot, camera_trans : rotation, translation matrix mapping world points to camera coordinates | |
* depth_min, depth_max : needed to set the clipping range |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Tensorflow DNNRegressor in Python | |
# CC-BY-2.0 Paul Balzer | |
# see: http://www.cbcity.de/deep-learning-tensorflow-dnnregressor-einfach-erklaert | |
# | |
TRAINING = True | |
WITHPLOT = False |
Here's a simple implementation of bilinear interpolation on tensors using PyTorch.
I wrote this up since I ended up learning a lot about options for interpolation in both the numpy and PyTorch ecosystems. More generally than just interpolation, too, it's also a nice case study in how PyTorch magically can put very numpy-like code on the GPU (and by the way, do autodiff for you too).
For interpolation in PyTorch, this open issue calls for more interpolation features. There is now a nn.functional.grid_sample()
feature but at least at first this didn't look like what I needed (but we'll come back to this later).
In particular I wanted to take an image, W x H x C
, and sample it many times at different random locations. Note also that this is different than upsampling which exhaustively samples and also doesn't give us fle