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
#pragma once | |
#define _USE_MATH_DEFINES | |
#include <math.h> | |
#include <vector> | |
#include <functional> | |
namespace misc | |
{ | |
std::vector<float> GaussKernel(float sigma, int kernelSize, int sampleCount = 1000); |
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.optimize import curve_fit | |
from matplotlib import pyplot as plt | |
t = np.arange(380.0, 781.0, 5.0) | |
s = np.asarray([ | |
[0.0014, 0.0000, 0.0065], [0.0022, 0.0001, 0.0105], [0.0042, 0.0001, 0.0201], | |
[0.0076, 0.0002, 0.0362], [0.0143, 0.0004, 0.0679], [0.0232, 0.0006, 0.1102], | |
[0.0435, 0.0012, 0.2074], [0.0776, 0.0022, 0.3713], [0.1344, 0.0040, 0.6456], |
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
TEX = max_print_line=10000 pdflatex -shell-escape -interaction=nonstopmode -file-line-error -halt-on-error | |
BIB = bibtex | |
VIEWER = evince | |
.PHONY: all view | |
view : rebuild | |
$(VIEWER) main.pdf & | |
rebuild: clean all |
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
% Encoding: UTF-8 | |
@article{alina2018openimages, | |
author = {Alina Kuznetsova and Hassan Rom and Neil Alldrin and Jasper Uijlings and Ivan Krasin and Jordi Pont-Tuset and Shahab Kamali and Stefan Popov and Matteo Malloci and Tom Duerig and Vittorio Ferrari}, | |
title = {The Open Images Dataset V4: Unified image classification, object detection, and visual relationship detection at scale}, | |
year = {2018}, | |
journal = {arXiv:1811.00982} | |
} | |
@inproceedings{rodrigo2019iteractive, | |
author = {Rodrigo Benenson and Stefan Popov and Vittorio Ferrari}, |
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
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved | |
import contextlib | |
import datetime | |
import io | |
import json | |
import logging | |
import numpy as np | |
import os | |
import pycocotools.mask as mask_util | |
from fvcore.common.file_io import PathManager, file_lock |
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
# Copyright 2020 Stanislav Pidhorskyi | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
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 random import random | |
def optimize(f, t_scale, steps=10000, tolerance=1e-6, step_decay_exp=0.01): | |
def random_rotation(size): | |
shape = [size, size] | |
a = np.random.normal(-1.0, 1.0, shape) | |
u, s, v = np.linalg.svd(a, full_matrices=False) | |
return u |
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 torch | |
from torch import nn | |
import numpy as np | |
class RotationMatrix(torch.nn.Module): | |
def __init__(self): | |
super(RotationMatrix, self).__init__() | |
self.betta = nn.Parameter(torch.tensor(np.random.randn(3), dtype=torch.float32), requires_grad=True) |
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 matplotlib.pyplot as plt | |
import numpy as np | |
import math | |
def find_maximum(f, min_x, max_x, epsilon=1e-3): | |
def binary_search(l, r, fl, fr, epsilon): | |
mid = l + (r - l) / 2 | |
fm = f(mid) | |
binary_search.eval_count += 1 |
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
# Copyright 2018 Stanislav Pidhorskyi | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
NewerOlder