hlamba28 / offline-signature-verification-using-siamese-network Goto Github PK
View Code? Open in Web Editor NEWIdentifying forged signatures using convolutional siamese networks implemented in Keras
Identifying forged signatures using convolutional siamese networks implemented in Keras
please write requirements.txt as many tensorflow functions are deprecated and will be removed in future versions. by this file we can make a virtual environment for the project so that it runs well.
please tell me if there is a way to extract feature of these signature pic as this is really huge data.
For how many epoch I should run the model
I use file SigNet-BHSig260.ipynb on Google Colab, but when i ran code:
base_network = create_base_network_signet(input_shape)
input_a = Input(shape=(input_shape))
input_b = Input(shape=(input_shape))
base_network
,processed_a = base_network(input_a)
processed_b = base_network(input_b)
distance = Lambda(euclidean_distance, output_shape=eucl_dist_output_shape)([processed_a, processed_b])
model = Model(input=[input_a, input_b], output=distance)
TypeError Traceback (most recent call last)
in ()
1 # network definition
----> 2 base_network = create_base_network_signet(input_shape)
3
4 input_a = Input(shape=(input_shape))
5 input_b = Input(shape=(input_shape))
5 frames
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/utils/generic_utils.py in validate_kwargs(kwargs, allowed_kwargs, error_message)
806 for kwarg in kwargs:
807 if kwarg not in allowed_kwargs:
--> 808 raise TypeError(error_message, kwarg)
809
810
TypeError: ('Keyword argument not understood:', 'init')
###############################################################################
And this is ''create_base_network_signet'' fuction:
def create_base_network_signet(input_shape):
'''Base Siamese Network'''
seq = Sequential()
seq.add(Conv2D(96, kernel_size=(11, 11), activation='relu', name='conv1_1', strides=4, input_shape= input_shape,
init='glorot_uniform', dim_ordering='tf'))
seq.add(BatchNormalization(epsilon=1e-06, mode=0, axis=1, momentum=0.9))
seq.add(MaxPooling2D((3,3), strides=(2, 2)))
seq.add(ZeroPadding2D((2, 2), dim_ordering='tf'))
seq.add(Conv2D(256, kernel_size=(5, 5), activation='relu', name='conv2_1', strides=1, init='glorot_uniform', dim_ordering='tf'))
seq.add(BatchNormalization(epsilon=1e-06, mode=0, axis=1, momentum=0.9))
seq.add(MaxPooling2D((3,3), strides=(2, 2)))
seq.add(Dropout(0.3))# added extra
seq.add(ZeroPadding2D((1, 1), dim_ordering='tf'))
seq.add(Conv2D(384, kernel_size=(3, 3), activation='relu', name='conv3_1', strides=1, init='glorot_uniform', dim_ordering='tf'))
seq.add(ZeroPadding2D((1, 1), dim_ordering='tf'))
seq.add(Conv2D(256, kernel_size=(3, 3), activation='relu', name='conv3_2', strides=1, init='glorot_uniform', dim_ordering='tf'))
seq.add(MaxPooling2D((3,3), strides=(2, 2)))
seq.add(Dropout(0.3))# added extra
seq.add(Flatten(name='flatten'))
seq.add(Dense(1024, W_regularizer=l2(0.0005), activation='relu', init='glorot_uniform'))
seq.add(Dropout(0.5))
seq.add(Dense(128, W_regularizer=l2(0.0005), activation='relu', init='glorot_uniform')) # softmax changed to relu
return seq
###########################################################################
How can I fix this error? Thank you so much!
Hello hlamba28,
I have trained the code on 2 dataset CEDAR and BHSig260. I have created train, validation and test set with following partition
Dataset | Total (# writers) | Train | Validation | Test |
---|---|---|---|---|
CEDAR | 55 | 45 | 5 | 5 |
BHSig260 (Bengali) | 100 | 70 | 10 | 20 |
BHSig260 (Hindi) | 160 | 110 | 15 | 35 |
There are total 276 (genuine - genuine)
signature pairs and 276 (genuine - forged)
signature pairs per users for all the dataset.
I am getting results as shown below
Dataset | Accuracy |
---|---|
CEDAR | 100% |
BHSig260 (Bengali) | 50% |
BHSig260 (Hindi) | 50% |
Why accuracy on Bengali and Hindi signatures is low ?
You claimed Accuracy = 81.71% and Threshold = 0.55
for Hindi Signatures, but I am getting only 50%
I tried changing train, validation and test size but test accuracy is stuck 50%
not less not more
hello. i am just curious if the same code will work well if i happen to use gpu~
I need help in plotting FAR or FRR
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.