Comments (6)
@ajuntapall Hi, the error is due to a NaN
in the training data (the feature vectors).
Would you mind sending me the skeletons_info.txt
generated from s2_*.py
to my email [email protected]
or putting it here? It will help me a lot for debugging.
Thank you very much!
from realtime-action-recognition.
Dear felixchenfy,
I have a same issue too.
F.Y.I
Best regards,
Tinh Lam
skeletons_info.txt
from realtime-action-recognition.
I have resolved the issue by replacing NaN:
def main():
print("\nReading classes, features and labels ...")
X = np.loadtxt(SRC_PROCESSED_FEATURES, dtype=float) # features
Y = np.loadtxt(SRC_PROCESSED_FEATURES_LABELS, dtype=int) # labels
col_mean = np.nanmean(X, axis=0)
inds = np.where(np.isnan(X))
X[inds] = np.take(col_mean, inds[1])
Idk if it's a proper solution but the recognition on test set works without a problem. Hope it helps.
from realtime-action-recognition.
@Salidor Hi, it looks like a good solution! Thank you so much!
I will test your code today and then update the repo.
@lktinh2018 Thanks for your data! I will use it to test the code today.
from realtime-action-recognition.
@Salidor @lktinh2018 Hi, I found the problem.
In utils/lib_feature_proc.py
, I use the body height
to normalize the skeleton. However, when the human is lying down, the height is zero, which causes the error.
So I changed the body height
(y1-y2) to body length
sqrt((x1-x2)**2 + (y1-y2)**2). The function after modification is shown below. The repo has been updated.
@staticmethod
def get_body_height(x):
''' Compute height of the body, which is defined as:
the distance between `neck` and `thigh`.
'''
x0, y0 = get_joint(x, NECK)
# Get average thigh height
x11, y11 = get_joint(x, L_THIGH)
x12, y12 = get_joint(x, R_THIGH)
if y11 == NaN and y12 == NaN: # Invalid data
return 1.0
if y11 == NaN:
x1, y1 = x12, y12
elif y12 == NaN:
x1, y1 = x11, y11
else:
x1, y1 = (x11 + x12) / 2, (y11 + y12) / 2
# Get body height
height = ((x0-x1)**2 + (y0-y1)**2)**(0.5)
return height
@lktinh2018 By the way, I tried your data, and the test accuracy is only 80% to 85%. And then I tested using my web camera, and the result is very poor..... Just for your information ...
from realtime-action-recognition.
@felixchenfy Hello, I know it has been for some time since you haven't worked on this project but I want to ask if is there anyone who has achieved the lying down activity using a webcam.
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.