EPOCHE

Ini bukan siapa yang paling mengenal siapa. Ini hanya soal sudut pandang dan soal kedalaman pengetahuan dan pandangan akan sesuatu yang “dikenali”. Meskipun, beberapa kasus menunjukkan bahwa…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Traffic Signal Detection with YOLOv3

Traffic signals help driver to drive safely. There are multiple thing that every driver has to take care while driving. Traffic signals help them to follow the rules. There are multiple types of signal is available. Some are in words or some has symbols.

Signals helps drive to prevent accidents.

Traffic signal detection tool can be used for car sensors that will help drives to drive safely. Human can miss board signs while driving but a good model with high accuracy can reduce less chance to miss signs. Hence, it is important that let machine do this task.

Dataset containing 900 images along a text file. Text file containing bounding box details like height, width, bottom and top coordinates with image path.

It contains 43 types of traffic signals but each signal comes under 4 type of classes type -prohibitory, mandatory, danger and other.

Sample Image for class
Txt file sample

First I try to check image size of a random image.

sample image without bounding box

Lets see one image with bounding box.

Image with bounding box

Also, I found all image size was same. Hence we do not need any resizing od image.

Lets see Class distribution now. As I mentioned we have 43 types of signals. So, lets see quantity of each signals.

Now, let’s see four main classes.

4 classes distribution

We can see we have class 0 (danger ) having maximum images.

We have image file where we have some images which do not contain any bounding box. Hence, I am creating images folder and storing only those images which has bounding boxes.

Creating Text File storing all class name

I am creating text file which will contain all class name.

Creating Annotation file

I am creating XML file for annotation. It is easy for me as I have alreay used these type of file before.

Creating Tfrecord file

If you are working with large datasets, using a binary file format for storage of your data can have a significant impact on the performance of your import pipeline and as a consequence on the training time of your model. Binary data takes up less space on disk, takes less time to copy and can be read much more efficiently from disk. This is especially true if your data is stored on spinning disks, due to the much lower read/write performance in comparison with SSDs. For further clarification please click on link.

Explain VOLOv3

YOLO v3 is an improvement over previous YOLO detection networks. It is a single-shot detector which also runs quite fast and makes real-time inference possible on GPU devices.

Let us go through some terms required to understand yolo:

YOLOv3 divides the input image into an S×S grid. Each grid cell predicts only one object.

Anchor box:

Anchor box is a prior box that could have different pre-defined aspect ratios. These aspect ratios are determined before training by running K-means on the entire dataset. Anchor boxes are assigned to grid cells and we can determine how much the ground truth box overlap with the anchor box and pick the one with the best IOU.

In YOLO v3, we have three anchor boxes per grid cell. And we have three scales of grids. Therefore, we will have 52x52x3, 26x26x3 and 13x13x3 anchor boxes for each scale. For each anchor box, we need to predict 3 things:

Non maximum Suppression:

YOLO can make duplicate detection’s for the same object. To fix this, YOLO applies non-maximal suppression to remove duplication’s with lower confidence. The detection box with highest score above a threshold value is retained and other boxes are eliminated.

Let’s go through YOLO v3 architecture,

Darknet-53

YOLO v3 uses Darknet-53 as its feature extractor(backbone). The idea of skip connections to help the activations to propagate through deeper layers without gradient diminishing obtained through ResNet is used here.

Since YOLO V3 is designed to be a multi-scaled detector, we also need features from multiple scales. Therefore, features from last three residual blocks are all used in the later detection.

Loss function:

YOLO uses sum-squared error between the predictions and the ground truth to calculate loss. The loss function composes of:

The second part in regression loss is the loss for bounding box width and height. This loss is same as the first part in regression loss.

YOLO v3 loss implementation:

The localization loss, confidence loss and classification loss are calculated by using the values which were computed in previous steps. Finally all these losses are added to obtain YOLO loss.

Training:

The training is done by using the train tfrecord file and validation tfrecord file is used for validation. We need to pass the necessary parameters as well.

Thank you

Reference link:

Add a comment

Related posts:

My BP bass

The largest bass i have caught was around 4 pounds. It was last year durring the summer morning of a birthday slumber party. We all stayed up until 12 am which isnt late, But waking up 4 in the…

Centralized vs. Decentralized Exchange

As the world edges towards adopting secure and trustable digital currencies that cannot be counterfeited, the term cryptocurrency is adored and feared equally among skeptics and believers. As the…

Bibit Alpukat Hass Import Tinggi 50 Cm Badung Terbaik

bibit alpukat hass import tinggi 50 cm alpukat bibit alpukatbibit tinggi real 50 cm up daun rimbun asal bibit sambung susu dan sambungan sudah menyatu dengan batang bawah sudah siap langsung tanam…