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
#!/usr/bin/python | |
# torch_bilateral: bi/trilateral filtering in tf | |
# Copyright: (c) 2017-2018 Prophesee | |
from __future__ import print_function | |
import tensorflow as tf | |
import numpy as np | |
import pdb | |
import time | |
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
#!/usr/bin/python | |
# torch_bilateral: bi/trilateral filtering in torch | |
import torch | |
from torch import nn | |
from torch.autograd import Variable | |
import torch.nn.functional as F | |
from torch.nn import Parameter | |
import numpy as np | |
import pdb | |
import time |
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
#!/usr/bin/python | |
# This script runs a random 3d animation & can retrieve: | |
# - detection | |
# - flow | |
# - zbuffer | |
# | |
# Copyright: (c) 2017-2018 Chronocam | |
import numpy as np | |
import cv2 |
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 __future__ import division | |
import time | |
import numpy as np | |
class Timing: | |
def __init__(self): | |
self.total = 0 | |
self.ncalls = 0 | |
self.nevents = 0 | |
self.last_num = -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
# pylint: disable-all | |
import torch.nn as nn | |
from torch.nn import functional as F | |
import torch | |
def time_to_batch(x): | |
t, n = x.size()[:2] | |
x = x.view(n * t, *x.size()[2:]) | |
return x, n |
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
# pylint: disable-all | |
import torch.nn as nn | |
from torch.nn import functional as F | |
import torch | |
def time_to_batch(x): | |
t, n = x.size()[:2] | |
x = x.view(n * t, *x.size()[2:]) | |
return x, n |
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 __future__ import print_function | |
import numpy as np | |
import imutils | |
import cv2 | |
""" | |
Homecooked RANSAC, we will see if we manage to replace cv2.findHomography(..., cv2.RANSAC) | |
""" | |
def ransac(data, model, n, k, t, d): | |
bestfit = None |
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 | |
import torch.nn as nn | |
import torch.optim as optim | |
import torch.nn.functional as F | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import random | |
def bce_loss_with_logits(x, y): |
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 __future__ import print_function | |
import time | |
import numpy as np | |
import cv2 | |
from prophesee_utils.td_video import ChronoVideo | |
if __name__ == '__main__': | |
delay = 1 | |
base_delay = 1 | |
stop = False |
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
#!/usr/bin/python | |
from __future__ import print_function | |
""" | |
* World To Camera & Back (projective equations of pinhole cameras) * | |
* -------------------- * | |
* The OpenCV reference frame: * | |
* (or sometimes called "Camera Reference Frame"): * | |
* Z points towards the direction of forward motion of the camera * | |
* X points right wrt Y * |
OlderNewer