Segmentation of data from a video camera

Introduction

In the modern world, the task of segmentation, as it turned out, is solved once or twice, although I thought it was something complicated and surprising. All that is needed is to read a couple of articles, install certain libraries and mark up the data, everything about everything takes a couple of hours of time, except for creating a test sample.

Data markup

This step in the implementation of video stream frame segmentation is one of the most labor-intensive in terms of human work.

To do this, you need to use special programs for marking the frames of the video stream. We just open the required video file with this program, and mark up the frames, having previously created classes into which we will segment the images. In my introductory example, the frames are divided into the following classes (Car, Road, Pedestrian Crossing, Lawn, Buildings, People, Sidewalk, Road Markings).

In fact, positions such as road, buildings, lawns, sidewalks, etc. it is possible not to recognize it, since the camera in this case is rigidly fixed and therefore these areas will always be in the same place.

Figure:  1 Program for marking frames of a video stream
Figure: 1 Program for marking frames of a video stream

Training a neural network for image segmentation

( , ).

.

, . 4 (, , ... , , , ) 60 DeepLab v3+ ( ResNet-18). . 2.

, , , . .

Figure:  2 Using a fast-training neural network for image segmentation
. 2

, (. 3 4), .

Figure:  3 Creating a mask for the road segment of interest
. 3
Figure:  4 Created mask of the road segment of interest
. 4

, (. 5 6).

Figure:  6 Segmentation of the road section of interest
. 6

, , (. 7 9). (. 8).

3%, 54%. , . , , , . .

Figure:  7 The percentage of the area of ​​cars to the area of ​​the road and its elements is ~ 3%
. 7 ~3%
Figure:  8 Analysis of traffic congestion at busy times
. 8
Figure:  9 The percentage of the area of ​​cars to the area of ​​the road and its elements is ~ 54%
. 9 ~54%

, . ( ), , .

- , . ( , ), . ., . , . , , . , , , , , , .

PS If anyone knows what software can be used to record a video stream from a YouTube stream as simply as possible?) The cameras simply write data to a circular buffer (the last 12 hours) in the form of a YouTube stream, thus forming a video surveillance, where every resident of the house can view the last 12 hours.




All Articles