Skip to content

Instantly share code, notes, and snippets.

% reference : https://medium.com/data-breach/introduction-to-harris-corner-detector-32a88850b3f6
clear all;
close all;
clc;
% Take the grayscale of the original image
im=imread('corner2.png');
figure
import numpy as np
def loss_function(prediction, ground_truth): #mean square error with batch size = 1
cost = (ground_truth-prediction)**2
return cost
def prediction(x,current_weights,current_bias):
y_predicted = np.sum((current_weights * x)) + current_bias
# import necessary layers
from tensorflow.keras.layers import Input, Conv2D , Dropout, MaxPool2D, Flatten, Dense
from tensorflow.keras import Model
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorflow.keras.regularizers import l2
import tensorflow as tf
from tensorflow.keras.callbacks import EarlyStopping, ModelCheckpoint
import os
import matplotlib.pyplot as plt
import sys
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 29 20:56:04 2021
@author: aktas
"""
# import necessary layers
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorflow.keras.regularizers import l2
# import necessary layers
from tensorflow.keras.layers import Input, Conv2D , Dropout, MaxPool2D, Flatten, Dense
from tensorflow.keras import Model
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorflow.keras.regularizers import l2
import tensorflow as tf
from tensorflow.keras.callbacks import EarlyStopping, ModelCheckpoint
import os
import matplotlib.pyplot as plt
import sys
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 3 14:34:44 2022
@author: aktas
"""
# import necessary layers
from tensorflow.keras.layers import Input, Conv2D , Dropout, MaxPool2D, Flatten, Dense, Activation, BatchNormalization
from tensorflow.keras import Model