Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
prithvimk committed Feb 6, 2022
0 parents commit c284ea0
Show file tree
Hide file tree
Showing 5 changed files with 3,539 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
venv
252 changes: 252 additions & 0 deletions data_exploratory_analysis.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>hand_landmark</th>\n",
" <th>lmx</th>\n",
" <th>lmy</th>\n",
" <th>gesture</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>0</td>\n",
" <td>245</td>\n",
" <td>443</td>\n",
" <td>two</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1</td>\n",
" <td>217</td>\n",
" <td>412</td>\n",
" <td>two</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>2</td>\n",
" <td>202</td>\n",
" <td>340</td>\n",
" <td>two</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>3</td>\n",
" <td>213</td>\n",
" <td>278</td>\n",
" <td>two</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>4</td>\n",
" <td>235</td>\n",
" <td>247</td>\n",
" <td>two</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25195</th>\n",
" <td>16</td>\n",
" <td>282</td>\n",
" <td>506</td>\n",
" <td>two</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25196</th>\n",
" <td>17</td>\n",
" <td>327</td>\n",
" <td>481</td>\n",
" <td>two</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25197</th>\n",
" <td>18</td>\n",
" <td>322</td>\n",
" <td>458</td>\n",
" <td>two</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25198</th>\n",
" <td>19</td>\n",
" <td>304</td>\n",
" <td>489</td>\n",
" <td>two</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25199</th>\n",
" <td>20</td>\n",
" <td>292</td>\n",
" <td>516</td>\n",
" <td>two</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>25200 rows × 4 columns</p>\n",
"</div>"
],
"text/plain": [
" hand_landmark lmx lmy gesture\n",
"0 0 245 443 two\n",
"1 1 217 412 two\n",
"2 2 202 340 two\n",
"3 3 213 278 two\n",
"4 4 235 247 two\n",
"... ... ... ... ...\n",
"25195 16 282 506 two\n",
"25196 17 327 481 two\n",
"25197 18 322 458 two\n",
"25198 19 304 489 two\n",
"25199 20 292 516 two\n",
"\n",
"[25200 rows x 4 columns]"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = pd.read_csv('gestures.csv')\n",
"df"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['HandLandmark.WRIST',\n",
" 'HandLandmark.THUMB_CMC',\n",
" 'HandLandmark.THUMB_MCP',\n",
" 'HandLandmark.THUMB_IP',\n",
" 'HandLandmark.THUMB_TIP',\n",
" 'HandLandmark.INDEX_FINGER_MCP',\n",
" 'HandLandmark.INDEX_FINGER_PIP',\n",
" 'HandLandmark.INDEX_FINGER_DIP',\n",
" 'HandLandmark.INDEX_FINGER_TIP',\n",
" 'HandLandmark.MIDDLE_FINGER_MCP',\n",
" 'HandLandmark.MIDDLE_FINGER_PIP',\n",
" 'HandLandmark.MIDDLE_FINGER_DIP',\n",
" 'HandLandmark.MIDDLE_FINGER_TIP',\n",
" 'HandLandmark.RING_FINGER_MCP',\n",
" 'HandLandmark.RING_FINGER_PIP',\n",
" 'HandLandmark.RING_FINGER_DIP',\n",
" 'HandLandmark.RING_FINGER_TIP',\n",
" 'HandLandmark.PINKY_MCP',\n",
" 'HandLandmark.PINKY_PIP',\n",
" 'HandLandmark.PINKY_DIP',\n",
" 'HandLandmark.PINKY_TIP']"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import mediapipe as mp\n",
"\n",
"mpHands = mp.solutions.hands\n",
"points = []\n",
"for point in mpHands.HandLandmark:\n",
" points.append(str(point))\n",
"\n",
"points"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[[5, 6, 7], [1, 2, 3], [2, 4, 6]]"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"g = [[5, 6, 7]]\n",
"l = [[1, 2, 3], [2, 4, 6]]\n",
"\n",
"g += l\n",
"\n",
"g"
]
}
],
"metadata": {
"interpreter": {
"hash": "47106c6b88aeea239e5473066f6efa9ce6b28b75987194b485f6af2aeeb55b7b"
},
"kernelspec": {
"display_name": "Python 3.8.1 ('venv': venv)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.1"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading

0 comments on commit c284ea0

Please sign in to comment.