Skip to content

Instantly share code, notes, and snippets.

@MohitLamba94
MohitLamba94 / visualizing-2d-dft.ipynb
Created April 10, 2021 07:59
Visualizing 2D DFT.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MohitLamba94
MohitLamba94 / Experimental_Receptive_Field.py
Last active July 21, 2020 10:22
This python file finds the numerical/experimental receptive field of any complicated CNN.
import numpy as np
import torch
import torch.nn as nn
from torch.autograd import Variable
import torch.nn.init as init
import imageio
def downshuffle(var,r):
b,c,h,w = var.size()
out_channel = c*(r**2)
@MohitLamba94
MohitLamba94 / getColourfulness.m
Last active March 11, 2024 13:48 — forked from zabela/getColourfulness.m
Algorithm to measure images colourfulness, adapted from "Measuring colourfulness in natural images" (Hasler and Susstrunk, 2003) http://infoscience.epfl.ch/record/33994/files/HaslerS03.pdf
function C = getColourfulness( im )
%
% C = getColourfulness( im )
%
% MATLAB algorithm implementation of the
% "Measuring colourfulness in natural images"
% (Hasler and Susstrunk, 2003)
%
% Input:
% im - image in RGB