Giter VIP home page Giter VIP logo

tamasino52 / railroad_and_obstacle_detection Goto Github PK

View Code? Open in Web Editor NEW
25.0 2.0 5.0 1.03 GB

This program detect and identify obstacle on railway. If program detect some obstacle that train must stop, program gives you warning sign. This program Also estimate riskiness of obstacle how it is negligible or not. We provide many models to you to detect railways and obstacles.

Jupyter Notebook 97.15% Python 2.85%
obstacle-detection segmentation-model railway railroad deep-learning unet faster-rcnn tensorflow

railroad_and_obstacle_detection's Introduction

Project General Outline

Hits

This is project for Spartan SW cooperation in Soongsil University

Our topic starts to set a camera on the front of the train to detect tracks and obstacles. The system is designed to minimize casualties and property damage by sending a signal to the engineer when the detected obstacle is on the track and there is a possibility of serious casualties or equipment damage in the event of a collision. For this purpose, the image of the track and the masked data were studied to create a Segmentation Model. Also we selected Object Detection Deep Learning Model to recognize obstacle.

The data used for learning was prepared with track and train models and taken in a controlled environment. Our ultimate goal is to detect and signal the driver, even when any obstacles are detected, but because this project was designed for demonstration rather than for actual commercialization, we planned to learn only a few pre-selected obstacles and demonstrate them in a controlled environment. And because the number of used data is low, we've use Augmentation it in a variety of ways.

Award & Performance

  1. Bronze Prize on Software Contest In Soongsil Univercity 2019.11.07
  2. Korean Software Registeration - Railway Obstacle Detection System(RODS) / Railroad Tracker 2019.11.30
  3. Patent Registeration - Railroad Obstacle Detection System(RODS) 2019.11.30

Models

  1. Railway Segmentation model : U-net
  2. Obstacle Detection model : Faster-RCNN-Inception-V2

We used some of EdjeElectronics's code to design the model. The original author's Githeub code address is as follows. https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10

Workflow:

  1. Setting for training
  2. Training model(You can skip this to download pretrained models)
  3. Run Project

Time Estimated: 8 hours

By: Kim Minseok, Department of Software in Soongsil University / Lee Juhee, Department of Software in Soongsil University

Setting for training

Our project based on anaconda, tensorflow-gpu, jupyter notebook and etc. So you have to install these first. Also, I made this project on CUDA 10.0 and cuDNN 7.3 environment. If you install another version, I don't warrant about result. I recommand to activate this code on virtual anaconda setting.

How to run

  1. Clone our git first https://github.com/tamasino52/Railroad_and_Obstacle_detection
  2. Clone https://github.com/tensorflow/models git
  3. Download trained Unet model from (Put file in models/research/object_detection/models ) https://drive.google.com/file/d/18Y_EbJV9s4eJmFDg69uH46xgynHb9vNl/view?usp=sharing
  4. Move our all file to 'models/research/object_detection'
  5. Download faster_rcnn_inception_v2_coco_2018_01_28 model from https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md
  6. Move model file to 'faster_rcnn_inception_v2_coco_2018_01_28' folder in 'models/research/object_detection'
  7. Run 'RailwayTrackingModel_Training.ipynb' file to generate model
  8. Run 'ObstacleDetectionModel_Training.ipynb' file to generate seccond model
  9. Run 'Run.py' file(for video and image) or 'Run.ipynb' file(only for image) to activate project 9-1. If you want to use captured image, Run 'Run_capture.py'. After you run, Click and Drag points that you want to capture. Then check your valid yellow box, press 'esc' to activate project.

Simulation Result

Postscript

  • If you are looking at this repo because you are interested in predicting railway, please refer to it here because a better version has been released than here. This repository only predicted with computer vision technology. But this is much faster and more accurate.

railroad_and_obstacle_detection's People

Contributors

lhju4e avatar tamasino52 avatar

Stargazers

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

Watchers

 avatar  avatar

railroad_and_obstacle_detection's Issues

google drive is 404

In the section about How to run,I can't download trained Unet model beacause the link is 404. Additonally, Can you tell me What Step 4 in the section how to run means? Where are your all files ? Please~~~~~~

missing csv?

File "pandas/_libs/parsers.pyx", line 382, in pandas._libs.parsers.TextReader.cinit
File "pandas/_libs/parsers.pyx", line 689, in pandas._libs.parsers.TextReader._setup_parser_source
FileNotFoundError: [Errno 2] File b'./object_detection/images/test_labels.csv' does not exist: b'./object_detection/images/test_labels.csv'

while running the step 7, the following error pops out, and looks like i'm missing a few folders ?

Model file not available

faster_rcnn_inception_v2_coco_2018_01_28 model link is not working and there is no file there

where is proto files?

In ObstacleDetectionModel_Training.ipynb
!protoc --python_out=. .\object_detection\protos\anchor_generator.proto .\object_detection\protos\argmax_matcher.proto .\object_detection\protos\bipartite_matcher.proto .\object_detection\protos\box_coder.proto .\object_detection\protos\box_predictor.proto .\object_detection\protos\eval.proto .\object_detection\protos\faster_rcnn.proto .\object_detection\protos\faster_rcnn_box_coder.proto .\object_detection\protos\grid_anchor_generator.proto .\object_detection\protos\hyperparams.proto .\object_detection\protos\image_resizer.proto .\object_detection\protos\input_reader.proto .\object_detection\protos\losses.proto .\object_detection\protos\matcher.proto .\object_detection\protos\mean_stddev_box_coder.proto .\object_detection\protos\model.proto .\object_detection\protos\optimizer.proto .\object_detection\protos\pipeline.proto .\object_detection\protos\post_processing.proto .\object_detection\protos\preprocessor.proto .\object_detection\protos\region_similarity_calculator.proto .\object_detection\protos\square_box_coder.proto .\object_detection\protos\ssd.proto .\object_detection\protos\ssd_anchor_generator.proto .\object_detection\protos\string_int_label_map.proto .\object_detection\protos\train.proto .\object_detection\protos\keypoint_box_coder.proto .\object_detection\protos\multiscale_anchor_generator.proto .\object_detection\protos\graph_rewriter.proto .\object_detection\protos\calibration.proto .\object_detection\protos\flexible_grid_anchor_generator.proto

it can't work,and say:".object_detectionprotosanchor_generator.proto: No such file or directory"
How can I solve it please?

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.