All Projects → aras62 → SF-GRU

aras62 / SF-GRU

Licence: MIT license
Pedestrian Action Anticipation using Contextual Feature Fusion in Stacked RNNs

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to SF-GRU

MotionPlanner
Motion Planner for Self Driving Cars
Stars: ✭ 129 (+200%)
Mutual labels:  behavior-analysis, autonomous-driving
WIMP
[arXiv] What-If Motion Prediction for Autonomous Driving ❓🚗💨
Stars: ✭ 80 (+86.05%)
Mutual labels:  prediction, autonomous-driving
Pylot
Modular autonomous driving platform running on the CARLA simulator and real-world vehicles.
Stars: ✭ 104 (+141.86%)
Mutual labels:  prediction, autonomous-driving
Market-Trend-Prediction
This is a project of build knowledge graph course. The project leverages historical stock price, and integrates social media listening from customers to predict market Trend On Dow Jones Industrial Average (DJIA).
Stars: ✭ 57 (+32.56%)
Mutual labels:  prediction
loco car
Software for LOCO, our autonomous drifting RC car.
Stars: ✭ 44 (+2.33%)
Mutual labels:  autonomous-driving
satimage
Code and models for the manuscript "Predicting Poverty and Developmental Statistics from Satellite Images using Multi-task Deep Learning"
Stars: ✭ 27 (-37.21%)
Mutual labels:  prediction
prediction
Tidy, Type-Safe 'prediction()' Methods
Stars: ✭ 86 (+100%)
Mutual labels:  prediction
doc2vec pymongo
Machine learning prediction of movies genres using Gensim's Doc2Vec and PyMongo - (Python, MongoDB)
Stars: ✭ 36 (-16.28%)
Mutual labels:  prediction
JuliaAutonomy
Julia sample codes for Autonomy, Robotics and Self-Driving Algorithms.
Stars: ✭ 21 (-51.16%)
Mutual labels:  autonomous-driving
MachineLearning
An easy neural network for Java!
Stars: ✭ 125 (+190.7%)
Mutual labels:  prediction
STOCK-RETURN-PREDICTION-USING-KNN-SVM-GUASSIAN-PROCESS-ADABOOST-TREE-REGRESSION-AND-QDA
Forecast stock prices using machine learning approach. A time series analysis. Employ the Use of Predictive Modeling in Machine Learning to Forecast Stock Return. Approach Used by Hedge Funds to Select Tradeable Stocks
Stars: ✭ 94 (+118.6%)
Mutual labels:  prediction
Owlyshield
Owlyshield is an EDR framework designed to safeguard vulnerable applications from potential exploitation (C&C, exfiltration and impact))..
Stars: ✭ 281 (+553.49%)
Mutual labels:  behavior-analysis
Autonomous-Parking-System
Automatic Parking is an autonomous car maneuvering system (part of ADAS) that moves a vehicle from a traffic lane into a parking spot to perform parallel parking. The automatic parking system aims to enhance the comfort and safety of driving in constrained environments where much attention and experience is required to steer the car. The parking…
Stars: ✭ 39 (-9.3%)
Mutual labels:  autonomous-driving
dreyeve
[TPAMI 2018] Predicting the Driver’s Focus of Attention: the DR(eye)VE Project. A deep neural network learnt to reproduce the human driver focus of attention (FoA) in a variety of real-world driving scenarios.
Stars: ✭ 88 (+104.65%)
Mutual labels:  autonomous-driving
forecastVeg
A Machine Learning Approach to Forecasting Remotely Sensed Vegetation Health in Python
Stars: ✭ 44 (+2.33%)
Mutual labels:  prediction
autonomous-delivery-robot
Repository for Autonomous Delivery Robot project of IvLabs, VNIT
Stars: ✭ 65 (+51.16%)
Mutual labels:  autonomous-driving
cnn age gender
Age and Gender prediction using Keras
Stars: ✭ 58 (+34.88%)
Mutual labels:  prediction
cqr
Conformalized Quantile Regression
Stars: ✭ 152 (+253.49%)
Mutual labels:  prediction
MediCare-Prime
Prediction or detection of various medical ailments
Stars: ✭ 19 (-55.81%)
Mutual labels:  prediction
epl-ranktable-prediction
Prediction of Premier league standings using Poisson distribution
Stars: ✭ 16 (-62.79%)
Mutual labels:  prediction

SF-GRU

sf-gru

This is the python implementation for paper A. Rasouli, I. Kotseruba, and J. K. Tsotsos, "Pedestrian Action Anticipation using Contextual Feature Fusion in Stacked RNNs", BMVC 2019.

Table of contents

Dependencies

The interface is written and tested using python 3.5. The interface also requires the following external libraries:

  • tensorflow (tested with 1.9 and 1.14)
  • keras (tested with 2.1 and 2.2)
  • scikit-learn
  • numpy
  • pillow

Datasets

The code is trained and tested with PIE and JAAD datasets. We used the keras implementation of open-pose to generate poses for the PIE dataset. They can be found at data/features/pie/poses.

Train

A sample training script is provided below:

from sf_gru import SFGRU
from pie_data import PIE

data_opts = { 'seq_type': 'crossing',
              'data_split_type': 'random',
               ... }
imdb = PIE(data_path=<path_to_pie>)

model_opts = {'obs_input_type': ['local_box', 'local_context', 'pose', 'box', 'speed'],
              ...}

method_class = SFGRU()
beh_seq_train = imdb.generate_data_trajectory_sequence('train', **data_opts)
saved_files_path = method_class.train(beh_seq_train)

from pie_data import PIE imports the data interface. Download the interface from the corresponding annotation repository.
data_opts = { 'seq_type': 'crossing', ... } specifies the data generation parameters form the dataset. Make sure that seq_type is set to 'crossing'. Refer to generate_data_trajectory_sequence() method in corresponding interface for more information.
model_opts = {...} specifies how the training data should be prepared for the model. Refer to sf_gru.py:get_data() for more information on how to set the parameters.
method_class = SFGRU() instantiates an object of type SFGRU.
imdb.generate_data_trajectory_sequence() generate data sequences from the dataset interface.
method_class.train() trains the model and returns the path to the folder where model and data processing parameters are saved.

A sample of training code can be found in train_test.py. All the default parameters in the script replicate the conditions in which the model was trained for the paper. Note that since 'random' split data is used, the model may yield different performance at test time.

Test

A sample test script is provided below

from sf_gru import SFGRU
from pie_data import PIE

data_opts = { 'seq_type': 'crossing',
              'data_split_type': 'random',
               ... }
imdb = PIE(data_path=<path_to_pie>)

method_class = SFGRU()
beh_seq_test = imdb.generate_data_trajectory_sequence('test', **data_opts)
saved_files_path = <path_to_model_folder>
acc , auc, f1, precision, recall = method_class.test(beh_seq_test, saved_files_path)

The procedure is similar to train with the exception that there is no need to specify model_opts as they Are saved in the model folder at train time.
In the case only test is run without training, saved_files_path should be specified. It should be the path to the folder where model and training parameters are saved. The final model used for the paper can be found at data/models/pie/sf-rnn. Note that if test follows train, the path is returned by train() function.
method_class.test() test the performance of the model and return the results using the following 5 metrics acc (accuracy) , auc (area under curve), f1, precision and recall. A sample of training code can be found in train_test.py.

Citation

If you use our dataset, please cite:

@inproceedings{rasouli2017they,
  title={Pedestrian Action Anticipation using Contextual Feature Fusion in Stacked RNNs},
  author={Rasouli, Amir and Kotseruba, Iuliia and Tsotsos, John K},
  booktitle={BMVC},
  year={2019}
}

Authors

Please send email to [email protected] or [email protected] if there are any problems with downloading or using the data.

License

This project is licensed under the MIT License - see the LICENSE file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].