Git Product home page Git Product logo

deeptest's Introduction

DeepTest: Automated testing of deep-neural-network-driven autonomous cars

DeepTest is a systematic testing tool for automatically detecting erroneous behaviors of DNN-driven vehicles that can potentially lead to fatal crashes.

Install Required Packages

OS: Ubuntu 16.04
Read through and run ./install.sh

Code Directories

models/

  • Reproducing Udacity self-driving car Challenge2[1] results for Rambo, Chauffeur and Epoch models.
  • Models and weights files are required to run these scripts.
  • For Rambo model, Keras backend should be changed to theano.

testgen/

  • Generate synthetic images, calculate cumulative coverage and record predicted outputs.
  • ncoverage.py: define NCoverage class for computing neuron coverage.

guided/

  • Combine different transformations and leverage neuron coverage to guide the search.
  • Re-runing the script will continue the search instead of starting from the beginning except deleting all pkl files.

metamorphictesting/

Models and Saved Weights

  • Rambo [2]
  • Chauffeur [3]
  • Epoch [4]

Datasets

Generate hmb3 dataset from HMB_3.bag

mkdir hmb3
python generate_hmb3.py --bagfile HMB_3.bag

The following commands are to install python-rosbag api.

sudo apt-get install python-rosbag
sudo apt-get install python-genmsg
sudo apt-get install python-genpy
sudo apt-get install python-rosgraph-msgs

Reproducing experiments

Dataset directory structure:

./Dataset/
├── hmb3/
        └── hmb3_steering.csv
        └── images
└── Ch2_001/
        └── center/
                 └── images
        └── CH2_final_evaluation.csv

Evaluating models' accuracy on existing test data

cd models/
python epoch_reproduce.py --dataset DATA_PATH/Dataset/
python chauffeur_reproduce.py --dataset DATA_PATH/Dataset/
python rambo_reproduce.py --dataset DATA_PATH/Dataset/

Generate synthetic images and compute cumulative neuron coverage

cd testgen/
./epoch_testgen_driver.sh 'DATA_PATH/Dataset/'
./chauffeur_testgen_driver.sh 'DATA_PATH/Dataset/'
python rambo_testgen_coverage.py --dataset DATA_PATH/Dataset/

Combine transformations and synthesize images by guided search

cd guided/
mkdir new/
rm -rf *.pkl
python epoch_guided.py --dataset DATA_PATH/Dataset/
python chauffeur_guided.py --dataset DATA_PATH/Dataset/
python rambo_guided.py --dataset DATA_PATH/Dataset/

Detected erroneous behaviors

https://deeplearningtest.github.io/deepTest/

Citation

If you find DeepTest useful for your research, please cite the following paper:

@article{tian2017deeptest,
  title={DeepTest: Automated testing of deep-neural-network-driven autonomous cars},
  author={Tian, Yuchi and Pei, Kexin and Jana, Suman and Ray, Baishakhi},
  journal={arXiv preprint arXiv:1708.08559},
  year={2017}
}

References

  1. Udacity self driving car challenge 2.
    https://github.com/udacity/self-driving-car/tree/master/challenges/challenge-2. (2016).
  2. Rambo model.
    https://github.com/udacity/self-driving-car/tree/master/steering-models/community-models/rambo. (2016).
  3. Chauffeur model.
    https://github.com/udacity/self-driving-car/tree/master/steering-models/community-models/chauffeur. (2016).
  4. Epoch model.
    https://github.com/udacity/self-driving-car/tree/master/steering-models/community-models/cg23. (2016).

deeptest's People

Contributors

ariselab avatar yuchi1989 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  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  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  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deeptest's Issues

Cannot find HMB3.bag file

I tried running this command
python generate_hmb3.py --bagfile HMB_3.bag

but there was no HMB3.bag file so I tried to retrieve it from the link provided in the README (https://github.com/udacity/self-driving-car/blob/master/datasets/CH2/HMB_3.bag.tar.gz.torrent) but I only downloaded a torrent file. I tried using a bitTorrent client to unpack it but it does not seem to be seeding.

I would be really appreciate your help if you could point me in the right direction of getting this HMB_3.bag file so that I could carry out the DeepTest algorithm. Thank you for also providing this source code for the community to learn.

Transformation values for Guided Transformation

Hi @yuchi1989,
Greetings! Thanks for sharing the source code. I am trying to execute the code for Guided Transformation (Algorithm # 1 from the deepTest paper). I noticed that the rambo_guided.py uses a set of image transformation values (line # 358 - line #354) that is different from the values discussed in the paper (Table 4). Can you please help me understand why a different set of transformation values was used for Guided Transformation experiments?

Thanks,
Jagan

Using other HMB_ bag files

Hello and thank you for the deepTest code,

Unfortunately, I couldn't find the HMB_3 bag file so I wanted to use the other HMB_1, HMB2, files from CH2_002 dataset, however I get "list index out of bounds" errors when I try to do that. How can I use another dataset with deepTest?

Kind regards,

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.