Skip to content

Commit 2e7023d

Browse files
committed
Update
1 parent 28597e6 commit 2e7023d

File tree

3 files changed

+113
-1
lines changed

3 files changed

+113
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# A demo program of gaze estimation models (MPIIGaze, MPIIFaceGaze, ETH-XGaze)
22

33
[![PyPI version](https://badge.fury.io/py/ptgaze.svg)](https://pypi.org/project/ptgaze/)
4+
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/hysts/pytorch_mpiigaze_demo/blob/master/demo.ipynb)
45

56
With this program, you can run gaze estimation on images and videos.
67
By default, the video from a webcam will be used.

demo.ipynb

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "07236d7c",
7+
"metadata": {
8+
"ExecuteTime": {
9+
"start_time": "2021-10-21T09:52:57.162Z"
10+
}
11+
},
12+
"outputs": [],
13+
"source": [
14+
"!git clone -q https://github.com/hysts/pytorch_mpiigaze_demo\n",
15+
"!cd pytorch_mpiigaze_demo && python setup.py install\n",
16+
"!pip install -U pyyaml"
17+
]
18+
},
19+
{
20+
"cell_type": "code",
21+
"execution_count": null,
22+
"id": "a7f04682",
23+
"metadata": {
24+
"ExecuteTime": {
25+
"start_time": "2021-10-21T09:53:05.033Z"
26+
}
27+
},
28+
"outputs": [],
29+
"source": [
30+
"!ptgaze --mode eth-xgaze --video pytorch_mpiigaze_demo/assets/inputs/video01.mp4 --o . --no-screen"
31+
]
32+
},
33+
{
34+
"cell_type": "code",
35+
"execution_count": null,
36+
"id": "af873e50",
37+
"metadata": {
38+
"ExecuteTime": {
39+
"start_time": "2021-10-21T09:53:12.015Z"
40+
}
41+
},
42+
"outputs": [],
43+
"source": [
44+
"!ffmpeg -i video01.avi -c:v libx264 out.mp4"
45+
]
46+
},
47+
{
48+
"cell_type": "code",
49+
"execution_count": null,
50+
"id": "ead94a63",
51+
"metadata": {
52+
"ExecuteTime": {
53+
"start_time": "2021-10-21T09:53:24.304Z"
54+
}
55+
},
56+
"outputs": [],
57+
"source": [
58+
"from IPython.display import HTML\n",
59+
"from base64 import b64encode\n",
60+
"\n",
61+
"HTML(f\"\"\"\n",
62+
"<video height=400 controls>\n",
63+
" <source src=\"data:video/mp4;base64,{b64encode(open('out.mp4','rb').read()).decode()}\" type=\"video/mp4\">\n",
64+
"</video>\n",
65+
"\"\"\")"
66+
]
67+
},
68+
{
69+
"cell_type": "code",
70+
"execution_count": null,
71+
"id": "4cd9b150",
72+
"metadata": {},
73+
"outputs": [],
74+
"source": []
75+
}
76+
],
77+
"metadata": {
78+
"kernelspec": {
79+
"display_name": "Python 3",
80+
"language": "python",
81+
"name": "python3"
82+
},
83+
"language_info": {
84+
"codemirror_mode": {
85+
"name": "ipython",
86+
"version": 3
87+
},
88+
"file_extension": ".py",
89+
"mimetype": "text/x-python",
90+
"name": "python",
91+
"nbconvert_exporter": "python",
92+
"pygments_lexer": "ipython3",
93+
"version": "3.9.5"
94+
},
95+
"toc": {
96+
"base_numbering": 1,
97+
"nav_menu": {},
98+
"number_sections": true,
99+
"sideBar": true,
100+
"skip_h1_title": false,
101+
"title_cell": "Table of Contents",
102+
"title_sidebar": "Contents",
103+
"toc_cell": false,
104+
"toc_position": {},
105+
"toc_section_display": true,
106+
"toc_window_display": false
107+
}
108+
},
109+
"nbformat": 4,
110+
"nbformat_minor": 5
111+
}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def _get_requirements(path):
1818

1919
setup(
2020
name='ptgaze',
21-
version='0.2.3',
21+
version='0.2.4',
2222
author='hysts',
2323
url='https://github.com/hysts/pytorch_mpiigaze_demo',
2424
python_requires='>=3.7',

0 commit comments

Comments
 (0)