Spaces:
Runtime error
Runtime error
Upload 2794 files
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +40 -0
- Dockerfile +25 -0
- USL/000000000000_keypoints.json +1 -0
- USL/BLACK_background.jpg +0 -0
- USL/__init__.py +0 -0
- USL/__pycache__/__init__.cpython-312.pyc +0 -0
- USL/__pycache__/__init__.cpython-36.pyc +0 -0
- USL/__pycache__/__init__.cpython-37.pyc +0 -0
- USL/__pycache__/__init__.cpython-39.pyc +0 -0
- USL/__pycache__/capture_alphabets.cpython-36.pyc +0 -0
- USL/__pycache__/capture_words.cpython-36.pyc +0 -0
- USL/__pycache__/retrain.cpython-36.pyc +0 -0
- USL/alphabet_recognition/__init__.py +0 -0
- USL/alphabet_recognition/__pycache__/__init__.cpython-312.pyc +0 -0
- USL/alphabet_recognition/__pycache__/__init__.cpython-36.pyc +0 -0
- USL/alphabet_recognition/__pycache__/__init__.cpython-37.pyc +0 -0
- USL/alphabet_recognition/__pycache__/__init__.cpython-39.pyc +0 -0
- USL/alphabet_recognition/__pycache__/alphabet_recognition.cpython-312.pyc +0 -0
- USL/alphabet_recognition/__pycache__/alphabet_recognition.cpython-36.pyc +0 -0
- USL/alphabet_recognition/__pycache__/alphabet_recognition.cpython-37.pyc +0 -0
- USL/alphabet_recognition/__pycache__/alphabet_recognition.cpython-39.pyc +0 -0
- USL/alphabet_recognition/__pycache__/helperFunc.cpython-36.pyc +0 -0
- USL/alphabet_recognition/__pycache__/move.cpython-36.pyc +0 -0
- USL/alphabet_recognition/__pycache__/scale.cpython-36.pyc +0 -0
- USL/alphabet_recognition/__pycache__/train_alphabet_model.cpython-36.pyc +0 -0
- USL/alphabet_recognition/alphabet_recognition.py +90 -0
- USL/alphabet_recognition/train_alphabet_model.py +176 -0
- USL/capture_alphabets.py +368 -0
- USL/capture_words.py +260 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000001_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000002_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000003_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000004_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000005_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000006_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000007_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000008_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000009_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000011_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000012_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000013_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000014_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000015_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000016_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000017_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000018_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000019_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000020_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000021_keypoints.json +1 -0
- USL/data/datasets/words_dataset/good/1564405243.754477/000000000022_keypoints.json +1 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,43 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
data/db/main_dataset.db filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
data/guide/20190729_124310.jpg filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
data/guide/20190729_124319.jpg filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
data/guide/20190729_124422.jpg filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
data/guide/20190729_124437.jpg filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
data/guide/20190729_124445.jpg filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
data/guide/20190729_124459.jpg filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
data/guide/20190729_124514.jpg filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
data/guide/20190729_124545.jpg filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
data/guide/20190729_124600.jpg filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
data/guide/20190729_124607.jpg filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
data/guide/20190729_124622.jpg filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
data/guide/20190729_124633.jpg filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
data/guide/20190729_124643.jpg filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
data/guide/20190729_124652.jpg filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
data/guide/20190729_124702.jpg filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
data/guide/20190729_124712.jpg filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
data/guide/20190729_124721.jpg filter=lfs diff=lfs merge=lfs -text
|
| 54 |
+
data/guide/20190729_124743.jpg filter=lfs diff=lfs merge=lfs -text
|
| 55 |
+
data/guide/20190729_124751.jpg filter=lfs diff=lfs merge=lfs -text
|
| 56 |
+
data/guide/20190729_124758.jpg filter=lfs diff=lfs merge=lfs -text
|
| 57 |
+
data/guide/20190729_124809.jpg filter=lfs diff=lfs merge=lfs -text
|
| 58 |
+
data/guide/20190729_124819.jpg filter=lfs diff=lfs merge=lfs -text
|
| 59 |
+
data/guide/20190729_124827.jpg filter=lfs diff=lfs merge=lfs -text
|
| 60 |
+
data/guide/20190729_124836.jpg filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
data/guide/20190729_124842.jpg filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
data/guide/20190729_124851.jpg filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
data/guide/20190729_124903.jpg filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
data/guide/20190729_124910.jpg filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
data/guide/20190729_124916.jpg filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
data/guide/20190729_124924.jpg filter=lfs diff=lfs merge=lfs -text
|
| 67 |
+
data/guide/20190729_124939.jpg filter=lfs diff=lfs merge=lfs -text
|
| 68 |
+
data/guide/20190729_124946.jpg filter=lfs diff=lfs merge=lfs -text
|
| 69 |
+
data/guide/20190729_124958.jpg filter=lfs diff=lfs merge=lfs -text
|
| 70 |
+
data/guide/20190729_125007.jpg filter=lfs diff=lfs merge=lfs -text
|
| 71 |
+
data/guide/20190729_125019.jpg filter=lfs diff=lfs merge=lfs -text
|
| 72 |
+
data/guide/20190729_125034.jpg filter=lfs diff=lfs merge=lfs -text
|
| 73 |
+
data/guide/20190729_125049.jpg filter=lfs diff=lfs merge=lfs -text
|
| 74 |
+
data/guide/20190729_125104.jpg filter=lfs diff=lfs merge=lfs -text
|
| 75 |
+
data/guide/20190729_125110.jpg filter=lfs diff=lfs merge=lfs -text
|
Dockerfile
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.9
|
| 2 |
+
|
| 3 |
+
WORKDIR /code
|
| 4 |
+
|
| 5 |
+
COPY ./requirements.txt /code/requirements.txt
|
| 6 |
+
|
| 7 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 8 |
+
|
| 9 |
+
RUN apt-get update
|
| 10 |
+
|
| 11 |
+
RUN apt install -y libgl1-mesa-glx
|
| 12 |
+
|
| 13 |
+
RUN apt-get install python3-pygame -y
|
| 14 |
+
|
| 15 |
+
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
|
| 16 |
+
|
| 17 |
+
RUN apt-get update && apt-get install libgl1
|
| 18 |
+
|
| 19 |
+
RUN apt-get update && apt-get install -y python3-opencv
|
| 20 |
+
|
| 21 |
+
RUN pip install opencv-python
|
| 22 |
+
|
| 23 |
+
COPY . .
|
| 24 |
+
|
| 25 |
+
CMD ["gunicorn", "-b", "0.0.0.0:7860", "main:app"]
|
USL/000000000000_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.2,"people":[{"pose_keypoints_2d":[751.476,285.063,0.912371,711.287,518.561,0.85813,457.564,518.576,0.795016,0,0,0,0,0,0,975.083,518.618,0.799197,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,690.309,233.835,0.897561,782.309,234.172,0.8556,609.34,223.713,0.86976,853.427,244.176,0.813811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"hand_right_keypoints_2d":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/BLACK_background.jpg
ADDED
|
USL/__init__.py
ADDED
|
File without changes
|
USL/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (179 Bytes). View file
|
|
|
USL/__pycache__/__init__.cpython-36.pyc
ADDED
|
Binary file (113 Bytes). View file
|
|
|
USL/__pycache__/__init__.cpython-37.pyc
ADDED
|
Binary file (186 Bytes). View file
|
|
|
USL/__pycache__/__init__.cpython-39.pyc
ADDED
|
Binary file (173 Bytes). View file
|
|
|
USL/__pycache__/capture_alphabets.cpython-36.pyc
ADDED
|
Binary file (6.38 kB). View file
|
|
|
USL/__pycache__/capture_words.cpython-36.pyc
ADDED
|
Binary file (5.22 kB). View file
|
|
|
USL/__pycache__/retrain.cpython-36.pyc
ADDED
|
Binary file (912 Bytes). View file
|
|
|
USL/alphabet_recognition/__init__.py
ADDED
|
File without changes
|
USL/alphabet_recognition/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (200 Bytes). View file
|
|
|
USL/alphabet_recognition/__pycache__/__init__.cpython-36.pyc
ADDED
|
Binary file (134 Bytes). View file
|
|
|
USL/alphabet_recognition/__pycache__/__init__.cpython-37.pyc
ADDED
|
Binary file (207 Bytes). View file
|
|
|
USL/alphabet_recognition/__pycache__/__init__.cpython-39.pyc
ADDED
|
Binary file (194 Bytes). View file
|
|
|
USL/alphabet_recognition/__pycache__/alphabet_recognition.cpython-312.pyc
ADDED
|
Binary file (3.89 kB). View file
|
|
|
USL/alphabet_recognition/__pycache__/alphabet_recognition.cpython-36.pyc
ADDED
|
Binary file (2.34 kB). View file
|
|
|
USL/alphabet_recognition/__pycache__/alphabet_recognition.cpython-37.pyc
ADDED
|
Binary file (2.36 kB). View file
|
|
|
USL/alphabet_recognition/__pycache__/alphabet_recognition.cpython-39.pyc
ADDED
|
Binary file (2.28 kB). View file
|
|
|
USL/alphabet_recognition/__pycache__/helperFunc.cpython-36.pyc
ADDED
|
Binary file (2.47 kB). View file
|
|
|
USL/alphabet_recognition/__pycache__/move.cpython-36.pyc
ADDED
|
Binary file (3.52 kB). View file
|
|
|
USL/alphabet_recognition/__pycache__/scale.cpython-36.pyc
ADDED
|
Binary file (1.3 kB). View file
|
|
|
USL/alphabet_recognition/__pycache__/train_alphabet_model.cpython-36.pyc
ADDED
|
Binary file (4.07 kB). View file
|
|
|
USL/alphabet_recognition/alphabet_recognition.py
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
|
| 3 |
+
import USL.helper.move as move
|
| 4 |
+
import USL.helper.helperFunc as helper
|
| 5 |
+
import USL.helper.scale as scale
|
| 6 |
+
|
| 7 |
+
import json
|
| 8 |
+
import sqlite3
|
| 9 |
+
import math
|
| 10 |
+
import numpy as np
|
| 11 |
+
|
| 12 |
+
from sklearn import preprocessing
|
| 13 |
+
from sklearn.model_selection import train_test_split
|
| 14 |
+
from sklearn.preprocessing import StandardScaler
|
| 15 |
+
|
| 16 |
+
from keras.utils import to_categorical
|
| 17 |
+
from keras.models import load_model
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
model = load_model("data\\models\\alphabet_model.h5")
|
| 21 |
+
print("alphabet model loaded")
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
def match_ann(fileName):
|
| 25 |
+
js = json.loads(open(fileName ).read())
|
| 26 |
+
for items in js['people']:
|
| 27 |
+
handRight = items["hand_right_keypoints_2d"]
|
| 28 |
+
|
| 29 |
+
confPoints = helper.confidencePoints(handRight)
|
| 30 |
+
confidence = helper.confidence(confPoints)
|
| 31 |
+
if confidence > 10.2:
|
| 32 |
+
handPoints = helper.removePoints(handRight)
|
| 33 |
+
|
| 34 |
+
"""
|
| 35 |
+
experimenting with scaling
|
| 36 |
+
"""
|
| 37 |
+
p1 = [handPoints[0], handPoints[1]]
|
| 38 |
+
p2 = [handPoints[18], handPoints[19]]
|
| 39 |
+
distance = math.sqrt( ((p1[0]-p2[0])**2)+((p1[1]-p2[1])**2) )
|
| 40 |
+
|
| 41 |
+
Result,Points = scale.scalePoints(handPoints,distance)
|
| 42 |
+
handRightResults,handRightPoints = move.centerPoints(handPoints)
|
| 43 |
+
|
| 44 |
+
"""
|
| 45 |
+
extracting data from db
|
| 46 |
+
"""
|
| 47 |
+
connection = sqlite3.connect("data\\db\\main_dataset.db")
|
| 48 |
+
crsr = connection.cursor()
|
| 49 |
+
|
| 50 |
+
# extracting x and y points
|
| 51 |
+
sql = 'SELECT x1,y1'
|
| 52 |
+
for x in range(2,22):
|
| 53 |
+
sql = sql + ',x'+str(x)+',y'+str(x)
|
| 54 |
+
sql = sql + ' FROM rightHandDataset WHERE 1'
|
| 55 |
+
crsr.execute(sql)
|
| 56 |
+
feature_res = crsr.fetchall()
|
| 57 |
+
feature_res = np.asarray(feature_res)
|
| 58 |
+
features=[]
|
| 59 |
+
for x in feature_res:
|
| 60 |
+
features.append(x)
|
| 61 |
+
|
| 62 |
+
# extracting labels
|
| 63 |
+
crsr.execute('SELECT label FROM rightHandDataset WHERE 1')
|
| 64 |
+
label_res = crsr.fetchall()
|
| 65 |
+
labels=[]
|
| 66 |
+
for x in label_res:
|
| 67 |
+
labels.append(x)
|
| 68 |
+
|
| 69 |
+
#creating labelEncoder
|
| 70 |
+
le = preprocessing.LabelEncoder()
|
| 71 |
+
# Converting string labels into numbers.
|
| 72 |
+
label_encoded=le.fit_transform(labels)
|
| 73 |
+
|
| 74 |
+
label_encoded = to_categorical(label_encoded)
|
| 75 |
+
|
| 76 |
+
X_train, X_test, y_train, y_test = train_test_split(features, label_encoded, test_size=0.2)
|
| 77 |
+
|
| 78 |
+
scaler = StandardScaler().fit(X_train)
|
| 79 |
+
X_train = scaler.transform(X_train)
|
| 80 |
+
X_test = scaler.transform(X_test)
|
| 81 |
+
|
| 82 |
+
y_pred = model.predict(scaler.transform(np.array([handRightResults])))
|
| 83 |
+
|
| 84 |
+
C = np.argmax(y_pred)
|
| 85 |
+
|
| 86 |
+
result = le.inverse_transform([C])
|
| 87 |
+
|
| 88 |
+
return result[0]
|
| 89 |
+
else:
|
| 90 |
+
return "no confidence"
|
USL/alphabet_recognition/train_alphabet_model.py
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
|
| 3 |
+
import sqlite3
|
| 4 |
+
import numpy as np
|
| 5 |
+
|
| 6 |
+
from sklearn import preprocessing
|
| 7 |
+
from sklearn.model_selection import train_test_split
|
| 8 |
+
from sklearn.preprocessing import StandardScaler
|
| 9 |
+
|
| 10 |
+
from keras.models import Sequential
|
| 11 |
+
from keras.layers import Dense
|
| 12 |
+
from keras.utils import to_categorical
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
from sklearn.metrics import confusion_matrix, classification_report
|
| 16 |
+
from matplotlib import pyplot as plt
|
| 17 |
+
|
| 18 |
+
def train_alphabets():
|
| 19 |
+
"""
|
| 20 |
+
extracting data from db
|
| 21 |
+
"""
|
| 22 |
+
connection = sqlite3.connect("data\\db\\main_dataset.db")
|
| 23 |
+
crsr = connection.cursor()
|
| 24 |
+
|
| 25 |
+
# extracting x and y points
|
| 26 |
+
sql = 'SELECT x1,y1'
|
| 27 |
+
for x in range(2,22):
|
| 28 |
+
sql = sql + ',x'+str(x)+',y'+str(x)
|
| 29 |
+
sql = sql + ' FROM rightHandDataset WHERE 1'
|
| 30 |
+
crsr.execute(sql)
|
| 31 |
+
feature_res = crsr.fetchall()
|
| 32 |
+
feature_res = np.asarray(feature_res)
|
| 33 |
+
features=[]
|
| 34 |
+
for x in feature_res:
|
| 35 |
+
features.append(x)
|
| 36 |
+
|
| 37 |
+
# extracting labels
|
| 38 |
+
crsr.execute('SELECT label FROM rightHandDataset WHERE 1')
|
| 39 |
+
label_res = crsr.fetchall()
|
| 40 |
+
labels=[]
|
| 41 |
+
for x in label_res:
|
| 42 |
+
labels.append(x)
|
| 43 |
+
|
| 44 |
+
#creating labelEncoder
|
| 45 |
+
le = preprocessing.LabelEncoder()
|
| 46 |
+
# Converting string labels into numbers.
|
| 47 |
+
label_encoded=le.fit_transform(labels)
|
| 48 |
+
|
| 49 |
+
label_encoded = to_categorical(label_encoded)
|
| 50 |
+
|
| 51 |
+
X_train, X_test, y_train, y_test = train_test_split(features, label_encoded, test_size=0.2)
|
| 52 |
+
|
| 53 |
+
scaler = StandardScaler().fit(X_train)
|
| 54 |
+
X_train = scaler.transform(X_train)
|
| 55 |
+
X_test = scaler.transform(X_test)
|
| 56 |
+
|
| 57 |
+
# Initialize the constructor
|
| 58 |
+
model = Sequential()
|
| 59 |
+
|
| 60 |
+
# Add an input layer
|
| 61 |
+
model.add(Dense(120, activation='relu', input_shape=(42,)))
|
| 62 |
+
|
| 63 |
+
# Add one hidden layer
|
| 64 |
+
model.add(Dense(64, activation='relu'))
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
# Add an output layer
|
| 68 |
+
model.add(Dense(37, activation='sigmoid'))
|
| 69 |
+
|
| 70 |
+
model.compile(loss='binary_crossentropy',
|
| 71 |
+
optimizer='adam',
|
| 72 |
+
metrics=['accuracy'])
|
| 73 |
+
|
| 74 |
+
# model.fit(X_train, y_train,epochs=20, batch_size=1, verbose=1)
|
| 75 |
+
|
| 76 |
+
# model.save("..\\data\\models\\alphabet_model.h5")
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
score = model.evaluate(X_test, y_test,verbose=1)
|
| 81 |
+
#
|
| 82 |
+
print("\n%s: %.2f%%" % (model.metrics_names[1], score[1]*100))
|
| 83 |
+
|
| 84 |
+
history = model.fit(X_train, y_train,validation_split=0.20,epochs=25, batch_size=1, verbose=1)
|
| 85 |
+
|
| 86 |
+
# model.save("data\\models\\alphabet_model.h5")
|
| 87 |
+
|
| 88 |
+
y_pred = model.predict(X_test)
|
| 89 |
+
score = model.evaluate(X_test, y_test,verbose=1)
|
| 90 |
+
#
|
| 91 |
+
print("\n%s: %.2f%%" % (model.metrics_names[1], score[1]*100))
|
| 92 |
+
|
| 93 |
+
# list all data in history
|
| 94 |
+
print(history.history.keys())
|
| 95 |
+
# summarize history for accuracy
|
| 96 |
+
plt.plot(history.history['acc'])
|
| 97 |
+
plt.plot(history.history['val_acc'])
|
| 98 |
+
plt.title('Accuracy vs Epoch')
|
| 99 |
+
plt.ylabel('accuracy')
|
| 100 |
+
plt.xlabel('epoch')
|
| 101 |
+
plt.legend(['train', 'test'], loc='upper left')
|
| 102 |
+
plt.show()
|
| 103 |
+
# summarize history for loss
|
| 104 |
+
plt.plot(history.history['loss'])
|
| 105 |
+
plt.plot(history.history['val_loss'])
|
| 106 |
+
plt.title('model loss')
|
| 107 |
+
plt.ylabel('loss')
|
| 108 |
+
plt.xlabel('epoch')
|
| 109 |
+
plt.legend(['train', 'test'], loc='upper left')
|
| 110 |
+
#plt.figure(figsize = (30,30))
|
| 111 |
+
plt.show()
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
print(model.summary())
|
| 115 |
+
cm = confusion_matrix(y_test.argmax(axis=1), y_pred.argmax(axis=1))
|
| 116 |
+
|
| 117 |
+
import itertools
|
| 118 |
+
plt.rcParams.update({'font.size': 16})
|
| 119 |
+
def plot_confusion_matrix(cm, classes,
|
| 120 |
+
normalize=False,
|
| 121 |
+
title='Confusion matrix',
|
| 122 |
+
cmap=plt.cm.Blues):
|
| 123 |
+
"""
|
| 124 |
+
This function prints and plots the confusion matrix.
|
| 125 |
+
Normalization can be applied by setting `normalize=True`.
|
| 126 |
+
"""
|
| 127 |
+
if normalize:
|
| 128 |
+
cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis]
|
| 129 |
+
print("Normalized confusion matrix")
|
| 130 |
+
else:
|
| 131 |
+
print('Confusion matrix, without normalization')
|
| 132 |
+
|
| 133 |
+
print(cm)
|
| 134 |
+
|
| 135 |
+
plt.imshow(cm, interpolation='nearest', cmap=cmap)
|
| 136 |
+
plt.title(title)
|
| 137 |
+
plt.colorbar()
|
| 138 |
+
tick_marks = np.arange(len(classes))
|
| 139 |
+
plt.xticks(tick_marks, classes, rotation=0)
|
| 140 |
+
plt.yticks(tick_marks, classes)
|
| 141 |
+
|
| 142 |
+
fmt = '.2f' if normalize else 'd'
|
| 143 |
+
thresh = cm.max() / 2.
|
| 144 |
+
for i, j in itertools.product(range(cm.shape[0]), range(cm.shape[1])):
|
| 145 |
+
plt.text(j, i, format(cm[i, j], fmt),
|
| 146 |
+
horizontalalignment="center",
|
| 147 |
+
color="white" if cm[i, j] > thresh else "black")
|
| 148 |
+
|
| 149 |
+
plt.tight_layout()
|
| 150 |
+
plt.ylabel('True label')
|
| 151 |
+
plt.xlabel('Predicted label')
|
| 152 |
+
|
| 153 |
+
l = np.array(labels)
|
| 154 |
+
l = np.unique(l)
|
| 155 |
+
|
| 156 |
+
class_names = l
|
| 157 |
+
|
| 158 |
+
plt.figure(figsize = (25,25))
|
| 159 |
+
plot_confusion_matrix(cm, classes=class_names, normalize=True,
|
| 160 |
+
title='Normalized confusion matrix')
|
| 161 |
+
|
| 162 |
+
plt.show()
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
|
| 176 |
+
|
USL/capture_alphabets.py
ADDED
|
@@ -0,0 +1,368 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
import USL.helper.db_helper as dbh
|
| 3 |
+
import USL.helper.helperFunc as helper
|
| 4 |
+
import USL.helper.move as move
|
| 5 |
+
import USL.helper.scale as scale
|
| 6 |
+
import USL.helper.plot as plot
|
| 7 |
+
import USL.retrain as retrain
|
| 8 |
+
|
| 9 |
+
# system imports
|
| 10 |
+
import cv2
|
| 11 |
+
import math
|
| 12 |
+
import os
|
| 13 |
+
import subprocess
|
| 14 |
+
import json
|
| 15 |
+
from matplotlib import pyplot as plt
|
| 16 |
+
import time
|
| 17 |
+
from datetime import datetime
|
| 18 |
+
|
| 19 |
+
# for error handling
|
| 20 |
+
import errno, stat, shutil
|
| 21 |
+
from distutils.dir_util import copy_tree
|
| 22 |
+
import sys, signal
|
| 23 |
+
|
| 24 |
+
import eel
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
"""
|
| 28 |
+
Handling Errors While removing temp folders
|
| 29 |
+
"""
|
| 30 |
+
def signal_handler(signal, frame):
|
| 31 |
+
# Removing Keypoints Folder
|
| 32 |
+
shutil.rmtree("Keypoints", ignore_errors=True, onerror=handleRemoveReadonly)
|
| 33 |
+
shutil.rmtree("gui\\captured_images", ignore_errors=True, onerror=handleRemoveReadonly)
|
| 34 |
+
shutil.rmtree("gui\\temp_images", ignore_errors=True, onerror=handleRemoveReadonly)
|
| 35 |
+
|
| 36 |
+
print( 'All done')
|
| 37 |
+
sys.exit(0)
|
| 38 |
+
|
| 39 |
+
signal.signal(signal.SIGINT, signal_handler)
|
| 40 |
+
|
| 41 |
+
# if folder is read only raise exception
|
| 42 |
+
def handleRemoveReadonly(func, path, exc):
|
| 43 |
+
excvalue = exc[1]
|
| 44 |
+
if func in (os.rmdir, os.remove) and excvalue.errno == errno.EACCES:
|
| 45 |
+
os.chmod(path, stat.S_IRWXU| stat.S_IRWXG| stat.S_IRWXO) # 0777
|
| 46 |
+
func(path)
|
| 47 |
+
else:
|
| 48 |
+
raise Exception
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
def plotPose(posePoints, handRightPoints, handLeftPoints):
|
| 53 |
+
POSE_PAIRS = [[1, 0], [1, 2], [1, 5], [2, 3], [3, 4], [5, 6], [6, 7],
|
| 54 |
+
[1, 8], [0, 15], [15, 17], [0, 16], [16, 18]]
|
| 55 |
+
|
| 56 |
+
HAND_PAIRS = [[0, 1], [1, 2], [2, 3], [3, 4], [0, 5], [5, 6], [6, 7], [7, 8], [0, 9], [9, 10],
|
| 57 |
+
[10, 11], [11, 12], [0, 13], [13, 14], [14, 15], [15, 16], [0, 17], [17, 18],
|
| 58 |
+
[18, 19], [19, 20]]
|
| 59 |
+
|
| 60 |
+
colors = [[0, 0, 130], [0, 0, 175], [0, 0, 210], [0, 0, 250],
|
| 61 |
+
[0, 200, 160], [0, 180, 150], [0, 230, 186], [0, 255, 255],
|
| 62 |
+
[82, 201, 8], [82, 204, 0], [92, 230, 0], [102, 252, 6],
|
| 63 |
+
[197, 88, 17], [204, 82, 0], [179, 71, 0], [227, 94, 5],
|
| 64 |
+
[204, 0, 163], [200, 0, 163], [196, 0, 163], [230, 0, 184]]
|
| 65 |
+
|
| 66 |
+
background = "URDU\\BLACK_background.jpg"
|
| 67 |
+
|
| 68 |
+
frame = cv2.imread(background)
|
| 69 |
+
|
| 70 |
+
count = 0
|
| 71 |
+
# Draw Skeleton
|
| 72 |
+
for pair in POSE_PAIRS:
|
| 73 |
+
partA = pair[0]
|
| 74 |
+
partB = pair[1]
|
| 75 |
+
|
| 76 |
+
if posePoints[partA] and posePoints[partB] and posePoints[partA][0] != 0 and posePoints[partA][1] != 0 and \
|
| 77 |
+
posePoints[partB][0] != 0 and posePoints[partB][1] != 0:
|
| 78 |
+
cv2.line(frame, posePoints[partA], posePoints[partB], colors[count], 10)
|
| 79 |
+
cv2.circle(frame, posePoints[partA], 5, (0, 0, 255), thickness=10, lineType=cv2.FILLED)
|
| 80 |
+
cv2.circle(frame, posePoints[partB], 5, (255, 255, 255), thickness=15, lineType=cv2.FILLED)
|
| 81 |
+
count += 1
|
| 82 |
+
|
| 83 |
+
count = 0
|
| 84 |
+
for pair in HAND_PAIRS:
|
| 85 |
+
partA = pair[0]
|
| 86 |
+
partB = pair[1]
|
| 87 |
+
|
| 88 |
+
if handRightPoints[partA] and handRightPoints[partB]:
|
| 89 |
+
cv2.line(frame, handRightPoints[partA], handRightPoints[partB], colors[count], 10)
|
| 90 |
+
cv2.circle(frame, handRightPoints[partA], 5, (0, 0, 255), thickness=3, lineType=cv2.FILLED)
|
| 91 |
+
cv2.circle(frame, handRightPoints[partB], 5, (255, 255, 255), thickness=4, lineType=cv2.FILLED)
|
| 92 |
+
count += 1
|
| 93 |
+
|
| 94 |
+
count = 0
|
| 95 |
+
for pair in HAND_PAIRS:
|
| 96 |
+
partA = pair[0]
|
| 97 |
+
partB = pair[1]
|
| 98 |
+
|
| 99 |
+
if handLeftPoints[partA] and handLeftPoints[partB]:
|
| 100 |
+
cv2.line(frame, handLeftPoints[partA], handLeftPoints[partB], colors[count], 10)
|
| 101 |
+
cv2.circle(frame, handLeftPoints[partA], 5, (0, 0, 255), thickness=3, lineType=cv2.FILLED)
|
| 102 |
+
cv2.circle(frame, handLeftPoints[partB], 5, (255, 255, 255), thickness=4, lineType=cv2.FILLED)
|
| 103 |
+
count += 1
|
| 104 |
+
|
| 105 |
+
# frame = cv2.cvtColor(frame,cv2.COLOR_BGR2RGB)
|
| 106 |
+
return frame
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
remfileNames = []
|
| 110 |
+
|
| 111 |
+
@eel.expose
|
| 112 |
+
def capture_alphabet_dataset(sec):
|
| 113 |
+
|
| 114 |
+
global remfileNames
|
| 115 |
+
|
| 116 |
+
"""
|
| 117 |
+
----------------------Start OpenPoseDemo.exe----------------------
|
| 118 |
+
--render_pose 0 --display 0
|
| 119 |
+
"""
|
| 120 |
+
os.chdir('bin\\openpose')
|
| 121 |
+
print('Starting OpenPose')
|
| 122 |
+
subprocess.Popen('bin\\OpenPoseDemo.exe --hand --write_json ..\\..\\Keypoints --number_people_max 1', shell=True)
|
| 123 |
+
os.chdir('..\\..')
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
|
| 127 |
+
"""
|
| 128 |
+
----------------------Creating temp folder----------------------
|
| 129 |
+
"""
|
| 130 |
+
dirName = 'Keypoints'
|
| 131 |
+
init_file = 'URDU\\000000000000_keypoints.json'
|
| 132 |
+
|
| 133 |
+
try:
|
| 134 |
+
# Create target Directory
|
| 135 |
+
os.mkdir(dirName)
|
| 136 |
+
os.mkdir("gui\\captured_images")
|
| 137 |
+
os.mkdir("gui\\temp_images")
|
| 138 |
+
|
| 139 |
+
# copy initializing file in directory
|
| 140 |
+
shutil.copy(init_file, dirName)
|
| 141 |
+
print("Directory " , dirName , " Created ")
|
| 142 |
+
except FileExistsError:
|
| 143 |
+
print("Directory " , dirName , " already exists")
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
"""
|
| 148 |
+
----------------------Live View----------------------
|
| 149 |
+
"""
|
| 150 |
+
|
| 151 |
+
# shutil.copy('URDU\\000000000000_keypoints.json', 'Keypoints')
|
| 152 |
+
# filePlotName = '000000000000_keypoints.json'
|
| 153 |
+
t = time.time() + sec
|
| 154 |
+
while time.time() <= t:
|
| 155 |
+
eel.sleep(0.05)
|
| 156 |
+
# for entry in os.scandir('Keypoints'):
|
| 157 |
+
# if entry.is_file():
|
| 158 |
+
# if os.path.splitext(entry)[1] == ".json":
|
| 159 |
+
# filePlotName = entry.name
|
| 160 |
+
#
|
| 161 |
+
# try:
|
| 162 |
+
# js = json.loads(open('Keypoints\\' + filePlotName).read())
|
| 163 |
+
# except ValueError:
|
| 164 |
+
# print('Decoding JSON has failed')
|
| 165 |
+
# pass
|
| 166 |
+
#
|
| 167 |
+
# # extract 'hand_right_keypoints_2d' from json file
|
| 168 |
+
# for items in js['people']:
|
| 169 |
+
# pose = items["pose_keypoints_2d"]
|
| 170 |
+
# handRight = items["hand_right_keypoints_2d"]
|
| 171 |
+
# handLeft = items["hand_left_keypoints_2d"]
|
| 172 |
+
#
|
| 173 |
+
# pose_points = helper.removePoints(pose)
|
| 174 |
+
# posePoints = helper.join_points(pose_points)
|
| 175 |
+
#
|
| 176 |
+
# # function to remove confidence points
|
| 177 |
+
# hand_right_Points = helper.removePoints(handRight)
|
| 178 |
+
# handRightPoints = helper.join_points(hand_right_Points)
|
| 179 |
+
#
|
| 180 |
+
# hand_left_points = helper.removePoints(handLeft)
|
| 181 |
+
# handLeftPoints = helper.join_points(hand_left_points)
|
| 182 |
+
#
|
| 183 |
+
# frame = plotPose(posePoints, handRightPoints, handLeftPoints)
|
| 184 |
+
#
|
| 185 |
+
# cv2.imwrite('gui\\temp_images\\' + filePlotName + '.jpg', frame)
|
| 186 |
+
# # reset image
|
| 187 |
+
# frame = cv2.imread("URDU\\BLACK_background.jpg")
|
| 188 |
+
# print("saad")
|
| 189 |
+
# eel.get_fileName(filePlotName)
|
| 190 |
+
# filePlotName = ''
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
# eel.sleep(sec)
|
| 194 |
+
# Kill openpose
|
| 195 |
+
os.system("taskkill /f /im OpenPoseDemo.exe")
|
| 196 |
+
|
| 197 |
+
|
| 198 |
+
"""
|
| 199 |
+
---------------------- Auto Remove files----------------------
|
| 200 |
+
"""
|
| 201 |
+
conf_thershold = 10
|
| 202 |
+
fileNames = []
|
| 203 |
+
#scan temporary folder
|
| 204 |
+
for entry in os.scandir('Keypoints'):
|
| 205 |
+
# store the name if entry is file and file is of ext .json
|
| 206 |
+
if entry.is_file():
|
| 207 |
+
if os.path.splitext(entry)[1] == ".json":
|
| 208 |
+
fileNames.append(entry.name)
|
| 209 |
+
|
| 210 |
+
# traverse fileNames[]
|
| 211 |
+
for x in range(len(fileNames)):
|
| 212 |
+
# load each file from fileName[]
|
| 213 |
+
js = json.loads(open('Keypoints\\' + fileNames[x]).read())
|
| 214 |
+
# extract 'hand_right_keypoints_2d' from json file
|
| 215 |
+
for items in js['people']:
|
| 216 |
+
handRight = items["hand_right_keypoints_2d"]
|
| 217 |
+
|
| 218 |
+
# extract confidence points
|
| 219 |
+
confPoints = helper.confidencePoints(handRight)
|
| 220 |
+
# add all confidence points
|
| 221 |
+
confidence = helper.confidence(confPoints)
|
| 222 |
+
print(confidence)
|
| 223 |
+
# remove file if confidence is less than threshold
|
| 224 |
+
if confidence < conf_thershold:
|
| 225 |
+
os.remove('Keypoints\\' + fileNames[x])
|
| 226 |
+
|
| 227 |
+
|
| 228 |
+
"""
|
| 229 |
+
----------------------plot and save----------------------
|
| 230 |
+
"""
|
| 231 |
+
background = 'big_background.png'
|
| 232 |
+
fileNames = []
|
| 233 |
+
#scan temporary folder
|
| 234 |
+
for entry in os.scandir('Keypoints'):
|
| 235 |
+
# store the name if entry is file and file is of ext .json
|
| 236 |
+
if entry.is_file():
|
| 237 |
+
if os.path.splitext(entry)[1] == ".json":
|
| 238 |
+
fileNames.append(entry.name)
|
| 239 |
+
|
| 240 |
+
|
| 241 |
+
# read background image
|
| 242 |
+
frame = cv2.imread(background)
|
| 243 |
+
|
| 244 |
+
i=1;
|
| 245 |
+
|
| 246 |
+
for x in range(len(fileNames)):
|
| 247 |
+
# load each file from fileName[]
|
| 248 |
+
js = json.loads(open('Keypoints\\' + fileNames[x]).read())
|
| 249 |
+
# extract 'hand_right_keypoints_2d' from json file
|
| 250 |
+
for items in js['people']:
|
| 251 |
+
handRight = items["hand_right_keypoints_2d"]
|
| 252 |
+
|
| 253 |
+
# function to remove confidence points
|
| 254 |
+
handPoints = helper.removePoints(handRight)
|
| 255 |
+
|
| 256 |
+
p1 = [handPoints[0], handPoints[1]]
|
| 257 |
+
p2 = [handPoints[18], handPoints[19]]
|
| 258 |
+
distance = math.sqrt( ((p1[0]-p2[0])**2)+((p1[1]-p2[1])**2) )
|
| 259 |
+
|
| 260 |
+
Result,Points = scale.dummy_scalePoints(handPoints,distance)
|
| 261 |
+
|
| 262 |
+
handRightResults,handRightPoints = move.dummy_centerPoints(Result)
|
| 263 |
+
|
| 264 |
+
|
| 265 |
+
|
| 266 |
+
frame = plot.plot_dataset(handRightPoints,'black')
|
| 267 |
+
|
| 268 |
+
cv2.imwrite('gui\\captured_images\\' + str(i) + '.jpg', frame)
|
| 269 |
+
i+=1
|
| 270 |
+
|
| 271 |
+
|
| 272 |
+
"""
|
| 273 |
+
----------------------get ref to delete files----------------------
|
| 274 |
+
"""
|
| 275 |
+
|
| 276 |
+
for entry in os.scandir('Keypoints'):
|
| 277 |
+
if entry.is_file():
|
| 278 |
+
if os.path.splitext(entry)[1] == ".json":
|
| 279 |
+
remfileNames.append(entry.name)
|
| 280 |
+
|
| 281 |
+
|
| 282 |
+
"""
|
| 283 |
+
----------------------end capture_alphabet_dataset(sec)----------------------
|
| 284 |
+
"""
|
| 285 |
+
|
| 286 |
+
@eel.expose
|
| 287 |
+
def getFileCount():
|
| 288 |
+
Names = []
|
| 289 |
+
for entry in os.scandir('gui\\captured_images'):
|
| 290 |
+
Names.append(entry.name)
|
| 291 |
+
return str(len(Names))
|
| 292 |
+
|
| 293 |
+
|
| 294 |
+
@eel.expose
|
| 295 |
+
def delete_Image(i):
|
| 296 |
+
global remfileNames
|
| 297 |
+
|
| 298 |
+
print(remfileNames)
|
| 299 |
+
|
| 300 |
+
try:
|
| 301 |
+
os.remove('Keypoints\\' + remfileNames[i-1])
|
| 302 |
+
os.remove('gui\\captured_images\\'+ str(i) + '.jpg')
|
| 303 |
+
except:
|
| 304 |
+
print("file not found")
|
| 305 |
+
pass
|
| 306 |
+
|
| 307 |
+
|
| 308 |
+
|
| 309 |
+
|
| 310 |
+
@eel.expose
|
| 311 |
+
def getlabel(a):
|
| 312 |
+
|
| 313 |
+
# remove whitespaces
|
| 314 |
+
label = a.strip()
|
| 315 |
+
print(label)
|
| 316 |
+
|
| 317 |
+
"""
|
| 318 |
+
traverse 'dataset' folder ,
|
| 319 |
+
find subfolder matching 'label' ,
|
| 320 |
+
create folder with timestamp in matched folder ,
|
| 321 |
+
and copy everything from 'Keypoints_temp' to created folder
|
| 322 |
+
"""
|
| 323 |
+
for entry in os.scandir('data\\datasets\\alphabets_dataset'):
|
| 324 |
+
if entry.name == label:
|
| 325 |
+
# current date and time
|
| 326 |
+
now = datetime.now()
|
| 327 |
+
# create folder with timestamp
|
| 328 |
+
timestamp = str(datetime.timestamp(now))
|
| 329 |
+
dir_name = "data\\datasets\\alphabets_dataset\\" + entry.name +"\\"+ timestamp
|
| 330 |
+
try:
|
| 331 |
+
# Create target Directory
|
| 332 |
+
os.mkdir(dir_name)
|
| 333 |
+
print("Directory " , dir_name , " Created ")
|
| 334 |
+
except FileExistsError:
|
| 335 |
+
print("Directory " , dir_name , " already exists")
|
| 336 |
+
|
| 337 |
+
# copy everything from 'Keypoints_temp' to created folder
|
| 338 |
+
copy_tree("Keypoints", "data\\datasets\\alphabets_dataset\\" + entry.name + "\\" + timestamp )
|
| 339 |
+
|
| 340 |
+
|
| 341 |
+
"""
|
| 342 |
+
Remove temp folders
|
| 343 |
+
"""
|
| 344 |
+
try:
|
| 345 |
+
shutil.rmtree("Keypoints", ignore_errors=True, onerror=handleRemoveReadonly)
|
| 346 |
+
shutil.rmtree("gui\\captured_images", ignore_errors=True, onerror=handleRemoveReadonly)
|
| 347 |
+
shutil.rmtree("gui\\temp_images", ignore_errors=True, onerror=handleRemoveReadonly)
|
| 348 |
+
|
| 349 |
+
print( 'Keypoints_temp folder removed')
|
| 350 |
+
except:
|
| 351 |
+
print("not removed")
|
| 352 |
+
pass
|
| 353 |
+
|
| 354 |
+
@eel.expose
|
| 355 |
+
def db_train():
|
| 356 |
+
retrain.re_train(1)
|
| 357 |
+
|
| 358 |
+
|
| 359 |
+
|
| 360 |
+
|
| 361 |
+
|
| 362 |
+
|
| 363 |
+
|
| 364 |
+
|
| 365 |
+
|
| 366 |
+
|
| 367 |
+
|
| 368 |
+
|
USL/capture_words.py
ADDED
|
@@ -0,0 +1,260 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
|
| 3 |
+
# local imports
|
| 4 |
+
import helper.helperFunc as helper
|
| 5 |
+
import helper.scale as scale
|
| 6 |
+
import helper.db_helper as dbh
|
| 7 |
+
import helper.normalize as norm
|
| 8 |
+
import helper.plot_body as plot_body
|
| 9 |
+
|
| 10 |
+
# system imports
|
| 11 |
+
import cv2
|
| 12 |
+
import math
|
| 13 |
+
import os
|
| 14 |
+
import subprocess
|
| 15 |
+
import json
|
| 16 |
+
from matplotlib import pyplot as plt
|
| 17 |
+
import time
|
| 18 |
+
from datetime import datetime
|
| 19 |
+
|
| 20 |
+
# for error handling
|
| 21 |
+
import errno, stat, shutil
|
| 22 |
+
from distutils.dir_util import copy_tree
|
| 23 |
+
import sys, signal
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
"""
|
| 27 |
+
Handling Errors While removing temp folders
|
| 28 |
+
"""
|
| 29 |
+
def signal_handler(signal, frame):
|
| 30 |
+
# Removing Keypoints Folder
|
| 31 |
+
shutil.rmtree("Keypoints", ignore_errors=True, onerror=handleRemoveReadonly)
|
| 32 |
+
print( 'All done')
|
| 33 |
+
sys.exit(0)
|
| 34 |
+
|
| 35 |
+
signal.signal(signal.SIGINT, signal_handler)
|
| 36 |
+
|
| 37 |
+
# if folder is read only raise exception
|
| 38 |
+
def handleRemoveReadonly(func, path, exc):
|
| 39 |
+
excvalue = exc[1]
|
| 40 |
+
if func in (os.rmdir, os.remove) and excvalue.errno == errno.EACCES:
|
| 41 |
+
os.chmod(path, stat.S_IRWXU| stat.S_IRWXG| stat.S_IRWXO) # 0777
|
| 42 |
+
func(path)
|
| 43 |
+
else:
|
| 44 |
+
raise Exception
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
"""
|
| 48 |
+
Remove 'Keypoints_temp' folder if exists
|
| 49 |
+
"""
|
| 50 |
+
|
| 51 |
+
shutil.rmtree("Keypoints_temp", ignore_errors=True, onerror=handleRemoveReadonly)
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
"""
|
| 55 |
+
Starting OpenPoseDemo.exe
|
| 56 |
+
and storing json files to temporary folder [Keypoints_temp]
|
| 57 |
+
"""
|
| 58 |
+
sec = int(input('Enter Seconds OpenPose should run for : '))
|
| 59 |
+
os.chdir('..\\bin\\openpose')
|
| 60 |
+
print('Starting OpenPose')
|
| 61 |
+
output = subprocess.Popen('bin\\OpenPoseDemo.exe --hand --write_json ..\\..\\URDU\\Keypoints_temp --net_resolution 128x128 --number_people_max 1', shell=True)
|
| 62 |
+
os.chdir('..\\..\\URDU')
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
"""
|
| 66 |
+
Creating temp folder and initializing with zero padded json file
|
| 67 |
+
"""
|
| 68 |
+
dirName = 'Keypoints_temp'
|
| 69 |
+
init_file = '000000000000_keypoints.json'
|
| 70 |
+
|
| 71 |
+
try:
|
| 72 |
+
# Create target Directory
|
| 73 |
+
os.mkdir(dirName)
|
| 74 |
+
# copy initializing file in directory
|
| 75 |
+
shutil.copy(init_file, dirName)
|
| 76 |
+
print("Directory " , dirName , " Created ")
|
| 77 |
+
except FileExistsError:
|
| 78 |
+
print("Directory " , dirName , " already exists")
|
| 79 |
+
|
| 80 |
+
# wait for openpose to start
|
| 81 |
+
time.sleep(5)
|
| 82 |
+
# wait for user
|
| 83 |
+
time.sleep(sec)
|
| 84 |
+
# Kill openpose
|
| 85 |
+
os.system("taskkill /f /im OpenPoseDemo.exe")
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
"""
|
| 89 |
+
Remove files with confidence less then threshold
|
| 90 |
+
"""
|
| 91 |
+
conf_thershold = 10
|
| 92 |
+
fileNames = []
|
| 93 |
+
#scan temporary folder
|
| 94 |
+
for entry in os.scandir('Keypoints_temp'):
|
| 95 |
+
# store the name if entry is file and file is of ext .json
|
| 96 |
+
if entry.is_file():
|
| 97 |
+
if os.path.splitext(entry)[1] == ".json":
|
| 98 |
+
fileNames.append(entry.name)
|
| 99 |
+
|
| 100 |
+
# traverse fileNames[]
|
| 101 |
+
for x in range(len(fileNames)):
|
| 102 |
+
# load each file from fileName[]
|
| 103 |
+
js = json.loads(open('Keypoints_temp\\' + fileNames[x]).read())
|
| 104 |
+
# extract 'hand_right_keypoints_2d' from json file
|
| 105 |
+
for items in js['people']:
|
| 106 |
+
handRight = items["hand_right_keypoints_2d"]
|
| 107 |
+
handLeft = items["hand_left_keypoints_2d"]
|
| 108 |
+
|
| 109 |
+
# extract confidence points
|
| 110 |
+
RightConfPoints = helper.confidencePoints(handRight)
|
| 111 |
+
LeftConfPoints = helper.confidencePoints(handLeft)
|
| 112 |
+
# add all confidence points
|
| 113 |
+
RightConfidence = helper.confidence(RightConfPoints)
|
| 114 |
+
LeftConfidence = helper.confidence(LeftConfPoints)
|
| 115 |
+
# remove file if confidence is less than threshold
|
| 116 |
+
if RightConfidence < 10:
|
| 117 |
+
os.remove('Keypoints_temp\\' + fileNames[x])
|
| 118 |
+
|
| 119 |
+
elif LeftConfidence < conf_thershold and LeftConfidence > 2 :
|
| 120 |
+
os.remove('Keypoints_temp\\' + fileNames[x])
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
"""
|
| 125 |
+
plot remaining files
|
| 126 |
+
and delete if user inputs "N"
|
| 127 |
+
"""
|
| 128 |
+
# points to draw lines between
|
| 129 |
+
POSE_PAIRS = [ [0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[0,9],[9,10],[10,11],[11,12],[0,13],[13,14],[14,15],[15,16],[0,17],[17,18],[18,19],[19,20] ]
|
| 130 |
+
background = 'big_background.png'
|
| 131 |
+
fileNames = []
|
| 132 |
+
#scan temporary folder
|
| 133 |
+
for entry in os.scandir('Keypoints_temp'):
|
| 134 |
+
# store the name if entry is file and file is of ext .json
|
| 135 |
+
if entry.is_file():
|
| 136 |
+
if os.path.splitext(entry)[1] == ".json":
|
| 137 |
+
fileNames.append(entry.name)
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
# read background image
|
| 141 |
+
frame = cv2.imread(background)
|
| 142 |
+
for x in range(len(fileNames)):
|
| 143 |
+
# load each file from fileName[]
|
| 144 |
+
js = json.loads(open('Keypoints_temp\\' + fileNames[x]).read())
|
| 145 |
+
# extract 'hand_right_keypoints_2d' from json file
|
| 146 |
+
for items in js['people']:
|
| 147 |
+
pose = items["pose_keypoints_2d"]
|
| 148 |
+
handRight = items["hand_right_keypoints_2d"]
|
| 149 |
+
handLeft = items["hand_left_keypoints_2d"]
|
| 150 |
+
|
| 151 |
+
pose_points = helper.removePoints(pose)
|
| 152 |
+
p1 = [pose_points[0], pose_points[1]]
|
| 153 |
+
p2 = [pose_points[2], pose_points[3]]
|
| 154 |
+
distance = math.sqrt( ((p1[0]-p2[0])**2)+((p1[1]-p2[1])**2) )
|
| 155 |
+
scaled_results,scaled_points = norm.scaleBody(pose_points,distance)
|
| 156 |
+
poseResults,posePoints = norm.moveBody(scaled_results)
|
| 157 |
+
|
| 158 |
+
|
| 159 |
+
hand_right_points = helper.removePoints(handRight)
|
| 160 |
+
p1 = [hand_right_points[0], hand_right_points[1]]
|
| 161 |
+
p2 = [hand_right_points[18], hand_right_points[19]]
|
| 162 |
+
distance = math.sqrt( ((p1[0]-p2[0])**2)+((p1[1]-p2[1])**2) )
|
| 163 |
+
RightResult,Points = scale.scalePoints(hand_right_points,distance)
|
| 164 |
+
handRightResults,handRightPoints = norm.move_to_wrist(RightResult,poseResults[8],poseResults[9])
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
if LeftConfidence > 3:
|
| 168 |
+
hand_left_points = helper.removePoints(handLeft)
|
| 169 |
+
p1 = [hand_left_points[0], hand_left_points[1]]
|
| 170 |
+
p2 = [hand_left_points[18], hand_left_points[19]]
|
| 171 |
+
distance = math.sqrt( ((p1[0]-p2[0])**2)+((p1[1]-p2[1])**2) )
|
| 172 |
+
if distance != 0:
|
| 173 |
+
LeftResult,Points = scale.scalePoints(hand_left_points,distance)
|
| 174 |
+
handLeftResults,handLeftPoints = norm.move_to_wrist(LeftResult,poseResults[14],poseResults[15])
|
| 175 |
+
else:
|
| 176 |
+
handLeftResults,handLeftPoints = norm.move_to_wrist(hand_left_points,poseResults[14],poseResults[15])
|
| 177 |
+
|
| 178 |
+
else:
|
| 179 |
+
handLeftPoints = [(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0)]
|
| 180 |
+
handLeftResults = [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,]
|
| 181 |
+
|
| 182 |
+
|
| 183 |
+
|
| 184 |
+
|
| 185 |
+
frame = plot_body.plotPose(posePoints,handRightPoints,handLeftPoints)
|
| 186 |
+
|
| 187 |
+
|
| 188 |
+
fig2 = plt.figure(figsize = (15,15)) # create a 20 x 20 figure
|
| 189 |
+
ax3 = fig2.add_subplot(111)
|
| 190 |
+
ax3.imshow(frame, interpolation='none')
|
| 191 |
+
|
| 192 |
+
plt.imshow(frame)
|
| 193 |
+
plt.show()
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
|
| 197 |
+
# delete file if user rejects it
|
| 198 |
+
choice = input('do you want to keep it? Y/N: ')
|
| 199 |
+
if choice == 'N' or choice == 'n':
|
| 200 |
+
os.remove('Keypoints_temp\\' + fileNames[x])
|
| 201 |
+
print("File Removed")
|
| 202 |
+
|
| 203 |
+
# store label
|
| 204 |
+
label = input('Enter label for these files: ')
|
| 205 |
+
# remove whitespaces
|
| 206 |
+
label = label.strip()
|
| 207 |
+
|
| 208 |
+
choice = input('do you want to put label = '+label+' ? Y/N: ')
|
| 209 |
+
if choice == 'N' or choice == 'n':
|
| 210 |
+
# store label
|
| 211 |
+
label = input('Enter label for these files: ')
|
| 212 |
+
# remove whitespaces
|
| 213 |
+
label = label.strip()
|
| 214 |
+
elif choice == 'Y' or choice == 'y':
|
| 215 |
+
"""
|
| 216 |
+
traverse 'dataset' folder ,
|
| 217 |
+
find subfolder matching 'label' ,
|
| 218 |
+
create folder with timestamp in matched folder ,
|
| 219 |
+
and copy everything from 'Keypoints_temp' to created folder
|
| 220 |
+
"""
|
| 221 |
+
for entry in os.scandir('..\\data\\datasets\\words_dataset'):
|
| 222 |
+
if entry.name == label:
|
| 223 |
+
# current date and time
|
| 224 |
+
now = datetime.now()
|
| 225 |
+
|
| 226 |
+
# create folder with timestamp
|
| 227 |
+
timestamp = str(datetime.timestamp(now))
|
| 228 |
+
dir_name = "..\\data\\datasets\\words_dataset\\" + entry.name +"\\"+ timestamp
|
| 229 |
+
try:
|
| 230 |
+
# Create target Directory
|
| 231 |
+
os.mkdir(dir_name)
|
| 232 |
+
print("Directory " , dir_name , " Created ")
|
| 233 |
+
except FileExistsError:
|
| 234 |
+
print("Directory " , dir_name , " already exists")
|
| 235 |
+
|
| 236 |
+
# copy everything from 'Keypoints_temp' to created folder
|
| 237 |
+
copy_tree("Keypoints_temp", "..\\data\\datasets\\words_dataset\\" + entry.name + "\\" + timestamp )
|
| 238 |
+
|
| 239 |
+
|
| 240 |
+
# create table if not exists
|
| 241 |
+
dbh.create_pose_table()
|
| 242 |
+
# add all records from 'dataset' to 'db\main_databse.db'
|
| 243 |
+
dbh.populate_words()
|
| 244 |
+
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
"""
|
| 248 |
+
Remove 'Keypoints_temp' folder
|
| 249 |
+
"""
|
| 250 |
+
|
| 251 |
+
shutil.rmtree("Keypoints_temp", ignore_errors=True, onerror=handleRemoveReadonly)
|
| 252 |
+
print( 'Keypoints_temp folder removed')
|
| 253 |
+
|
| 254 |
+
|
| 255 |
+
|
| 256 |
+
|
| 257 |
+
|
| 258 |
+
|
| 259 |
+
|
| 260 |
+
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000001_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[711.072,172.976,0.865881,751.659,335.277,0.872606,609.359,335.311,0.883848,507.695,518.571,0.906813,660.126,487.748,0.815168,863.364,315.359,0.843981,974.807,497.894,0.68327,985.26,599.552,0.29148,751.27,690.945,0.792042,640.163,691.107,0.747708,619.876,934.405,0.171245,0,0,0,842.592,690.728,0.790617,924.207,924.207,0.157552,0,0,0,690.96,132.408,0.927396,761.405,132.569,0.917004,680.373,162.957,0.437018,792.153,182.893,0.856458,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[1009.89,575.042,0.0302895,1016.17,597.794,0.0273345,973.802,598.579,0.0129452,972.233,597.794,0.0129548,973.018,654.283,0.00576005,962.818,607.209,0.0157419,943.204,613.486,0.0164846,988.709,629.177,0.0118225,997.339,629.961,0.00905518,986.355,615.055,0.0119401,998.908,629.961,0.0188129,993.416,628.392,0.0165809,999.693,629.177,0.0107825,998.124,613.486,0.0116951,1005.18,634.669,0.0206705,1001.26,633.884,0.0222454,997.339,629.961,0.0130985,929.082,617.408,0.0188582,940.851,617.408,0.0191024,1004.4,644.868,0.0199488,1001.26,639.376,0.013104],"hand_right_keypoints_2d":[645.08,489.878,0.56507,667.375,456.05,0.617107,683.52,425.298,0.796485,701.971,400.696,0.76958,705.815,379.17,0.872175,717.348,449.131,0.830243,747.331,442.212,0.744034,736.568,437.599,0.538112,723.498,438.368,0.426773,720.423,473.733,0.772022,749.637,462.201,0.830327,737.336,458.357,0.616486,721.96,462.201,0.445763,721.96,496.028,0.649564,744.256,482.189,0.790552,737.336,479.883,0.644268,724.267,480.652,0.459893,719.654,516.017,0.640393,737.336,505.254,0.590242,736.568,499.872,0.683161,726.573,499.103,0.508596],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000002_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[701.269,173.056,0.876828,751.424,335.277,0.859636,609.231,345.258,0.889252,497.953,518.638,0.894063,640.014,497.828,0.816606,853.672,305.258,0.856551,964.671,497.908,0.668743,1005.23,609.63,0.29021,751.362,691.035,0.774036,649.967,691.221,0.734425,609.463,924.255,0.134358,0,0,0,842.686,690.779,0.768943,924.224,924.193,0.102074,0,0,0,690.76,132.45,0.923417,761.264,132.534,0.919074,680.059,163.025,0.360531,792.099,182.94,0.857891,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[1047.16,609.795,0.031987,1030.04,612.242,0.0309442,1018.62,607.348,0.02016,1026.77,605.717,0.0115887,1079.79,613.057,0.00502428,1033.3,653.024,0.0215367,1034.11,683.203,0.0183799,1038.19,676.678,0.00949141,1052.87,669.337,0.00575537,1033.3,645.683,0.0243699,1033.3,689.728,0.0251009,994.963,679.94,0.0104869,1061.03,665.259,0.00527603,1042.27,647.314,0.0250417,1029.22,700.331,0.0216332,1029.22,705.225,0.0153,1016.98,700.331,0.00882543,1068.37,654.655,0.0303428,981.097,617.136,0.0116016,1012.09,705.225,0.019704,1014.54,704.409,0.0116831],"hand_right_keypoints_2d":[650.617,488.693,0.586119,671.022,456.951,0.667331,684.626,426.72,0.797986,704.276,402.536,0.757695,707.299,379.862,0.890551,717.88,450.905,0.797714,748.111,444.859,0.749466,736.019,440.324,0.467101,720.903,441.08,0.422225,720.903,476.601,0.723817,749.623,465.265,0.80112,736.774,460.73,0.599919,721.659,464.509,0.461643,722.415,499.274,0.682511,745.088,486.426,0.769263,736.774,482.647,0.652596,724.682,484.159,0.464571,721.659,518.169,0.64753,739.798,506.076,0.64177,735.263,502.297,0.634378,724.682,504.565,0.551695],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000003_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[721.414,182.979,0.867081,751.724,325.449,0.871441,609.619,325.136,0.881691,508.211,518.39,0.935375,650.166,467.452,0.821585,863.293,325.435,0.839334,954.844,508.059,0.666606,985.036,609.323,0.265601,741.376,690.65,0.77274,629.959,690.704,0.756111,629.759,924.259,0.116461,0,0,0,832.92,690.516,0.763362,903.764,934.315,0.120046,0,0,0,691.358,132.749,0.892817,761.776,142.581,0.911846,680.666,162.976,0.564581,792.495,183.247,0.859701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[1013.74,575.291,0.0220301,1004.74,599.273,0.0190662,1021.98,648.735,0.0117144,1021.98,650.234,0.0101789,962.025,665.972,0.00444836,1022.73,617.259,0.0208003,986.756,638.243,0.0164368,988.255,641.241,0.00942788,1066.94,638.992,0.00545067,1012.24,625.503,0.0216027,988.255,636.744,0.0190285,1057.95,656.979,0.0118552,1014.48,680.96,0.00392548,1015.23,628.5,0.0217476,988.255,635.245,0.0171161,988.255,638.243,0.0126671,1006.99,670.468,0.00784819,1056.45,627.002,0.0173792,988.255,635.995,0.0149033,1009.24,673.466,0.0142477,988.255,639.742,0.00976102],"hand_right_keypoints_2d":[654.578,480.266,0.622895,674.594,447.44,0.680358,690.607,415.415,0.803538,709.021,389.795,0.797276,710.622,368.979,0.851946,721.831,440.235,0.822731,754.656,433.83,0.791122,740.245,429.827,0.470852,726.635,431.428,0.432797,727.435,465.054,0.779448,756.258,453.845,0.868299,741.846,451.443,0.669628,726.635,454.646,0.548467,729.036,487.472,0.809326,752.255,474.662,0.87167,741.846,473.06,0.720811,726.635,477.864,0.590732,729.837,505.085,0.759022,746.65,497.079,0.73606,739.445,493.877,0.742723,730.638,496.278,0.63147],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000004_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[741.307,183.263,0.862213,751.751,335.214,0.855206,609.727,325.248,0.86975,517.749,518.186,0.933275,660.092,477.433,0.805785,853.767,325.41,0.823528,944.393,507.972,0.661892,944.549,599.566,0.301274,741.484,690.688,0.777302,639.985,690.785,0.748336,609.543,913.989,0.180278,0,0,0,832.915,690.481,0.758542,924.106,903.938,0.161963,0,0,0,700.93,142.593,0.846639,761.922,142.828,0.891543,680.896,172.936,0.690047,792.429,183.109,0.824273,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[994.697,582.686,0.0278447,986.472,608.108,0.0247192,938.619,614.089,0.0336131,923.665,618.576,0.0159385,922.917,646.988,0.00777184,928.899,613.342,0.0300918,934.133,615.585,0.0163074,984.229,606.612,0.012863,984.977,596.145,0.00958213,945.348,595.397,0.0148193,976.004,632.782,0.0180111,954.321,658.952,0.0129968,952.078,659.699,0.00937237,949.087,596.145,0.0180255,960.302,651.475,0.0176105,954.321,657.456,0.0189048,954.321,658.204,0.0137527,930.394,614.837,0.0178774,937.871,615.585,0.0166587,961.05,657.456,0.0185699,959.555,657.456,0.0125361],"hand_right_keypoints_2d":[660.804,484.372,0.610861,680.406,449.087,0.635352,697.656,417.723,0.833823,715.691,392.631,0.832301,718.043,372.245,0.888192,729.805,442.03,0.867498,758.817,436.541,0.767179,747.055,434.189,0.489198,732.941,434.973,0.402958,735.293,467.905,0.832428,760.385,458.496,0.876647,746.271,455.36,0.669007,731.373,460.064,0.568809,734.509,489.86,0.830171,757.248,478.883,0.807441,746.271,478.883,0.719896,732.941,479.667,0.618171,734.509,505.542,0.818567,753.328,499.27,0.809004,743.919,498.485,0.707338,735.293,500.054,0.563472],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000005_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[751.26,192.865,0.876803,751.639,335.592,0.836319,609.783,335.531,0.860142,518.043,518.095,0.94006,670.104,467.651,0.808457,853.535,335.497,0.816731,944.365,487.654,0.628188,954.595,599.133,0.3131,751.47,690.475,0.734133,660.152,690.519,0.714139,639.991,914.141,0.111772,0,0,0,842.518,680.952,0.713526,873.656,924.044,0.111852,0,0,0,701.282,152.909,0.811408,762.134,162.762,0.867324,681.087,183.179,0.802854,792.337,192.926,0.82468,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[998.276,578.715,0.0470851,917.016,609.918,0.0289437,928.068,615.119,0.0537228,926.117,616.419,0.0168774,947.57,566.363,0.00806736,932.618,611.218,0.0404023,958.621,617.069,0.0164633,976.173,608.618,0.0193935,983.324,606.018,0.0106407,931.968,610.568,0.0260806,960.571,614.469,0.0192944,976.173,603.418,0.0108255,982.674,612.519,0.00759001,938.469,611.218,0.0294517,950.82,612.519,0.0212965,974.223,610.568,0.0143091,976.173,615.769,0.0110698,931.968,614.469,0.0395251,954.721,621.62,0.035993,963.172,622.27,0.0249147,969.022,621.62,0.0154045],"hand_right_keypoints_2d":[661.82,483.984,0.558412,680.558,448.756,0.543075,698.547,418.025,0.752669,716.536,392.541,0.764892,717.285,370.055,0.88783,731.526,442.01,0.777603,759.259,435.264,0.725425,746.517,431.516,0.432097,732.276,434.515,0.363745,739.022,468.244,0.793298,764.506,457.75,0.829966,751.764,454.002,0.621286,736.024,459.249,0.509289,737.523,489.98,0.768638,760.758,477.238,0.783081,750.265,477.238,0.659508,736.024,478.737,0.60775,735.274,507.969,0.719142,753.263,498.225,0.710017,745.768,495.976,0.758307,736.024,497.476,0.613473],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000006_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[751.306,193.114,0.896955,751.467,335.249,0.842976,609.647,335.369,0.869248,518.008,518.286,0.930867,660.406,497.822,0.81866,853.455,325.312,0.835852,944.737,487.748,0.660784,934.584,609.267,0.385767,731.497,690.516,0.775961,639.843,690.553,0.752758,609.611,903.882,0.130364,0,0,0,832.553,690.388,0.752968,903.771,904.04,0.128443,0,0,0,701.271,162.886,0.825392,762.15,163.069,0.875763,680.962,183.246,0.850529,792.328,192.915,0.843703,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[994.119,598.786,0.0164417,943.538,617.925,0.0149049,923.715,616.558,0.0258954,929.183,617.925,0.0159098,928.5,604.254,0.00673464,927.816,618.609,0.020206,934.652,614.507,0.0155039,950.373,609.039,0.013148,940.803,661.672,0.00816032,927.133,615.191,0.0109911,945.588,613.824,0.0143918,942.17,662.355,0.00928992,941.487,658.254,0.00650845,927.816,613.14,0.0127482,946.955,614.507,0.0131436,946.955,613.824,0.0102703,940.803,660.304,0.00717042,929.867,617.242,0.0219561,933.968,622.026,0.0148498,951.74,608.356,0.0139517,951.056,611.773,0.0082527],"hand_right_keypoints_2d":[663.117,494.072,0.570682,680.379,461.799,0.604485,698.391,430.277,0.76865,717.155,406.26,0.728226,720.907,385.245,0.88547,729.914,455.795,0.767596,759.184,449.04,0.76046,747.176,445.288,0.495641,733.666,445.288,0.436248,734.417,481.313,0.78008,762.937,469.304,0.87803,749.427,465.552,0.61716,735.167,469.304,0.482604,735.167,504.579,0.768722,759.184,489.569,0.844975,750.178,488.068,0.687036,736.668,489.569,0.51394,735.167,519.59,0.788834,756.182,511.334,0.741365,748.677,506.831,0.707535,739.67,508.332,0.618858],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000007_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[751.399,193.302,0.90914,751.358,345.398,0.84687,609.405,345.254,0.872081,517.958,518.626,0.903718,670.21,507.869,0.83434,853.626,345.407,0.84721,954.709,507.894,0.655759,954.587,609.413,0.324828,741.282,691.208,0.728475,630.09,700.777,0.703244,629.815,954.68,0.132663,0,0,0,832.694,691.021,0.721702,863.307,964.733,0.117193,0,0,0,701.292,172.797,0.826509,762.185,172.933,0.881154,680.881,183.333,0.859485,792.417,192.974,0.835976,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[899.789,618.344,0.022144,912.426,621.153,0.0210166,918.744,612.728,0.0313477,920.148,616.238,0.0227913,929.274,614.132,0.00723802,924.36,614.132,0.0238469,940.506,661.167,0.0159474,941.91,664.677,0.0123855,944.718,660.465,0.00766875,929.274,614.834,0.0127388,960.162,647.829,0.0202886,947.526,664.677,0.0129625,949.632,654.147,0.00652059,930.678,616.238,0.0171259,960.864,645.723,0.0157704,959.46,649.935,0.0111432,962.268,699.076,0.00838276,930.678,616.94,0.0173356,956.652,621.153,0.0110733,963.672,706.096,0.013404,964.374,702.586,0.00913791],"hand_right_keypoints_2d":[661.491,497.128,0.531431,679.467,466.209,0.614091,694.568,434.57,0.773647,718.297,413.717,0.740232,721.892,391.426,0.883996,728.364,460.456,0.770919,757.845,449.67,0.734842,747.059,448.232,0.515621,732.678,448.951,0.412673,733.397,484.185,0.742041,761.44,470.523,0.811206,748.497,467.647,0.598075,734.835,471.961,0.444112,734.116,506.476,0.806044,758.564,491.376,0.792745,749.216,490.657,0.616878,734.835,494.252,0.509858,734.116,523.734,0.744073,752.812,512.948,0.739441,746.34,510.791,0.706524,737.711,512.229,0.567316],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000008_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[751.335,193.406,0.910719,751.602,345.426,0.864036,609.541,345.399,0.884448,518.077,528.01,0.928051,660.393,507.902,0.835867,853.742,345.219,0.845669,965.009,497.795,0.682837,995.054,609.663,0.378494,751.492,691.101,0.783311,650.198,691.19,0.738725,629.936,934.404,0.16087,0,0,0,842.698,690.9,0.77573,914.094,924.355,0.162998,0,0,0,701.336,172.869,0.830467,762.244,173.138,0.890364,680.951,183.244,0.843681,802.37,193.098,0.854136,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[1053.46,628.567,0.0436569,1035.45,612.634,0.0415815,1025.75,609.863,0.0131828,1018.13,605.707,0.0104537,1043.76,662.512,0.00653944,1025.75,637.573,0.0136059,1042.38,647.964,0.0140478,1057.62,649.35,0.0105934,1067.32,656.277,0.00914472,1027.83,624.411,0.0177551,1047.23,654.199,0.016921,1034.76,679.138,0.0120212,1068.01,657.663,0.00866475,1025.06,630.646,0.0165808,1020.9,647.272,0.0166058,1019.52,649.35,0.015061,1020.9,650.735,0.0108653,1011.2,643.808,0.0179672,1013.97,650.735,0.0143227,1022.29,670.132,0.0198256,1018.13,654.199,0.0129957],"hand_right_keypoints_2d":[661.654,499.768,0.547644,679.636,466.802,0.574421,696.119,433.835,0.733681,725.339,420.349,0.762296,733.58,401.618,0.882809,727.587,461.557,0.816514,758.305,449.569,0.768218,749.314,447.322,0.581002,735.079,449.569,0.488813,733.58,484.783,0.817558,762.051,469.049,0.82024,747.816,466.052,0.688859,735.079,469.049,0.497016,738.076,504.263,0.779257,759.054,490.777,0.81536,749.314,487.78,0.677633,737.327,490.777,0.478301,739.574,521.496,0.769742,756.807,510.257,0.710997,749.314,507.26,0.682011,739.574,508.759,0.567836],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000009_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[751.326,193.271,0.908796,751.631,345.343,0.865649,609.601,335.468,0.8702,517.968,518.435,0.915964,660.346,507.87,0.832141,853.774,345.369,0.853534,954.768,508.006,0.66432,1005.67,609.519,0.296341,741.488,690.806,0.774392,640.192,690.872,0.740703,630.029,924.192,0.12349,0,0,0,832.768,690.66,0.760062,914.067,904.001,0.107337,0,0,0,701.296,163.015,0.832422,762.263,172.9,0.889013,680.928,183.169,0.846589,802.414,192.992,0.858008,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[1057.59,628.972,0.0340893,1061.1,636.697,0.028915,1019.66,600.88,0.0165983,1022.47,602.987,0.0103786,1033.71,670.408,0.00435828,1063.91,617.033,0.021403,1014.75,690.073,0.0196142,1023.88,695.691,0.0113362,1037.22,672.515,0.00750857,1040.73,646.53,0.0204708,1025.28,673.92,0.0226301,1016.15,699.905,0.0110056,1037.92,671.11,0.00820735,1041.43,653.553,0.0222787,1025.28,672.515,0.0193479,1047.05,668.301,0.0134706,1046.35,669.003,0.00978292,1066.02,619.842,0.0315932,1060.4,658.469,0.0136089,1052.67,669.003,0.0137817,1049.86,668.301,0.0105171],"hand_right_keypoints_2d":[667.544,495.375,0.605825,681.056,464.597,0.582023,697.571,433.068,0.746411,726.848,418.055,0.759819,735.105,400.038,0.831974,727.598,456.339,0.655132,758.376,446.581,0.751057,748.617,445.83,0.533079,733.604,446.581,0.423851,734.354,479.61,0.657076,761.379,467.6,0.7971,747.116,463.846,0.664861,733.604,468.35,0.525261,738.108,500.63,0.727781,759.127,487.868,0.804683,749.368,486.367,0.623111,735.856,488.619,0.476237,740.36,517.144,0.756059,757.625,508.136,0.753197,749.368,505.884,0.65063,739.609,507.386,0.558477],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000011_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[741.526,193.122,0.879423,751.77,345.343,0.856571,609.71,335.434,0.859497,518.174,518.36,0.925147,660.459,497.964,0.821878,863.244,345.432,0.835953,954.528,517.72,0.679321,944.809,609.877,0.343769,741.504,690.535,0.786341,640.147,690.561,0.751782,609.348,883.723,0.184923,0,0,0,832.846,690.424,0.766729,924.083,893.787,0.196589,0,0,0,701.022,162.945,0.824051,761.939,163.044,0.872327,680.929,183.396,0.788002,792.263,192.914,0.834832,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[998.108,607.386,0.0269266,910.13,609.532,0.0230139,943.033,615.254,0.0407971,926.582,615.97,0.0153942,989.525,589.505,0.0103018,931.588,608.102,0.0380644,978.796,610.247,0.0195902,979.511,607.386,0.0318138,990.24,602.379,0.0165253,935.165,605.241,0.0313468,978.081,612.393,0.0211602,999.539,615.254,0.0148175,979.511,588.074,0.0105065,943.748,604.525,0.0309905,978.796,614.539,0.0201284,980.942,613.108,0.016527,978.081,591.65,0.0115754,938.026,615.254,0.0346533,957.338,620.261,0.036958,983.088,618.831,0.0260892,983.088,618.115,0.0156145],"hand_right_keypoints_2d":[661.64,494.235,0.572022,678.899,458.967,0.533759,695.407,428.201,0.752139,726.924,417.695,0.762198,738.93,401.187,0.789817,727.674,452.964,0.814387,758.44,443.209,0.717081,747.935,440.207,0.501437,735.178,443.959,0.41115,734.428,476.976,0.800224,759.941,463.469,0.848561,747.184,460.468,0.707667,734.428,464.22,0.520903,736.679,499.488,0.772263,758.44,484.48,0.894996,747.935,483.73,0.669805,734.428,487.482,0.564433,737.429,516.747,0.737251,756.189,505.491,0.779559,746.434,503.99,0.751946,737.429,505.491,0.617813],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000012_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[741.471,192.995,0.873271,751.802,335.347,0.854408,609.798,325.471,0.855926,517.994,518.324,0.936931,670.299,497.96,0.826419,863.226,335.273,0.825572,954.934,497.772,0.683702,995.353,599.6,0.378325,741.531,690.472,0.797184,640.119,690.452,0.763237,619.662,893.882,0.149694,0,0,0,832.872,690.394,0.77825,903.966,904.011,0.162636,0,0,0,700.932,162.846,0.824027,761.854,162.818,0.869557,680.876,183.312,0.807575,792.096,183.295,0.83498,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[1062.77,672.22,0.0314818,990.21,598.294,0.0167046,979.942,598.978,0.0125332,978.573,598.978,0.0116933,973.782,646.209,0.00586151,985.418,617.46,0.019581,987.472,628.412,0.0148792,1069.61,629.097,0.0116268,1076.46,637.995,0.00899358,1028.54,634.573,0.0253727,1051.82,642.787,0.0226812,1068.24,647.578,0.016897,1071.67,663.322,0.00771624,1023.75,624.305,0.0230629,1049.76,640.733,0.0196467,1069.61,660.584,0.0132682,1071.67,664.691,0.0100561,1023.07,614.037,0.0169245,1077.14,653.739,0.0124465,1066.19,668.113,0.0145504,1071.67,660.584,0.00980086],"hand_right_keypoints_2d":[664.145,493.591,0.577028,675.114,460.682,0.552415,689.218,430.124,0.748841,718.209,417.587,0.787622,729.962,398.782,0.84877,723.694,449.712,0.690778,754.252,436.392,0.738523,743.283,437.176,0.380804,726.045,442.66,0.298345,734.664,471.652,0.721879,760.521,455.981,0.825325,747.984,455.981,0.617245,733.097,462.249,0.534547,737.014,493.591,0.805984,761.304,476.353,0.857801,749.551,477.136,0.6459,736.231,481.838,0.552574,739.365,512.396,0.757776,757.387,499.859,0.72594,750.335,497.509,0.74404,740.932,500.643,0.577765],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000013_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[741.398,193.043,0.871853,751.852,335.637,0.849782,609.832,335.438,0.847703,518.361,528.042,0.924568,680.157,477.538,0.830972,863.268,335.523,0.825548,954.664,507.956,0.667273,964.729,609.376,0.321085,751.584,690.483,0.788843,650.15,690.519,0.745653,639.844,924.24,0.127974,0,0,0,842.78,681.008,0.774885,914.19,914.171,0.140478,0,0,0,700.917,162.967,0.823154,761.818,162.915,0.868892,680.905,192.785,0.7733,792.108,192.798,0.841446,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[1039.64,622.083,0.0257472,988.812,608.48,0.0200179,931.537,614.208,0.0315253,958.027,607.048,0.0135811,975.209,602.753,0.00514806,952.299,614.924,0.0198051,977.357,635.686,0.0178681,975.925,599.889,0.0133215,979.505,600.605,0.00944571,952.299,610.628,0.0153309,973.777,634.97,0.0242841,985.948,633.538,0.0155781,983.084,632.822,0.00921196,937.981,610.628,0.0201168,967.334,634.254,0.0229139,968.766,634.254,0.0165285,978.789,631.39,0.0106918,932.969,611.344,0.0314167,930.105,614.924,0.0205907,963.038,653.584,0.0228432,964.47,651.436,0.012794],"hand_right_keypoints_2d":[674.104,488.248,0.629084,672.539,453.049,0.6137,674.886,418.633,0.795628,701.48,400.642,0.853755,706.956,379.523,0.787557,705.391,427.237,0.595015,739.026,408.464,0.771664,728.857,417.85,0.425509,713.996,426.455,0.345048,720.253,447.574,0.634871,749.194,426.455,0.89504,736.679,433.494,0.561108,723.382,442.099,0.499072,731.204,470.258,0.739978,755.452,446.792,0.854444,744.501,454.614,0.681347,731.204,460.089,0.614236,739.808,487.466,0.642976,757.799,469.475,0.717849,749.194,471.822,0.652929,739.808,477.297,0.579618],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000014_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[741.408,193.042,0.874012,751.78,345.21,0.852668,609.718,335.429,0.862449,518.443,528.056,0.939692,680.3,477.439,0.831207,863.262,335.604,0.827839,964.729,508.187,0.669482,975.064,609.517,0.281924,761.211,690.637,0.791513,660.076,690.665,0.749052,639.924,934.438,0.137269,0,0,0,843.102,690.531,0.772376,913.802,934.493,0.132993,0,0,0,700.928,162.885,0.826275,761.833,162.908,0.869149,680.899,183.327,0.784016,792.111,183.425,0.835851,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[1040.9,613.578,0.0291603,990.225,606.234,0.0242827,938.08,612.109,0.014453,941.752,615.047,0.0125369,957.176,667.191,0.00583865,960.113,615.781,0.0152705,1021.81,667.926,0.0150984,991.694,649.565,0.00887042,957.91,668.66,0.00548623,1017.4,640.752,0.0118427,1023.27,672.333,0.0217462,1040.17,677.474,0.0133872,1045.31,681.146,0.0054632,1018.13,640.017,0.0118258,1024.01,676.739,0.0210174,1024.01,678.942,0.0143409,1043.1,680.411,0.00897256,935.877,615.781,0.0184036,939.549,618.719,0.0129929,987.287,662.785,0.0151092,990.959,662.785,0.00977464],"hand_right_keypoints_2d":[670.373,488.886,0.570276,669.591,452.134,0.570392,673.501,419.291,0.797592,700.87,400.524,0.844439,707.126,380.193,0.791952,702.434,428.675,0.596273,737.622,409.125,0.796945,727.457,417.727,0.406853,714.163,426.329,0.335627,718.855,449.788,0.642274,748.57,427.111,0.912208,735.276,434.148,0.564049,721.201,442.75,0.472851,730.585,470.119,0.7491,754.826,449.006,0.826472,743.096,453.698,0.656592,730.585,459.953,0.569308,740.75,487.322,0.681907,756.39,470.119,0.725184,750.134,470.119,0.649664,741.532,476.375,0.54289],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000015_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[741.286,193.019,0.876704,751.834,335.504,0.858082,609.821,335.38,0.860141,518.167,518.531,0.940906,670.508,477.812,0.808439,863.209,335.296,0.829807,964.689,507.816,0.679296,985.155,609.555,0.319979,751.739,690.536,0.800016,660.15,690.624,0.754427,650.02,924.225,0.141821,0,0,0,842.878,690.349,0.781651,924.344,903.812,0.141353,0,0,0,700.847,162.823,0.835734,761.82,162.876,0.878279,680.85,183.257,0.756112,792.311,192.816,0.851658,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[1002.92,580.717,0.0229688,1022.75,612.29,0.0420561,971.35,603.479,0.0174622,930.231,613.759,0.0131356,959.602,657.814,0.00583872,976.49,623.304,0.013776,972.818,640.192,0.012791,965.476,654.877,0.00970501,951.525,661.486,0.00767126,1008.8,634.318,0.0140717,997.049,656.346,0.0156523,998.517,675.437,0.00923147,1004.39,620.367,0.00614748,1010.27,635.052,0.0181309,1005.13,657.08,0.0177821,1005.13,660.017,0.0149139,1006.59,661.486,0.00921976,927.294,613.759,0.0217693,933.903,616.696,0.0177169,960.336,654.877,0.0198873,1005.13,663.688,0.0116214],"hand_right_keypoints_2d":[671.194,486.914,0.55942,669.691,453.856,0.597641,674.95,419.295,0.807785,701.246,401.264,0.829215,706.506,379.475,0.803037,703.5,429.062,0.605054,738.812,411.782,0.779931,728.294,418.544,0.434048,711.765,429.062,0.338428,719.278,447.845,0.689426,747.828,427.56,0.845142,735.807,435.073,0.524696,721.532,444.089,0.441035,730.548,470.385,0.701517,754.59,448.597,0.890342,744.072,455.359,0.643474,729.797,462.12,0.602656,738.812,486.914,0.674882,757.595,470.385,0.743405,748.58,473.39,0.674128,739.564,478.649,0.565264],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000016_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[741.402,193.083,0.866464,751.764,335.21,0.832489,609.718,335.198,0.84476,518.041,518.527,0.922817,670.528,477.516,0.819028,863.191,325.435,0.805569,954.837,497.969,0.636753,964.873,599.555,0.309433,751.409,690.626,0.772672,650.184,690.724,0.738344,629.82,934.366,0.159209,0,0,0,842.624,690.443,0.754188,913.868,924.245,0.164412,0,0,0,700.847,162.928,0.814052,761.838,162.909,0.861053,680.85,183.356,0.76775,792.093,183.317,0.812245,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[1001.15,577.893,0.0257944,1004.74,616.594,0.022677,925.9,612.294,0.0162931,928.767,615.161,0.012143,979.651,642.395,0.00685619,925.9,610.86,0.0158143,993.985,633.078,0.0129891,988.968,633.794,0.0104002,988.252,635.945,0.00792775,948.834,596.527,0.0134031,1004.74,628.061,0.0154633,994.702,636.661,0.0133292,988.968,633.794,0.00754746,948.834,598.677,0.0157911,1005.45,628.061,0.0162662,1004.74,625.194,0.0140912,987.535,630.928,0.010734,929.483,614.444,0.0272763,933.067,616.594,0.0188283,995.418,637.378,0.0144031,993.985,633.078,0.0107822],"hand_right_keypoints_2d":[670.469,490.3,0.554941,671.973,451.199,0.528943,675.732,418.113,0.813566,704.306,400.819,0.841073,711.074,381.268,0.857649,700.547,430.145,0.387777,741.151,412.098,0.797297,726.865,420.369,0.385056,711.074,430.145,0.383627,722.353,448.943,0.593327,750.175,430.145,0.872048,735.888,436.912,0.528859,721.601,445.935,0.476986,733.632,472.253,0.725943,755.438,448.943,0.827947,744.911,455.711,0.676896,730.624,463.23,0.581513,741.151,488.796,0.619412,758.446,470.749,0.721758,749.423,473.005,0.639819,740.399,479.021,0.554676],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000017_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[741.365,193.049,0.885498,751.63,335.473,0.859484,609.625,335.37,0.875327,517.877,518.551,0.944911,680.345,477.479,0.841223,863.109,335.297,0.844898,974.915,497.959,0.696751,1005.76,609.515,0.367097,751.529,690.79,0.811852,650.049,690.842,0.766413,599.605,914.013,0.152591,0,0,0,842.823,690.679,0.797153,923.956,924.155,0.138854,0,0,0,700.897,162.909,0.844839,761.831,162.928,0.880571,680.845,183.34,0.818548,792.147,192.88,0.85869,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[1059.38,689.774,0.0286378,1047.79,674.568,0.0159812,1026.07,605.78,0.0144265,1027.52,605.056,0.0138578,1044.17,590.574,0.00518869,1065.17,614.469,0.0287701,1065.17,616.641,0.0182585,1065.17,615.193,0.0118367,1065.17,613.745,0.00706802,1032.59,637.64,0.0253842,1044.9,630.399,0.0234529,1047.79,626.054,0.00936027,1065.17,614.469,0.00496063,1057.21,614.469,0.022044,1043.45,631.847,0.0212499,1047.07,626.054,0.0114153,1014.49,694.843,0.00602574,1069.52,615.917,0.0317158,1023.9,606.504,0.0155039,1008.69,695.567,0.0109783,1009.42,696.291,0.00710738],"hand_right_keypoints_2d":[670.077,489.478,0.551607,670.828,454.154,0.583811,676.841,419.582,0.755278,706.152,406.054,0.797308,713.668,385.761,0.833815,703.146,437.62,0.453236,742.227,418.079,0.774363,733.208,423.34,0.425712,723.438,430.104,0.298319,724.19,455.658,0.578921,751.246,436.117,0.810562,741.476,439.123,0.55131,728.699,444.384,0.522188,736.215,475.198,0.682108,755.004,456.409,0.772085,747.488,458.664,0.623883,735.463,463.173,0.472631,742.979,492.485,0.627418,756.507,478.205,0.747042,751.246,475.198,0.643085,742.979,481.211,0.513394],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000018_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[741.274,193.166,0.893634,751.703,335.407,0.869707,609.745,335.445,0.88268,518.208,518.333,0.958332,650.221,487.59,0.795748,853.745,325.241,0.8528,964.744,477.748,0.705983,1005.5,599.679,0.40779,751.437,690.47,0.809801,650.173,690.513,0.766888,609.59,893.859,0.128813,0,0,0,842.608,680.988,0.797793,903.934,914.028,0.128452,0,0,0,700.784,172.779,0.85627,761.779,163.055,0.889061,680.701,192.855,0.827009,792.14,192.99,0.881541,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[995.428,599.09,0.0292883,1060.47,637.148,0.023749,1044.56,691.121,0.0210655,1043.17,695.273,0.0252989,1041.79,704.96,0.0143842,1066.7,624,0.0367601,1042.48,693.889,0.0179204,1043.17,693.197,0.01206,1039.02,702.885,0.00752968,1048.71,646.143,0.0285003,1039.02,691.121,0.019582,1044.56,691.121,0.0105669,1045.25,693.889,0.00716629,1046.63,648.911,0.0239824,1049.4,685.585,0.0190573,1048.02,685.585,0.0126647,1050.09,684.201,0.00713442,1072.93,625.384,0.026435,1048.71,690.429,0.015248,1048.02,691.121,0.0112215,1050.79,685.585,0.0082756],"hand_right_keypoints_2d":[653.271,487.199,0.631615,679.53,458.688,0.595684,715.543,439.182,0.786955,750.055,443.683,0.860939,774.064,439.932,0.782461,736.55,478.946,0.660122,756.807,472.944,0.73364,744.803,463.19,0.334015,729.798,460.939,0.375074,733.549,503.704,0.805563,750.055,491.7,0.651974,738.051,481.196,0.710513,721.545,479.696,0.48663,726.047,520.961,0.803623,739.551,507.456,0.587686,726.797,498.453,0.553754,714.793,497.702,0.495057,714.042,534.465,0.817949,724.546,522.461,0.530639,716.293,516.459,0.525544,707.29,514.958,0.555811],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000019_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[741.365,193.154,0.891578,761.175,345.292,0.883858,609.888,335.504,0.877259,518.019,518.18,0.955257,660.068,477.474,0.798669,863.156,335.562,0.858904,965.004,497.863,0.712198,1005.23,609.581,0.381545,751.27,690.54,0.823537,640.184,690.65,0.781876,609.723,903.839,0.195313,0,0,0,842.564,690.369,0.818799,924.101,903.829,0.22291,0,0,0,700.964,172.786,0.84626,761.843,172.812,0.886557,680.924,192.853,0.794101,792.284,193.151,0.878844,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[1050.14,623.252,0.0370619,1005.15,602.867,0.0265397,1037.48,660.506,0.0128013,1038.19,660.506,0.0110141,1037.48,692.841,0.00414957,1063.49,649.26,0.0205228,1038.89,692.138,0.0198781,1038.19,694.247,0.0106462,1033.27,699.167,0.00556474,1048.03,646.448,0.0259352,1039.59,689.326,0.0236138,1019.91,723.066,0.0102659,1015.69,733.61,0.00511937,1049.43,645.042,0.0241124,1050.84,668.239,0.0191698,1017.1,700.573,0.0105683,1029.05,727.284,0.00736269,1071.22,646.448,0.0249788,1077.55,652.071,0.0129141,1024.83,721.661,0.0125213,1028.34,722.363,0.0079875],"hand_right_keypoints_2d":[655.186,485.044,0.640829,682.94,459.54,0.60274,718.196,440.037,0.768535,751.201,443.037,0.852478,775.204,437.786,0.808535,738.449,476.792,0.582104,757.952,473.042,0.73341,744.45,465.541,0.306574,730.197,462.54,0.321266,736.198,503.047,0.70889,751.201,491.795,0.524269,737.699,484.294,0.564036,723.446,479.793,0.436261,727.947,521.049,0.773813,741.449,509.047,0.525128,727.947,499.296,0.483592,715.945,496.295,0.378046,715.195,533.801,0.721754,726.447,521.799,0.453351,718.946,515.048,0.387793,709.194,514.298,0.424085],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000020_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[731.48,193.101,0.894504,751.625,335.571,0.869224,609.711,335.369,0.881406,518.169,518.31,0.96835,660.104,467.701,0.798769,853.695,335.336,0.859749,964.64,497.725,0.700082,995.271,599.658,0.383153,751.327,690.621,0.821605,650.194,690.711,0.782887,599.515,893.881,0.198877,0,0,0,833.06,690.472,0.809095,913.845,914.176,0.214034,0,0,0,700.755,162.945,0.86288,761.754,163.061,0.891642,680.719,183.391,0.792987,792.14,193.095,0.883727,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[991.671,574.856,0.0594542,1001.05,600.108,0.0464826,1002.49,606.601,0.0139649,1025.58,604.437,0.0128745,1041.45,594.336,0.00533364,1027.75,610.93,0.0211531,1037.12,656.383,0.0157928,1040.73,660.712,0.0100096,1053.72,667.206,0.00652408,1024.86,635.461,0.0279289,1047.23,643.397,0.0237161,1065.98,649.169,0.0138078,1053,669.37,0.00744686,1036.4,641.232,0.0243634,1047.95,642.675,0.0211481,1050.11,659.269,0.0128714,1053.72,665.763,0.00991902,1060.93,615.259,0.0234723,1046.5,668.649,0.0113474,1042.17,686.686,0.0152882,1040.73,685.964,0.010346],"hand_right_keypoints_2d":[654.411,484.02,0.671943,679.926,455.503,0.598341,716.698,435.992,0.843972,751.219,441.245,0.896917,774.482,435.992,0.815157,736.96,475.765,0.669276,757.973,471.262,0.830598,746.716,463.008,0.439239,732.458,459.255,0.497104,731.707,501.28,0.769428,750.468,489.273,0.680958,738.461,478.767,0.798928,724.953,475.015,0.598916,724.953,517.04,0.756335,741.463,502.781,0.671063,729.456,494.526,0.668403,717.449,492.275,0.520201,715.197,529.797,0.837696,727.955,518.541,0.639654,721.951,511.787,0.572778,712.195,509.535,0.561395],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000021_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[731.488,192.964,0.888533,751.705,335.608,0.879713,609.781,335.545,0.884888,518.083,518.403,0.958167,650.262,477.457,0.802798,853.761,335.24,0.855322,954.824,497.787,0.697618,1015.62,609.308,0.337544,751.283,690.579,0.813535,650.1,690.752,0.772942,619.539,913.988,0.159621,0,0,0,833.034,690.34,0.802513,923.912,904.038,0.167634,0,0,0,700.74,162.709,0.861463,761.795,162.746,0.891724,680.747,183.223,0.772592,792.312,192.817,0.867437,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[1058.86,622.236,0.199579,1049.03,637.684,0.134873,1045.52,666.472,0.0826291,1044.11,694.559,0.0619489,1046.92,705.091,0.0333642,1042.71,665.77,0.045549,1038.5,700.176,0.0365785,1037.09,711.411,0.0196576,1039.2,705.091,0.013295,1037.09,686.133,0.0261732,1031.47,700.176,0.0304077,1018.13,705.091,0.0160172,1037.09,704.389,0.0139758,1042.01,681.92,0.0230963,1026.56,698.772,0.024823,1011.81,698.07,0.0204646,1032.88,730.369,0.0126116,1045.52,662.26,0.0287188,1004.09,687.537,0.0191115,1007.6,692.452,0.0207033,1006.2,693.857,0.0127908],"hand_right_keypoints_2d":[654.108,484.956,0.659365,678.872,455.69,0.591251,715.643,435.428,0.779901,750.163,438.43,0.837919,771.926,431.676,0.764443,736.656,472.95,0.639055,758.418,470.698,0.714231,744.91,460.192,0.324624,732.153,457.191,0.32597,732.153,497.714,0.707375,751.664,488.709,0.667231,738.907,478.203,0.669311,726.149,475.201,0.478019,724.649,516.474,0.738255,744.16,502.967,0.626998,732.903,494.712,0.546738,720.896,491.71,0.337303,715.643,531.483,0.762068,728.401,520.977,0.477522,724.649,514.223,0.474339,714.143,510.471,0.409687],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|
USL/data/datasets/words_dataset/good/1564405243.754477/000000000022_keypoints.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1.3,"people":[{"person_id":[-1],"pose_keypoints_2d":[741.471,193.049,0.881709,751.55,335.32,0.847564,609.565,335.411,0.877748,517.949,518.56,0.936839,670.322,467.368,0.828338,853.718,325.239,0.839694,964.667,497.668,0.691639,1015.83,599.458,0.367669,751.403,690.652,0.794646,650.048,690.841,0.75183,639.881,934.411,0.205156,670.474,1167.92,0.0536389,842.651,690.373,0.787031,923.832,914.113,0.238126,0,0,0,700.942,162.985,0.837204,761.839,162.917,0.877185,680.836,183.401,0.822535,782.526,192.815,0.848555,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"face_keypoints_2d":[],"hand_left_keypoints_2d":[990.59,577.387,0.025408,1004.88,599.201,0.0240759,1001.12,633.801,0.0133123,1000.37,633.049,0.0129143,1037.98,673.667,0.00423409,1066.56,618.757,0.0282273,1037.98,677.428,0.0190498,1041.74,680.436,0.0117153,1048.51,688.71,0.00706611,1036.47,628.536,0.0181104,1072.58,647.34,0.0226435,1040.23,678.18,0.0101566,1052.27,687.958,0.00718995,1042.49,659.375,0.0260755,1074.83,650.349,0.0190575,1076.34,657.119,0.0124004,1072.58,663.888,0.00779441,1069.57,624.023,0.0174882,1080.85,642.075,0.0135524,1083.86,654.11,0.014146,1082.36,656.367,0.00871287],"hand_right_keypoints_2d":[656.749,482.779,0.6237,678.535,448.221,0.649963,698.819,418.171,0.798517,726.615,405.4,0.799026,738.635,387.37,0.873262,731.123,446.719,0.693909,755.163,439.206,0.759842,743.894,436.201,0.450714,728.869,439.957,0.399251,734.128,473.012,0.715921,756.665,459.49,0.763264,741.64,454.231,0.71725,725.864,459.49,0.524409,733.377,494.799,0.752003,751.407,478.271,0.734413,737.133,476.017,0.646466,726.615,476.769,0.548413,730.372,510.575,0.726219,743.143,499.306,0.681801,735.63,493.296,0.621677,724.362,494.799,0.566909],"pose_keypoints_3d":[],"face_keypoints_3d":[],"hand_left_keypoints_3d":[],"hand_right_keypoints_3d":[]}]}
|