Adding a bunny lit with an environment map to a background using Blender's Cycles renderer.
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 cv2 | |
#from scipy.ndimage import gaussian_filter, uniform_filter | |
from cupyx.scipy.ndimage import gaussian_filter, uniform_filter | |
#import numpy as np | |
import cupy as np # don't laugh | |
# inspired by https://www.youtube.com/watch?v=X-iSQQgOd1A |
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 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 atexit | |
import time | |
import subprocess | |
from io import BytesIO | |
import PIL.Image | |
import numpy as np | |
from matplotlib import pyplot as plt | |
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 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.misc import imread, imsave | |
from matplotlib import pyplot as plt | |
# Get a linear version of the images | |
target_im = (imread("lighting_gt.png").astype('float32') / 255.)**2.2 # Poor man un-sRGB | |
source_im = (imread("warped_0150.png").astype('float32') / 255.)**2.2 |
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 os | |
from tqdm import tqdm | |
import numpy as np | |
import argparse | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torch.optim as optim | |
from torchvision import datasets, transforms |
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/env python3 | |
VERSION = "v0.2.0" | |
""" | |
Copyright (c) 2013 devunt | |
Permission is hereby granted, free of charge, to any person | |
obtaining a copy of this software and associated documentation | |
files (the "Software"), to deal in the Software without |
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 sys | |
import csv | |
import numpy as np | |
from scipy.misc import imread | |
output_file = 'sharpnesses.txt' | |
imgs = sys.argv[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
import tensorflow as tf | |
# To use : model.add(ResizeImage(<an input shape>)) | |
# e.g.: model.add(ResizeImage(model.layers[0].output_shape[1:3])) | |
class ResizeImage(Layer): | |
def __init__(self, output_dim, **kwargs): | |
self.output_dim = output_dim | |
super().__init__(**kwargs) |
NewerOlder