Skip to content

DrChanging/anomaly_detector

 
 

Repository files navigation

anomaly_detector

WORK IN PROGRESS! Detect anomalies in images using deep features

Install

python -m virtualenv .env           # Create virtualenv
source .env/bin/                    # Activate it
pip install -r requirements.txt     # Install the python dependencies

pip install -e .    # Install current directory as editable pip package

Note that if you want to be able to use the rosbag_to_... scripts to extract images and metadata from bag files you need to have at least

  • a bare bones ROS (Kinetic) and
  • the cv_bridge package installed (sudo apt-get install ros-kinetic-cv-bridge).

Constants

Create a file ./anomaly_detector/consts.py with the following constants for quick debug excecutions:

IMAGES_PATH   = "/path/to/Images/"
EXTRACT_FILES = "/path/to/Images/*.jpg"
FEATURES_PATH = "/path/to/Features/"
FEATURES_FILE = FEATURES_PATH + "C3D.h5"
FEATURES_FILES = FEATURES_PATH + "*.h5"

# Defaults for feature extraction
DEFAULT_BATCH_SIZE = 128

Data preparation

Bag fileTFRecord file(s)Feature extractorAnomaly model

rosbag_to_tfrecord

A small script to convert bag files to TensorFlow TFRecords. Will as of now only include an image topic with position and rotation from /tf.

Usage

python rosbag_to_tfrecord.py /path/to/file.bag

Help

python rosbag_to_tfrecord.py --help

About

Detect anomalies in images using deep features

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.2%
  • CMake 2.6%
  • Shell 0.2%