felixchenfy / Realtime-Action-Recognition

Apply ML to the skeletons from OpenPose; 9 actions; multiple people. (WARNING: I'm sorry that this is only good for course demo, not for real world applications !!! Those ary very difficult !!!)
MIT License
875 stars 256 forks source link

No such file or directory: 'skeleton_data/skeletons5_info.txt' #3

Closed dwdjsy89 closed 4 years ago

dwdjsy89 commented 5 years ago

When running Train.ipynb

the cell:X0, Y0, clip_indices, classes = load_my_data('skeleton_data/skeletons5_info.txt')

it has an error "FileNotFoundErrorTraceback (most recent call last)

in () ----> 1 X0, Y0, clip_indices, classes = load_my_data('skeleton_data/skeletons5_info.txt') in load_my_data(filepath) 23 24 def load_my_data(filepath): ---> 25 with open(filepath, 'r') as f: 26 dataset = simplejson.load(f) 27 FileNotFoundError: [Errno 2] No such file or directory: 'skeleton_data/skeletons5_info.txt' " Where can I get the "skeletons5_info.txt"? I have downloaded "source_images3" but didn't see "skeletons5_info.txt" in it. [problem.pdf](https://github.com/felixchenfy/Realtime-Action-Recognition/files/3244673/problem.pdf)
felixchenfy commented 5 years ago

Hello, this "skeletons5_info.txt" is used for training the model. So you need to first download the dataset (images with a person in it), run a script to detect the person's skeleton, and then run another script to store skeleton results into this "skeletons5_info.txt".

The detailed steps are as follows (Just the same as the README.md):

4. How to run: Training

1). First, detect skeleton from training images and save result to txt:

$ python src/run_detector.py --source txtscript

2). Second, put skeleton from multiple txt into a single txt file:

$ python src/scripts/skeletons_info_generator.py

3). Third, open jupyter notebook, and run this file: "src/Train.ipynb".
The trained model will be saved to "model/trained_classifier.pickle".

Now, it's ready to run the real-time demo from your web camera.