Comments (6)
Hi Felixchenfy,
I was able to successfully train the model on different actions that I have recorded but have received a traceback error when I run 'run_detector'. It appears to only do this when attempting to classify the modified actions (i.e. it will run fine until I do the action at which point, I receive the error below).
For reference, I have trained the model on only two actions ('come here' and 'wave'). I have also attempted to run it when I have only trained it on one of those actions and received the same error. I am wondering if the program is designed to have exactly nine actions, in which case I would need to add more. As I understand it, the error is due to a mismatch in array size. Not sure how to fix, I would appreciate any guidance :)
Traceback (most recent call last):
File "C:\Users\steve\Documents\UNI\2019\S2\EGH400-2\code\working\Realtime-Action-Recognition-master\src\run_detector.py", line 316, in
dict_id2label = multipeople_classifier.classify(dict_id2skeleton)
File "C:\Users\steve\Documents\UNI\2019\S2\EGH400-2\code\working\Realtime-Action-Recognition-master\src\run_detector.py", line 258, in classify
id2label[id] = classifier.predict(skeleton) # predict label
File "C:\Users\steve\Documents\UNI\2019\S2\EGH400-2\code\working\Realtime-Action-Recognition-master\src\mylib\action_classifier.py", line 65, in predict
self.scores = self.smooth_scores(curr_scores)
File "C:\Users\steve\Documents\UNI\2019\S2\EGH400-2\code\working\Realtime-Action-Recognition-master\src\mylib\action_classifier.py", line 86, in smooth_scores
score_sums += score
ValueError: operands could not be broadcast together with shapes (9,) (2,) (9,)
from realtime-action-recognition.
@sbickley Hi, did you copy the action labels to the run_detector.py
?
The detailed procedures are as follows:
When running src/train.ipynb
, the function load_my_data
should print out the action labels (computed from the names of training data):
And then, you need to copy the labels to the variable action_labels
in run_detector.py
, and then the program should work.
from realtime-action-recognition.
That is exactly what the problem was!!! Thanks @felixchenfy :)
from realtime-action-recognition.
@felixchenfy just wondering if there was any particular reason you chose to use jupyter notebook for the training stage?
from realtime-action-recognition.
@sbickley No particular reason. It's just that jupyter is easy to debug.
from realtime-action-recognition.
@sbickley Hi, I just refactored the code to make it more readable, as well as making the API easier to use.
The training code is now in the .py instead of jupyter notebook.
The classes are now set in a configuration file config/config.yaml
.
Just for your information. Thanks!
from realtime-action-recognition.
Related Issues (20)
- Increase number of person dectected HOT 1
- How to use [lying, other, sitting, standing]
- ModuleNotFoundError: No module named 'sklearn.neighbors.classification' HOT 8
- 大佬您好,想问一下您的数据集怎么标定的吗?如何生成valid_images.txt文件呢 HOT 1
- 行为识别用的什么方法呀 HOT 1
- training is slow !! HOT 2
- how to remove the head joints HOT 1
- ModuleNotFoundError: No module named 'tf_pose' HOT 3
- 您好!可以请教一下是否有相关文章或者资料对这个项目的介绍分析吗 HOT 7
- 不好意思,请问在运作前都会显示这些东西而延迟一段时间,请问这个要怎去掉呢?
- Normalization performed twice
- Is it possible to use LSTM models using this feature preprocessing and extraction method?
- number of features
- AttributeError: module 'tensorflow_core.contrib' has no attribute 'tensorrt'
- how to generate valid_images.txt. HOT 2
- 当我测试摄像头的时候,CV2
- warnings.warn("Invalid fps of video: {}".format(video_path))
- Converting to RNN HOT 1
- AttributeError: module 'tensorflow' has no attribute 'nn' HOT 1
- can i use ucf101dataset to train more labels?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from realtime-action-recognition.