Coder Social home page Coder Social logo

r-stefano / remote-sensing-analysis Goto Github PK

View Code? Open in Web Editor NEW
21.0 1.0 5.0 217.29 MB

Implementing a remote sensing object detector using Tensorflow object detection API

Home Page: http://www.stefanorosa.me/topicboard/artificialIntelligence/carDetection

Python 100.00%
satellite-images cars detection-api tensorflow street analysis car retinanet retina-image-analysis satellite-imagery satellite-data object-detection

remote-sensing-analysis's Introduction

Detecting Cars From Satellite Images using RetinaNet

About

Nowadays, Google and Apple have access to a huge number of mobile phones. These devices provide information about where we are and what type of transportation we are using. Although, Google is already using these information to suggest alternative routes, a smart management of: traffic lights, bridges, railway crossings and road works could further decrease the congestion problem.

An alternative source of information could be remote sensing images to get a real-time analysis of the number of cars on the street. So I thought that could be interesting to develop a system able to determine the number of cars on the street in order to help to relieve car congestion. I decided to start with something of relative simple to get an understanding of the tools that I can use and how to efficiently apply them.

This first phase of the project focuses on developing an algorithm able to localize cars from satellite images.

The article about this project can be found Here

Dependencies

  • Tensorflow
  • Numpy
  • opencv
  • Object Detection API
sudo pip3 install tensorflow 
sudo pip3 install opencv-python

How to setup the Tensorflow's object detection API

Training Setup

If you want to re-train the model to try to get better results. Run this command

wget ftp://gdo152.ucllnl.org/cowc/datasets/ground_truth_sets/*

copy the files inside the folders: Postdam, Selwyn, Toronto and Utah into a folder called dataset. Get rid of all the files excpeted the satellite images and their positive annotated images.

Then, create a folder called data and run

python generate-TFFormat.py

As the filename says, this command will create the shard files used for train and test and put into the data folder.

Note: The data folder must be inserted into models/research/

The next step is to download the model's weights and its configuration file.

While the model's weights are going to be stored into models/research/, the configuration file should be renamed as model.config, properly modified and put into models/research/data.

Always in models/research/data, create a file called labels.pbtxt with the following content:

item {
	id: 1
	name: 'car'
}

Finally, train the model running:

python object_detection/model_main.py \
--pipeline_config_path=data/model.config \
--model_dir=myModel \
--num_train_steps=50000 \
--sample_1_of_n_eval_examples=1 \
--alsologtostderr

Prediction

On the other hand, if you just want to analyze an image you can run

python predict.py <imagename>

remote-sensing-analysis's People

Contributors

r-stefano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.