Accelerated SVM training for HOG algorithm - opencv

Let's say I have a perfect 3D model of the rigid object I am looking for.
I want to find this object in a scene image using the histogram of oriented gradients (HOG) algorithm.
One way to train my SVM would be to render this object on top of a bunch of random backgrounds, in order to generate the positive training examples.
But, is there a faster, more direct way to use the model to train the SVM? One that doesn't involve rendering it multiple times?

Related

Reusing image-to-image GANs for spatial denoising of trajectories

I work on particle tracking experiments that generate trajectories (x and y coordinates over time) from videos. Some experimental setups result in trajectories with a lot of spatial noise.
I'm looking into using machine-learning models to denoise those trajectories, as our available algorithmic methods are limited. My goal is to train the model with two inputs : simulated trajectories as ground truth, and the same trajectories with induced noise.
So far, most of the solutions I found regarding multiple inputs models that aren't classification or regression point to CNNs. However, I came across image-to-image denoising models (such as https://arxiv.org/abs/1611.07004) which seem to work based on the same relation between inputs, although with a different shape.
Could it be feasible to readapt such a model for this purpose ?

Image enhancement before CNN helpful?

I have a Deep learning model ( transfer learning based in keras) to do regression problem on medical images. Does it help or have any logical idea or doing some image enhancements like strengthening the edges or doing histogram equalization before feeding the inputs to the CNN?
It is possible to train model accurately by using something you told.
For training CNN model with data, they almost use image augmentation in pre-processing phase.
There are list usually used in augmentation.
color noise
transform
rotate
whitening
affine
crop
flip
etc...
You can refer to here

SMOTE oversampling for anomaly detection using a classifier

I have sensor data and I want to do live anomaly detection using LOF on the training set to detect anomalies and then apply the labeled data to a classifier to do classification for new data points. I thought about using SMOTE because I want more anamolies points in the training data to overcome the imbalanced classification problem but the issue is that SMOTE created many points which are inside the normal range.
how can I do oversampling without creating samples in the normal data range?
the graph for the data before applying SMOTE.
data after SMOTE
SMOTE is going to linearly interpolate synthetic points between a minority class sample's k-nearest neighbors. This means that you're going to end up with points between a sample and its neighbors. When samples are all over the place like this, it makes sense that you're going to create synthetic points in the middle.
SMOTE should really be used to identify more specific regions in the feature space as the decision region for the minority class. This doesn't seem to be your use case. You want to know which points "don't belong," per se.
This seems like a fairly nice use case for DBSCAN, a density-based clustering algorithm that will identify points beyond some distance, eps, as not belonging to the same neighborhood.

How to use 2D ConvNets on 3D data

I have just started to study ConvNets and I have a question on how to train them.
Actually what I have understood is that one can use a CNN to extract features from images, even on pictures that are different from those used to train the network.
Since I would like to use a ConvNet (such as Vgg or Inception), I would also like to start from a trained network and continue its training in order to improve the weights using my dataset.
The problem is that I have 3D data and the most powerful CNNs are designed to use 2D data! Is there a smart way to feed the 2D ConvNet with 3D data which is not a raw averaging of the slices of the 3D images?
Thank you!
You can convert your 3D data to 2D by just concatenating the slices (you put them together in one large 2D image).

How can I classify a person by identification of shape?

I have a program which detect a moving object and I want to classify these objects by identifying the shape of each one with a dataset of shapes.Can any one have any idea how to compare the shape of each object with the dataset using some points of the current shape and compare it with the samples?
image1
detected object1
From the theory point of view you should start off reading two papers
1) HOG detectors by Dalal and Trigs
2) Chamfer Detectors by Gavrila
If you just want to use the edge information, Chamfer is the solution. From my experience it fails miserably on cluttered scenes. HOG produces far superior results.
OpenCV already has human body detector implemented
If you are looking for a Machine Learning adventure why not train your own HOG detector using OpenCV train_cascade? It is very fast and real time

Resources