From 2e7023d0dd2b0f67bb29083cb996f25772721a52 Mon Sep 17 00:00:00 2001 From: hysts Date: Thu, 21 Oct 2021 18:36:01 +0900 Subject: [PATCH] Update --- README.md | 1 + demo.ipynb | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 2 +- 3 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 demo.ipynb diff --git a/README.md b/README.md index 861b4c2..5124725 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # A demo program of gaze estimation models (MPIIGaze, MPIIFaceGaze, ETH-XGaze) [![PyPI version](https://badge.fury.io/py/ptgaze.svg)](https://pypi.org/project/ptgaze/) +[![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) With this program, you can run gaze estimation on images and videos. By default, the video from a webcam will be used. diff --git a/demo.ipynb b/demo.ipynb new file mode 100644 index 0000000..521e641 --- /dev/null +++ b/demo.ipynb @@ -0,0 +1,111 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "07236d7c", + "metadata": { + "ExecuteTime": { + "start_time": "2021-10-21T09:52:57.162Z" + } + }, + "outputs": [], + "source": [ + "!git clone -q https://github.com/hysts/pytorch_mpiigaze_demo\n", + "!cd pytorch_mpiigaze_demo && python setup.py install\n", + "!pip install -U pyyaml" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a7f04682", + "metadata": { + "ExecuteTime": { + "start_time": "2021-10-21T09:53:05.033Z" + } + }, + "outputs": [], + "source": [ + "!ptgaze --mode eth-xgaze --video pytorch_mpiigaze_demo/assets/inputs/video01.mp4 --o . --no-screen" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "af873e50", + "metadata": { + "ExecuteTime": { + "start_time": "2021-10-21T09:53:12.015Z" + } + }, + "outputs": [], + "source": [ + "!ffmpeg -i video01.avi -c:v libx264 out.mp4" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ead94a63", + "metadata": { + "ExecuteTime": { + "start_time": "2021-10-21T09:53:24.304Z" + } + }, + "outputs": [], + "source": [ + "from IPython.display import HTML\n", + "from base64 import b64encode\n", + "\n", + "HTML(f\"\"\"\n", + "\n", + "\"\"\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4cd9b150", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "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.9.5" + }, + "toc": { + "base_numbering": 1, + "nav_menu": {}, + "number_sections": true, + "sideBar": true, + "skip_h1_title": false, + "title_cell": "Table of Contents", + "title_sidebar": "Contents", + "toc_cell": false, + "toc_position": {}, + "toc_section_display": true, + "toc_window_display": false + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/setup.py b/setup.py index a476d40..7d10352 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ def _get_requirements(path): setup( name='ptgaze', - version='0.2.3', + version='0.2.4', author='hysts', url='https://github.com/hysts/pytorch_mpiigaze_demo', python_requires='>=3.7',