Neural network for geometric primitives extraction and location - neural-network

CNN are used to automatic features extraction usually to classify images (dog, cats, etc...). Are there examples of how to use some kind of neural networks for geometric primitives classification and location (i.e. find lines, circles, corners, etc... in an image and their location)?

Just google "neural network looking for geometric in picture" and you will find this with the complete code in github

Related

What are the differences between Artificial Neural Networks (ANN) and Convolutional Neural Networks (CNN)

It has been mentioned in many places that CNNs are very effective for Image Data compared to ANNs.
What exactly are the differences between CNN and ANN (or) what are the key advantages of CNN over ANN for Image Data.
Key advantages of CNN over ANN are
Learns Spatial Hierarchy of Patterns i.e., Higher Layers of CNN are formed by combining Lower Layers. This helps in identifying the Patterns more effectively than ANN
Translation Invariant: Once the CNN has learned to recognize a pattern in one location, it can recognize it in any other
location. In short, learning (weights) can be reused even if the Image is Rotated or Shifted
All the differences between ANN and CNN are mentioned below.
I have added it as a screenshot as I want to represent the differences in a proper Tabular Format.

There are deep learning methods for string similarity in machine translation?

I am interested in machine translation and more specific I would like to examine the similarity between two strings. I would like to know if there are deep learning methods for text feature extraction. I already tried the famous statistics methods like cosine similarity, Levenstein distance, word frequency and others.
Thank you
To find the similarity between 2 string ,try to train a Siamese networks
on your dataset
Siamese networks are a special type of neural network architecture. Instead of a model learning to classify its inputs, the neural networks learns to differentiate between two inputs. It learns the similarity between them.
https://medium.com/#gautam.karmakar/manhattan-lstm-model-for-text-similarity-2351f80d72f1
The below is the link of a kaggle competition ,they have used siamese networks for text simmilarity
https://medium.com/mlreview/implementing-malstm-on-kaggles-quora-question-pairs-competition-8b31b0b16a07
Hope this clears your doubts

Deconvolution with caffe

I was wondering if it is possible to perform a deconvolution of images in Caffe using a point spread function of objective at a given focal point. Something along the lines of this approach.
If yes, what would be the best way to proceed?
It is possible to deconvolve images using Caffe (and CNN in general), but the approach may not be as general as you hope it to be.
CNNs can take blurry image as an input and output sharp image. As the networks are convolutional, the input can be of any size. This can be easily done in Caffe using Convolutional layers and Euclidean Loss layer. Optionally, you can experiment with adding some pooling and deconvolution layers.
CNNs can be trained to deconvolve images for specific blur PSF as in your link. (see: [Xu et al.:Deep Convolutional Neural Network for Image Deconvolution. NIPS 2014]). This works well but you have to re-train the CNN for each new PSF (which takes lot of time).
I've tried to train CNNs to do blind deconvolution (PSF is not known) and it works very well for text documents. You can get trained nets and python-Caffe scripts at [Hradiš et al.: Convolutional Neural Networks for Direct Text Deblurring. BMVC 2015]. This approach could work for other types of images, but it would not work for unrestricted photographs and diverse blurs. For general photos, I would guess It could work for small range of blurs.
Another possibility is to do inverse filtration (e.g. using Wiener filter) and process the output using a CNN. The advantage of this is that you can compute the inverse filter for new PSF very fast and the CNN stays the same. [Schuler et al.: A machine learning approach for non-blind image deconvolution. CVPR 2013]

OCR and Neuron Network?

I am trying to code an OCR for shop tickets (in Java), I have good results with image dictionary distance, but not for skewed texts or bad scans.
I heard that neuronal networks are perfect for this.
Question: which type of neuronal network do you recommand for shop tickets character detection ?
Thks
Neural networks will not magically solve the problem for you. They will have similar problems that your current approach has. Most likely you will have to detect skew and correct it before sending it to a classifier.
Similarly with bad scans. It depends what exactly a bad scan is. For example, some neural networks are amazingly efficient at correcting blurs (unfocused image, blur by move, ...).
Have a look at some papers about OCR and neural networks. It is a classical topic so there are many. For example The Anatomy of Bangla OCR System for Printed Texts Using Back Propagation Neural Network also tries to solve the problem of skewed images before running a neural network.
I know that recurrent neural networks can be used for OCR. Even a very simple one will easily recognize simple characters. There is a recent paper that improves upon them: High-Performance OCR forPrinted English and Fraktur using LSTM Networks. They even include text-line normalization which may be very useful in your case.
Notice that there is an answer here about training a normal Feed-forward backpropagation neural network for OCR too: training feedforward neural network for OCR
"Convolutional Neural Networks" with "Deep Learning" have been shown to give some of the best results in OCR (specifically on the MNIST database).
A good starting point is this tutorial.

how to write a matlab code for a pattern recognition in neural network

I have a different sets of vectors for an object. These vectors are different and are extracted from a particular shape. I want to train my Neural Network in matlab to recognize this particular shape. So that when I input another different vectors of similarity of that particular object, the neural network is able to differentiate and output either '1' or '0'
I am new to this neural network stuffs and I hope that someone could give me some valuable pointers.
First of all have a look to this pdf explaining the Neural Network Toolbox.
Here you can download a tutorial on pattern recognition with neural networks with matlab.
I hope this helps on your task.
To understand machine learning concepts in general and neural networks in particular, this resource will be usefull www.ml-class.org