digyt / cateyes Goto Github PK
View Code? Open in Web Editor NEWCategorization for Eye Tracking - simplified
License: BSD 3-Clause "New" or "Revised" License
Categorization for Eye Tracking - simplified
License: BSD 3-Clause "New" or "Revised" License
Hi!,
I have some doubts about the input for the classify_uneye() function.
Should x and y coordinates be given as relative positions with respect to the center of the image?
Thanks
CNN classifiers are relatively popular.
@DiGyt Implement them when you have the time.
U'n'Eye should work fine. See:
https://github.com/berenslab/uneye
Also make U'n'Eye and NSLR-HMM secondary dependencies then, in order to not overblow and make the package work on pypi.
Hi,
When installing the package through the provided command I get the following error:
`error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [77 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\nslr
copying nslr\slow_nslr.py -> build\lib.win-amd64-cpython-310\nslr
copying nslr_init_.py -> build\lib.win-amd64-cpython-310\nslr
running build_ext
building 'nslr.cppnslr' extension
Traceback (most recent call last):
File "C:\Users\Cartella Giuseppe\AppData\Local\Temp\pip-install-gc8d8rvr\nslr_bae510abf886422c9ae5dea41dd1069a\setup.py", line 125, in build_extensions
return self._do_build_extensions()
File "C:\Users\Cartella Giuseppe\AppData\Local\Temp\pip-install-gc8d8rvr\nslr_bae510abf886422c9ae5dea41dd1069a\setup.py", line 121, in _do_build_extensions
build_ext.build_extensions(self)
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools_distutils\command\build_ext.py", line 467, in build_extensions
self._build_extensions_serial()
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools_distutils\command\build_ext.py", line 493, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\command\build_ext.py", line 246, in build_extension
_build_ext.build_extension(self, ext)
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools_distutils\command\build_ext.py", line 548, in build_extension
objects = self.compiler.compile(
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools_distutils_msvccompiler.py", line 343, in compile
self.initialize()
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools_distutils_msvccompiler.py", line 253, in initialize
vc_env = _get_vc_env(plat_spec)
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\msvc.py", line 214, in msvc14_get_vc_env
return _msvc14_get_vc_env(plat_spec)
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\msvc.py", line 168, in _msvc14_get_vc_env
raise distutils.errors.DistutilsPlatformError(
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Cartella Giuseppe\AppData\Local\Temp\pip-install-gc8d8rvr\nslr_bae510abf886422c9ae5dea41dd1069a\setup.py", line 171, in <module>
try_setup(True)
File "C:\Users\Cartella Giuseppe\AppData\Local\Temp\pip-install-gc8d8rvr\nslr_bae510abf886422c9ae5dea41dd1069a\setup.py", line 169, in try_setup
setup(**params)
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\dist.py", line 1234, in run_command
super().run_command(command)
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\wheel\bdist_wheel.py", line 325, in run
self.run_command("build")
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\dist.py", line 1234, in run_command
super().run_command(command)
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
self.run_command(cmd_name)
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\dist.py", line 1234, in run_command
super().run_command(command)
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
_build_ext.run(self)
File "C:\Users\Cartella Giuseppe\anaconda3\envs\my_new_env\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
self.build_extensions()
File "C:\Users\Cartella Giuseppe\AppData\Local\Temp\pip-install-gc8d8rvr\nslr_bae510abf886422c9ae5dea41dd1069a\setup.py", line 127, in build_extensions
raise BuildFailed()
__main__.BuildFailed
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for nslr
ERROR: Could not build wheels for nslr, which is required to install pyproject.toml-based projects`
Any hints on how to solve?
Thank you in advance
Hi!
Great toolbox - I am trying to use it in a course of mine.
One question I stumbled upon, why are there segments and classes?
Using convert = lambda c: np.cumsum(np.append(0,np.array(c)[1:] != np.array(c)[0:-1]))
one could easily convert from classes to segments on the fly *
But I noticed, it is not actually the same for some algorithms, which means there have to be two segments with the same type next to each other, e.g. fixation following a fixation.
Has it something to do with e.g. missing values (blink) splitting up a fixation in two?
I am asking because it is a bit cumbersom to carry arround two lists instead of one :)
Cheers, Bene
`
* (didnt really test it, so maybe the 0 should be at the end ;))
Hi!
I have some questions about the usage of the nslr_hmm algorithm (classify_nslr_hmm() function).
I have x and y coordinates (in pixels) from eye tracking recording. The origin (0,0) is on the upper left corner of an image.
Should I convert them to coordinates relative to the center and then use the cateyes.pixel_to_degree function?
Thank you
Giuseppe
Installing cateyes on windows 10 via pip install git+https://github.com/DiGyt/cateyes.git
produces follwing error for me:
Building wheels for collected packages: cateyes, nslr, nslr-hmm
Building wheel for cateyes (pyproject.toml) ... done
Created wheel for cateyes: filename=cateyes-0.0.5-py3-none-any.whl size=786039 sha256=03684d7958eb599f09b53c36c13fe348064d89dc3683b7c1bc06ed4bbdfbde5a
Stored in directory: C:\Users\eyetrax\AppData\Local\Temp\pip-ephem-wheel-cache-nxatv2d6\wheels\49\7d\66\023dbc997d6c18309bea56763172cc2f7169c4cb1d3eea80f2
Building wheel for nslr (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for nslr (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [107 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-312
creating build\lib.win-amd64-cpython-312\nslr
copying nslr\slow_nslr.py -> build\lib.win-amd64-cpython-312\nslr
copying nslr\__init__.py -> build\lib.win-amd64-cpython-312\nslr
running build_ext
building 'nslr.cppnslr' extension
creating build\temp.win-amd64-cpython-312
creating build\temp.win-amd64-cpython-312\Release
creating build\temp.win-amd64-cpython-312\Release\nslr
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ideps\eigen-3.3.4 -Ideps\pybind11-2.10.3\include -IC:\Users\eyetrax\AppData\Local\Programs\Python\Python312\include -IC:\Users\eyetrax\AppData\Local\Programs\Python\Python312\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpnslr/cppnslr.cpp /Fobuild\temp.win-amd64-cpython-312\Release\nslr/cppnslr.obj /EHsc /DVERSION_INFO=\\\"0.1.3\\\"
cppnslr.cpp
C:\Users\eyetrax\AppData\Local\Temp\pip-install-h8viv0bd\nslr_d9267c2fee144b47a89cc39a74c71a3a\nslr\../segmented_regression.hpp(572): error C7555: Die Verwendung designierter Initialisierer erfordert mindestens "/std:c++20".
C:\Users\eyetrax\AppData\Local\Temp\pip-install-h8viv0bd\nslr_d9267c2fee144b47a89cc39a74c71a3a\nslr\../segmented_regression.hpp(638): error C7555: Die Verwendung designierter Initialisierer erfordert mindestens "/std:c++20".
nslr/cppnslr.cpp(25): warning C4996: 'pybind11_init': PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE
nslr/cppnslr.cpp(27): warning C4996: 'pybind11::module_::module_': Use PYBIND11_MODULE or module_::create_extension_module instead
Traceback (most recent call last):
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 419, in compile
self.spawn(args)
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 517, in spawn
return super().spawn(cmd, env=env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\ccompiler.py", line 1041, in spawn
spawn(cmd, dry_run=self.dry_run, **kwargs)
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\spawn.py", line 70, in spawn
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 125, in build_extensions
File "<string>", line 121, in _do_build_extensions
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 467, in build_extensions
self._build_extensions_serial()
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 493, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\command\build_ext.py", line 249, in build_extension
_build_ext.build_extension(self, ext)
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 548, in build_extension
objects = self.compiler.compile(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 421, in compile
raise CompileError(msg)
distutils.errors.CompileError: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\eyetrax\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Users\eyetrax\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\eyetrax\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\build_meta.py", line 434, in build_wheel
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\build_meta.py", line 419, in _build_with_temp_dir
self.run_setup()
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\build_meta.py", line 507, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
exec(code, locals())
File "<string>", line 171, in <module>
File "<string>", line 169, in try_setup
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\dist.py", line 989, in run_command
super().run_command(command)
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 364, in run
self.run_command("build")
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\dist.py", line 989, in run_command
super().run_command(command)
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
self.run_command(cmd_name)
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\dist.py", line 989, in run_command
super().run_command(command)
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\command\build_ext.py", line 88, in run
_build_ext.run(self)
File "C:\Users\eyetrax\AppData\Local\Temp\pip-build-env-d88qgqh9\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
self.build_extensions()
File "<string>", line 127, in build_extensions
BuildFailed
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for nslr
Building wheel for nslr-hmm (pyproject.toml) ... done
Created wheel for nslr-hmm: filename=nslr_hmm-0.0.1-py3-none-any.whl size=16928 sha256=956774d1aa9038689544cddadae976dd6a986d0a1a8887b6e62c2819280a7ba3
Stored in directory: C:\Users\eyetrax\AppData\Local\Temp\pip-ephem-wheel-cache-nxatv2d6\wheels\97\58\5b\c0a0b6e01d1faf56becbb7270d6047c1070fe3f645f59233e9
Successfully built cateyes nslr-hmm
Failed to build nslr
ERROR: Could not build wheels for nslr, which is required to install pyproject.toml-based projects
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.