Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/prouast/video-sensor-processing

Import and processing of video sensor data for intake gesture recognition. Support for OREBA dataset.
https://github.com/prouast/video-sensor-processing

intake-gesture-detection opencv oreba-dataset tensorflow tfrecord video

Last synced: about 2 months ago
JSON representation

Import and processing of video sensor data for intake gesture recognition. Support for OREBA dataset.

Awesome Lists containing this project

README

        

# video-sensor-processing

Processing of video sensor data from the [OREBA dataset](http://www.newcastle.edu.au/oreba) for intake gesture detection.
Convert video files and labels to `tfrecord` format.

## Prepare data for TensorFlow

We use `.tfrecord` files to feed data into TensorFlow.
This includes [TV-L1 optical flow](https://pequan.lip6.fr/~bereziat/cours/master/vision/papers/zach07.pdf), which is stored in the file alongside with raw frames and labels.
A dependency due to optical flow calculation is [opencv](https://opencv.org).

## Usage

Make sure that all requirements are fulfilled

```
$ brew install opencv
$ pip install -r requirements.txt
```

Then call `main.py`, pointing to the recordings directory for OREBA-DIS or OREBA-SHA.

```
$ python main.py --src_dir=OREBA_Dataset_Public_1_0/oreba_dis/recordings
```

The following flags can be set:

| Argument | Description | Default |
| --- | --- | --- |
| --src_dir | Recordings directory | OREBA_Dataset_Public_1_0/oreba_dis/recordings |
| --exp_dir | Directory for data export | Export |
| --dataset | Which dataset is used {OREBA-DIS or OREBA-SHA} | OREBA-DIS |
| --label_spec | Filename of label specification | label_spec/OREBA_only_intake.xml |
| --label_spec_inherit | Inherit label specification for sublabels (if label not included, always keep sublabels as Idle) | True |
| --resolution | Resolution of the video {140p or 250p} | 140p |
| --exp_fps | Store video frames using this framerate (In fps; Should be able to divide original framerate by this) | 8 |
| --exp_optical_flow | Calculate optical flow | False |
| --organise_data | If True, organise data in train, valid, test subfolders | False |
| --organise_dir | Directory to copy train, val and test sets using data organiser | Organised |
| --organise_subfolders | Create sub folder per each file in validation and test set | False |

## Label specfication

Control what labels are included by selecting or editing the appropriate `label_spec` file.
Templates are available in the `label_spec` directory.