Recommendations for choosing an algorithm

I need to make a project that tries to scan the shape of vehicles and determine what type of vehicle it is performing, scanning will be performed using sensors called a “scanner”, they are only 50 rays of light, each ray from the receptor and radiation, as shown in figure:

enter image description here

I get the initial state of each beam (block or unlock) from the sensors, and with this continuous scan we can create a very low resolution image of the vehicle.

My question is what algorithms / methods can I use to detect and identify the shape of the vehicle, we want to count the wheels, and if possible, try to determine if this figure is a car or a truck or a pickup, etc .., at least we want to count the wheels.

I am considering learning a neural network, but perhaps this may be a simpler approach to detecting the kind that I can use, and I don't know. Any other suggestions / tips would be highly appreciated

+6
source share
3 answers

A standard neural network will be a smart choice and will work, however, perhaps the best choice would be a convolutional neural network (CNN) ( see this for a quick explanation ). CNNs are great for image recognition because their sparse connection allows for spatially local correlation (i.e., take into account the relationship between inputs in close proximity to each other), which means that they generalize to new data more efficiently than standard neural networks, as well as train faster.

To determine the number of wheels, you can split the low-resolution input into several overlapping "wheel sizes" of patches, and then use each patch as an input to CNN that has been trained to detect wheels. Since it is possible to return CNN for multiple patches around the same wheel, it will be necessary to perform a proximity check so that each local “true” patch causes only a single increase in the total counter. This can be done by identifying the local patch with the highest node performance and preventing any other patch within the circle of this patch from affecting the total counter.

Identifying the shape as a car or truck would actually be a simpler task, since the whole image could be submitted to CNN, trained in the selection of pre-classified images of vehicles. One could get around the compression / stretching effect of speed by supplementing training datasets with random tensile / tensile strains. For information on how to configure the parameters in CNN, see how you define the convolutional neural network parameters for image classification.

As proof of how effective CNN is, take a look at the results of the Big Scale Visual Recognition Challenge 2012 (LSVRC) . LSVRC is an image classification competition in which competitors competed to achieve the smallest classification error with an arbitrary 256x256 image selection. The winning network, called Supervision, achieved nearly half the error of its closed competitor using the CNN model. CNNs also contain a record for maximum accuracy in many text recognition tasks, such as the MNIST digit recognition task , in which the model scored 99.8% accuracy, an accuracy that compares human recognition rates.

+5
source

You should be able to get the car, the height (to the maximum height), possibly the number of wheels, the location / shape of the windows (if the rays pass through the windows) and the general shape.

Perhaps you can only have a template (or several templates) for how the side profile of a car, truck, van looks like. You can then stretch each pattern to size measurements and subtract the recorded shape from the shape of the pattern. The template with the smallest difference is the closest match. This can be improved by allowing the figure to be more volatile. For example, the hood height could be moved up or down to some extent based on the minimum / maximum values ​​of the ratio of hood height to roof height. If you have a set of such coefficients (or actual recorded values ​​if you find them on the Internet) and patterns, then you should be able to do quite well. You can get these ratios just by analyzing a few photos of the car.

This should work well enough if you have good, representative patterns and don't try to be too specific as to what a car is. For example, finding templates that you can use to talk about the difference between a crossover and a van can be difficult, given how your system is declared to work, but should work fine if you allow a little deviation from what a crossover is. classified as.

Edit:

Actually, you can use one template and just have several customizable points (up to 10 such points), the configuration of which can be used to classify the vehicle. A few examples:

  • Start hood
  • Hood / Windshield Intersection
  • Roof / Windshield Intersection
  • The intersection of the tire / body (2 such points for each tire)

The result would be a blocky, but fairly accurate form of car. Roughly where these points are and if they exist at all, they should be useful for indicating the type of vehicle. Although fixed templates would be much simpler, and if you say that the van is listed as a truck, you can probably use this van as an additional template for the van.

+1
source

You will be concerned that a car’s speed as a faster car will give you fewer observations that would be inaccurate. The following is an example verification: -

Algorithm: -

1. Height is accurate metric to check as it is not affected by speed 2. get a median of all the heights you get , that would be close to exact height. 3. you can also evaluate the width which is not correct as speed can change. 4. ratio height/width can be checked. 5. there are certain ranges of height/width ratio for car,truck etc. 6. height can mostly classify between truck and cars. 7. ratio of height/width can be used to scale the image to correct range. 8. After scaling you might give that image to neural network which you trained. 9. train neural network with already gathered real life observations if you can. 10. May be you can also create a simulation by 3d modelling and animation. 
0
source

Source: https://habr.com/ru/post/974123/


All Articles