Comments (6)
@angenieux Hi, the size of the sliding window is defined in this script src/mylib/feature_proc.py.
Its constructor is shown below. You can see the parameter FEATURE_T_LEN=5, which is the window size:
class FeatureGenerator(object):
def __init__(self, config_add_noise=False):
self.reset()
self.FEATURE_T_LEN = 5
self.config_add_noise = config_add_noise
This class is used for extracting features in both training and inference. So this FEATURE_T_LEN is the only thing you need to change.
from realtime-action-recognition.
HI !
I would like to evaluate the prediction results regarding the number of frames used for the temporal windows.
Does the FEATURE_T_LEN values must be the same for training AND inference ?
I have trained my data with FEATURE_T_LEN=5.
When i try to make predictions (python3 run_detector.py --source webcam) with another value (example FEATURE_T_LEN=3) I get the following issue :
Traceback (most recent call last):python3 run_detector.py --source webcam
File "run_detector.py", line 339, in
dict_id2label = multipeople_classifier.classify(dict_id2skeleton)
File "run_detector.py", line 281, in classify
id2label[id] = classifier.predict(skeleton) # predict label
File "/home/nico/Realtime-Action-Recognition/src/mylib/action_classifier.py", line 64, in predict
curr_scores = self.model.predict_proba(features)[0]
File "/home/nico/Realtime-Action-Recognition/src/mylib/action_classifier.py", line 170, in predict_proba
Y_probs = self.clf.predict_proba(self.pca.transform(X))
File "/usr/local/lib/python3.6/dist-packages/sklearn/decomposition/base.py", line 129, in transform
X = X - self.mean_
ValueError: operands could not be broadcast together with shapes (1,170) (314,)
Thanks for your help
from realtime-action-recognition.
@angenieux Hi, the training and inference must use the same length of feature vector. So the FEATURE_T_LEN must be the same.
from realtime-action-recognition.
Hi
Thanks for your reply :)
One last question.
1- I Have a 25 FPS video input
2- My inference capabilities with jetson nano is around 5 FPS
3- I would like to track an action duration < 1s (0.5s to 2 s)
Can you give me any advice regarding the FEATURE_T_LEN value to use for training and inference ?
best regards
from realtime-action-recognition.
@angenieux Hi.
First of all, since your inference speed is 5 fps, you need to lower down the video input to 5 fps (no matter how fast the original video streaming is). You can do this either by triggering the video frame at 5 fps, or manually sampling the video frame at 5 fps.
As for the FEATURE_T_LEN, since your shortest action is only 0.5s, which corresponding to only 0.5s*5fps=2.5 frame. So you may use 2 frame for FEATURE_T_LEN.
from realtime-action-recognition.
@angenieux Hi, I just refactored the code to make it more readable, as well as making the API easier to use. Just for your information. Thanks for the support!
The FEATURE_T_LEN is now renamed as window_size
and is set in the configuration file config/config.yaml
. All other parameters and intput/output settings are also in this yaml file.
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.