Skip to content

Instantly share code, notes, and snippets.

View kuasha's full-sized avatar

Maruf Md Maniruzzaman Abbasi kuasha

View GitHub Profile
@kuasha
kuasha / hHGtC.markdown
Created July 31, 2014 18:58
A Pen by Maruf Maniruzzaman.
@kuasha
kuasha / atCcI.markdown
Created August 2, 2014 15:48
A Pen by Maruf Maniruzzaman.
"""
RPi - L273D
Pin 3 - Enable1
Pin 5 - Input1
Pin 7 - Input2
- Output1 - Motor -VE
- Output2 - Motor +VE
"""
import RPi.GPIO as GPIO
/*
Use pin 2 and 4 for sound sensors trig/ echo pins.
ESC is attached to pin 5 (any PWM pin will work - but here we use 5)
Pin 13 has led on arduino board- so use it to signal stop
*/
#include <Servo.h>
Servo esc;
// Tested on Raspberry Pi 3
#include<stdio.h>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "opencv2/opencv.hpp"
#include <iostream>
using namespace cv;
@kuasha
kuasha / googlenet.py
Created January 2, 2017 17:51 — forked from joelouismarino/googlenet.py
GoogLeNet in Keras
from scipy.misc import imread, imresize
from keras.layers import Input, Dense, Convolution2D, MaxPooling2D, AveragePooling2D, ZeroPadding2D, Dropout, Flatten, merge, Reshape, Activation
from keras.models import Model
from keras.regularizers import l2
from keras.optimizers import SGD
from googlenet_custom_layers import PoolHelper,LRN
def create_googlenet(weights_path=None):
@kuasha
kuasha / AlexNet.py
Last active January 7, 2017 00:37 — forked from JBed/srds_edge.png
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation, Flatten
from keras.layers.convolutional import Convolution2D, MaxPooling2D
from keras.layers.normalization import BatchNormalization
#AlexNet with batch normalization in Keras
#input image is 224x224
model = Sequential()
model.add(Convolution2D(64, 3, 11, 11, border_mode='full'))
@kuasha
kuasha / readme.md
Created January 2, 2017 17:53 — forked from baraldilorenzo/readme.md
VGG-16 pre-trained model for Keras

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

### Preprocess the data here.
### Feel free to use as many code cells as needed.
from tensorflow.contrib.layers import flatten
def LeNet(x):
# Hyperparameters
mu = 0
sigma = 0.1
/*
Analog Input
Demonstrates analog input by reading an analog sensor on analog pin 0 and
turning on and off a light emitting diode(LED) connected to digital pin 13.
The amount of time the LED will be on and off depends on
the value obtained by analogRead().
The circuit:
* Potentiometer attached to analog input 0
* center pin of the potentiometer to the analog pin