Adam Carter

Adam Carter

1614097320

Road Damage Detection for Multiple Countries using YOLOv3

As a part of self case study on Deep learning, I selected a problem on detecting Road damage for multiple countries which is a major issues in almost every countries around the globe.

In this blog, I will explain you how I approached the problem and solved this problem using YOLOv3 architecture inorder to detect road damages for Indian and Japan roads.

Business Problem:

Road infrastructure plays crucial role in saving lives and economic development of a country, so to reduce the road accidents due to potholes and damaged roads it’s an important task to manage and inspect the roads on a timely basis because roads deteriorate over time considering various factors related to location,age, temperature etc. Visual inspection of roads by engineers is very time consuming given the extensive length of roads or highways. So to come up with an automated AI based solution which can detect the type of damage can help and improve the way of monitoring of road conditions.

So the main agenda of this problem is to analyze how can we utilize the Japanese dataset to detect road damages in other countries by adding that country’s images where AI system has to develop.

Dataset:

For this problem, I collected dataset from this link.

This dataset consists of three zip files one for training data and other two for test data containing Images and xml files with annotations. And for this problem

  1. train.tar : This file comprising of 26620 images and its respective annotation xml files collected from three different countries i.e Japan, India and Czech , Japan dataset has more number of images as compared to India and Czech generated using smartphones.
  2. test1.tar : This file comprising of 2282 images except without annotation files as I have to test model performance on this images.

#deep-learning #tensorflow #tensorflow-lite #yolov3

What is GEEK

Buddha Community

Road Damage Detection for Multiple Countries using YOLOv3

I am Developer

1597487833

Country State City Drop Down List using Ajax in Laravel

Here, i will show you how to create dynamic depedent country state city dropdown list using ajax in laravel.

Country State City Dropdown List using Ajax in php Laravel

Follow Below given steps to create dynamic dependent country state city dropdown list with jQuery ajax in laravel:

  • Step 1: Install Laravel App
  • Step 2: Add Database Details
  • Step 3: Create Country State City Migration and Model File
  • Step 4: Add Routes For Country State City
  • Step 5: Create Controller For Fetch Country State City
  • Step 6: Create Blade File For Show Dependent Country State City in Dropdown
  • Step 7: Run Development Server

https://www.tutsmake.com/ajax-country-state-city-dropdown-in-laravel/

#how to create dynamic dropdown list using laravel dynamic select box in laravel #laravel-country state city package #laravel country state city drop down #dynamic dropdown country city state list in laravel using ajax #country state city dropdown list using ajax in php laravel #country state city dropdown list using ajax in laravel demo

I am Developer

1597487472

Country State City Dropdown list in PHP MySQL PHP

Here, i will show you how to populate country state city in dropdown list in php mysql using ajax.

Country State City Dropdown List in PHP using Ajax

You can use the below given steps to retrieve and display country, state and city in dropdown list in PHP MySQL database using jQuery ajax onchange:

  • Step 1: Create Country State City Table
  • Step 2: Insert Data Into Country State City Table
  • Step 3: Create DB Connection PHP File
  • Step 4: Create Html Form For Display Country, State and City Dropdown
  • Step 5: Get States by Selected Country from MySQL Database in Dropdown List using PHP script
  • Step 6: Get Cities by Selected State from MySQL Database in DropDown List using PHP script

https://www.tutsmake.com/country-state-city-database-in-mysql-php-ajax/

#country state city drop down list in php mysql #country state city database in mysql php #country state city drop down list using ajax in php #country state city drop down list using ajax in php demo #country state city drop down list using ajax php example #country state city drop down list in php mysql ajax

How to Build an Object Tracker Using YOLOv3, Deep SORT and TensorFlow

Object Tracking using YOLOv3, Deep Sort and Tensorflow

Learn how to build an Object Tracker using YOLOv3, Deep SORT, and Tensorflow! Run the real-time object tracker on both webcam and video. This guide will show you how to get the necessary code, setup required dependencies and run the tracker.

This repository implements YOLOv3 and Deep SORT in order to perfrom real-time object tracking. Yolov3 is an algorithm that uses deep convolutional neural networks to perform object detection. We can feed these object detections into Deep SORT (Simple Online and Realtime Tracking with a Deep Association Metric) in order for a real-time object tracker to be created.

Demo of Object Tracker

Getting started

Conda (Recommended)

# Tensorflow CPU
conda env create -f conda-cpu.yml
conda activate tracker-cpu

# Tensorflow GPU
conda env create -f conda-gpu.yml
conda activate tracker-gpu

Pip

# TensorFlow CPU
pip install -r requirements.txt

# TensorFlow GPU
pip install -r requirements-gpu.txt

Nvidia Driver (For GPU, if you haven't set it up already)

# Ubuntu 18.04
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt install nvidia-driver-430
# Windows/Other
https://www.nvidia.com/Download/index.aspx

Downloading official pretrained weights

For Linux: Let's download official yolov3 weights pretrained on COCO dataset.

# yolov3
wget https://pjreddie.com/media/files/yolov3.weights -O weights/yolov3.weights

# yolov3-tiny
wget https://pjreddie.com/media/files/yolov3-tiny.weights -O weights/yolov3-tiny.weights

For Windows: You can download the yolov3 weights by clicking here and yolov3-tiny here then save them to the weights folder.

Using Custom trained weights

Learn How To Train Custom YOLOV3 Weights Here: https://www.youtube.com/watch?v=zJDUhGL26iU

Add your custom weights file to weights folder and your custom .names file into data/labels folder.

Saving your yolov3 weights as a TensorFlow model.

Load the weights using load_weights.py script. This will convert the yolov3 weights into TensorFlow .tf model files!

# yolov3
python load_weights.py

# yolov3-tiny
python load_weights.py --weights ./weights/yolov3-tiny.weights --output ./weights/yolov3-tiny.tf --tiny

# yolov3-custom (add --tiny flag if your custom weights were trained for tiny model)
python load_weights.py --weights ./weights/<YOUR CUSTOM WEIGHTS FILE> --output ./weights/yolov3-custom.tf --num_classes <# CLASSES>

After executing one of the above lines, you should see proper .tf files in your weights folder. You are now ready to run object tracker.

Running the Object Tracker

Now you can run the object tracker for whichever model you have created, pretrained, tiny, or custom.

# yolov3 on video
python object_tracker.py --video ./data/video/test.mp4 --output ./data/video/results.avi

#yolov3 on webcam 
python object_tracker.py --video 0 --output ./data/video/results.avi

#yolov3-tiny 
python object_tracker.py --video ./data/video/test.mp4 --output ./data/video/results.avi --weights ./weights/yolov3-tiny.tf --tiny

#yolov3-custom (add --tiny flag if your custom weights were trained for tiny model)
python object_tracker.py --video ./data/video/test.mp4 --output ./data/video/results.avi --weights ./weights/yolov3-custom.tf --num_classes <# CLASSES> --classes ./data/labels/<YOUR CUSTOM .names FILE>

The output flag saves your object tracker results as an avi file for you to watch back. It is not necessary to have the flag if you don't want to save the resulting video.

There is a test video uploaded in the data/video folder called test.mp4. If you followed all the steps properly with the pretrained coco yolov3.weights model then when your run the object tracker wiht the first command above you should see the following.

Video Example

Demo of Object Tracker

Webcam Example

This is a demo of running the object tracker using the above command for running the object tracker on your webcam. Webcam Demo

Command Line Args Reference

load_weights.py:
  --output: path to output
    (default: './weights/yolov3.tf')
  --[no]tiny: yolov3 or yolov3-tiny
    (default: 'false')
  --weights: path to weights file
    (default: './weights/yolov3.weights')
  --num_classes: number of classes in the model
    (default: '80')
    (an integer)
    
object_tracker.py:
  --classes: path to classes file
    (default: './data/labels/coco.names')
  --video: path to input video (use 0 for webcam)
    (default: './data/video/test.mp4')
  --output: path to output video (remember to set right codec for given format. e.g. XVID for .avi)
    (default: None)
  --output_format: codec used in VideoWriter when saving video to file
    (default: 'XVID)
  --[no]tiny: yolov3 or yolov3-tiny
    (default: 'false')
  --weights: path to weights file
    (default: './weights/yolov3.tf')
  --num_classes: number of classes in the model
    (default: '80')
    (an integer)
  --yolo_max_boxes: maximum number of detections at one time
    (default: '100')
    (an integer)
  --yolo_iou_threshold: iou threshold for how close two boxes can be before they are detected as one box
    (default: 0.5)
    (a float)
  --yolo_score_threshold: score threshold for confidence level in detection for detection to count
    (default: 0.5)
    (a float)

Acknowledgments

Download Details:
 

Author: theAIGuysCode
Download Link: Download The Source Code
Official Website: https://github.com/theAIGuysCode/yolov3_deepsort 
License: GPL-3.0 license

Subscribe: https://www.youtube.com/c/TheAIGuy/featured 

#tensorflow #yolov3 #python

Seamus  Quitzon

Seamus Quitzon

1595201363

Php how to delete multiple rows through checkbox using ajax in laravel

First thing, we will need a table and i am creating products table for this example. So run the following query to create table.

CREATE TABLE `products` (
 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
 `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
 `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 `updated_at` datetime DEFAULT NULL,
 PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

Next, we will need to insert some dummy records in this table that will be deleted.

INSERT INTO `products` (`name`, `description`) VALUES

('Test product 1', 'Product description example1'),

('Test product 2', 'Product description example2'),

('Test product 3', 'Product description example3'),

('Test product 4', 'Product description example4'),

('Test product 5', 'Product description example5');

Now we are redy to create a model corresponding to this products table. Here we will create Product model. So let’s create a model file Product.php file under app directory and put the code below.

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Product extends Model
{
    protected $fillable = [
        'name','description'
    ];
}

Step 2: Create Route

Now, in this second step we will create some routes to handle the request for this example. So opeen routes/web.php file and copy the routes as given below.

routes/web.php

Route::get('product', 'ProductController@index');
Route::delete('product/{id}', ['as'=>'product.destroy','uses'=>'ProductController@destroy']);
Route::delete('delete-multiple-product', ['as'=>'product.multiple-delete','uses'=>'ProductController@deleteMultiple']);

#laravel #delete multiple rows in laravel using ajax #laravel ajax delete #laravel ajax multiple checkbox delete #laravel delete multiple rows #laravel delete records using ajax #laravel multiple checkbox delete rows #laravel multiple delete

Adam Carter

Adam Carter

1614097320

Road Damage Detection for Multiple Countries using YOLOv3

As a part of self case study on Deep learning, I selected a problem on detecting Road damage for multiple countries which is a major issues in almost every countries around the globe.

In this blog, I will explain you how I approached the problem and solved this problem using YOLOv3 architecture inorder to detect road damages for Indian and Japan roads.

Business Problem:

Road infrastructure plays crucial role in saving lives and economic development of a country, so to reduce the road accidents due to potholes and damaged roads it’s an important task to manage and inspect the roads on a timely basis because roads deteriorate over time considering various factors related to location,age, temperature etc. Visual inspection of roads by engineers is very time consuming given the extensive length of roads or highways. So to come up with an automated AI based solution which can detect the type of damage can help and improve the way of monitoring of road conditions.

So the main agenda of this problem is to analyze how can we utilize the Japanese dataset to detect road damages in other countries by adding that country’s images where AI system has to develop.

Dataset:

For this problem, I collected dataset from this link.

This dataset consists of three zip files one for training data and other two for test data containing Images and xml files with annotations. And for this problem

  1. train.tar : This file comprising of 26620 images and its respective annotation xml files collected from three different countries i.e Japan, India and Czech , Japan dataset has more number of images as compared to India and Czech generated using smartphones.
  2. test1.tar : This file comprising of 2282 images except without annotation files as I have to test model performance on this images.

#deep-learning #tensorflow #tensorflow-lite #yolov3