Skip to content

My summer research project: applying ML to classify human-factor behaviors encountered obstacles

Notifications You must be signed in to change notification settings

QuanHNguyen232/NSF_CPS_SIRI_2022

Repository files navigation

NSF-CPS-SIRI-2022

This work is for research project at NHanCE lab at Purdue University through the NSF CPS Frontier: Cognitive Autonomy for Human CPS project.

TODO:

  • Get data from Fixation data

Table of Content

  1. Files
  2. Instruction

Files

File structure:

.
│   .gitignore
│   7-11-feat_list.mat
│   feat_suggest.txt
│   README.md
│   requirements.txt
│   
├───Data-Processing
│   │   check-missing.py
│   │   ERROR-data.txt
│   │   
│   ├───daq-data-process
│   │       accum_feat_v2.1.py
│   │       convert_daq_txt-csv.m
│   │       getObsvWindow.py
│   │       Obstacle_Finder.py
│   │
│   └───eye-track-data-process
│           convert-eyetracking-txt.py
│           convert-miniSim-txt.py
│           get_Fixation_wind.py
│           match_eye_trk.py
│           miniSim-to-txt.py
│
└───Models
    │   Kmeans.py
    │   MyDataLoader.py
    │   RF.py
    │   Utils.py
  1. convert_daq_csv.m: convert daq features into csv files - each feature results in 1 one csv file (Matlab) -- do not use this.
  2. convert_daq_txt.m: convert daq features into txt files - each feature results in 1 one txt file (Matlab).
  3. requirements.txt: contain the version of Python libraries used in this project.
  4. accum_csv.py: merge all csv file into a big csv file that contains the whole dataset.
  5. miniSim-to-txt.py: convert .miniSim file to .txt file.
  6. merge-miniSim.py: merge dataset from daq with .miniSim data based on frame.
  7. convert-miniSim-txt.py and convert-eyetracking-txt.py: create the same merge column to easily merge miniSim and eyetracking data together.

Instruction

Follow this order:

  1. Run convert_daq_csv.m
  2. Setup environment
  3. Install libraries using requirements.txt
  4. Run accum_feat.py
  5. Run miniSim-to-txt.py
  6. Run merge-miniSim.py

convert_daq_csv.m:

  1. Run the setpath_ndaqtools.m in ndaqtools package (contact Professor Brandon Pitts at Purdue University for further information)
  2. Type "DaqViewer" in Matlab's Command Window (a window will pop up)
  3. (optional) Click "Create Cell List" to choose features you want to extract values, then save as .mat file
  4. In "Read DAQ Option", choose "Read cell list" and choose .mat file that contains list of features
  5. Click "Read DAQ Vars"
  6. Run convert_daq_csv.m after editing file location
  7. Result: each csv file contains it corresponding feature

Setup:

Click to expand
  1. Create an environment for this project. I suggest using Anaconda. Run this command to create virtual env (cheatsheet):
conda create --name env_name python=3.9.7

Then activate the env:

conda activate env_name

requirements.txt:

  1. Run this command to install the required libraries:
pip install -r requirements.txt

accum_feat.py:

  1. Open terminal
  2. Type the following command:
python accum_csv.py output_filename.csv

Or extension of feature data files: txt/csv (result from convert_daq_txt.m)

python accum_csv.py filename.txt -x extension

miniSim-to-txt.py;

[Back to top]

About

My summer research project: applying ML to classify human-factor behaviors encountered obstacles

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published