Skip to content

Commit

Permalink
fix: designs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tiwarishubham635 committed Sep 25, 2022
1 parent 1d92372 commit 0e1bcbe
Show file tree
Hide file tree
Showing 22 changed files with 3,911 additions and 1,190 deletions.
907 changes: 722 additions & 185 deletions .ipynb_checkpoints/PrepareModelBenchmark-checkpoint.ipynb

Large diffs are not rendered by default.

1,627 changes: 1,225 additions & 402 deletions .ipynb_checkpoints/PrepareModelCustom-checkpoint.ipynb

Large diffs are not rendered by default.

14 changes: 6 additions & 8 deletions .ipynb_checkpoints/app-checkpoint.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"no_sequences = 1200\n",
"\n",
"# no of frames in each video\n",
"#sequence_length = 30\n",
"sequence_length = 30\n",
"\n",
"label_map = {label:num for num, label in enumerate(actions)}\n",
"#label_map\n",
Expand All @@ -171,7 +171,7 @@
"outputs": [],
"source": [
"# change the .h5 file with the one you saved\n",
"model = load_model('models/weights_custom.h5')"
"model = load_model('weights_custom.h5')"
]
},
{
Expand Down Expand Up @@ -280,7 +280,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 16,
"id": "b1950407",
"metadata": {
"scrolled": true
Expand All @@ -294,8 +294,6 @@
"predictions = []\n",
"lst = []\n",
"threshold = 0.5\n",
"num_of_frames = 30\n",
"batch_size = 16\n",
"\n",
"cap = cv2.VideoCapture(0)\n",
"# Set mediapipe model \n",
Expand All @@ -318,10 +316,10 @@
" kp = extract_keypoints(results)\n",
" sequence.append(kp)\n",
" seq.append(keypoints)\n",
" sequence = sequence[-1*num_of_frames:]\n",
" seq = seq[-1*batch_size:]\n",
" sequence = sequence[-1*sequence_length:]\n",
" seq = seq[-1*sequence_length:]\n",
" \n",
" if len(sequence) == num_of_frames:\n",
" if len(sequence) == sequence_length:\n",
" res = model.predict(np.expand_dims(seq, axis=0))[0]\n",
" #print(actions[np.argmax(res)])\n",
"\n",
Expand Down
Loading

0 comments on commit 0e1bcbe

Please sign in to comment.