AceCentre / EyeCommander

An open source computer vision interface that tracks eye movements for individuals with severely-limited mobility.
https://docs.acecentre.org.uk/eyecommander
MIT License
53 stars 4 forks source link

occasional crash #20

Closed willwade closed 2 years ago

willwade commented 2 years ago

Update: I think this is a repost of #21 ..

Just parking this here..

Might be nothing

PS C:\GitHub\EyeCommander> python .\eyecommand.py -j --camera 1
2021-09-18 11:25:33.983138: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2021-09-18 11:25:33.983584: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
2021-09-18 11:25:42.522970: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found
2021-09-18 11:25:42.524022: W tensorflow/stream_executor/cuda/cuda_driver.cc:326] failed call to cuInit: UNKNOWN ERROR (303)
2021-09-18 11:25:42.532169: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: ace-old-00014
2021-09-18 11:25:42.532973: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: ace-old-00014
2021-09-18 11:25:42.534280: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
[ WARN:0] global C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-sn_xpupm\opencv\modules\videoio\src\cap_msmf.cpp (1022) CvCapture_MSMF::grabFrame videoio(MSMF): can't grab frame. Error: -2147483638
Traceback (most recent call last):
  File "C:\GitHub\EyeCommander\eyecommand.py", line 30, in <module>
    eyecommand()
  File "C:\Users\wwade\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\wwade\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "C:\Users\wwade\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\wwade\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 763, in invoke
[ W    return __callback(*args, **kwargs)
  File "C:\GitHub\EyeCommander\eyecommand.py", line 26, in eyecommand
ARN:1] glob    eyecommander.run()
al  File "C:\GitHub\EyeCommander\eye_commander\commander\commander.py", line 166, in run
 C:\Use    display.draw_position_rect(frame=frame, color='white')
rs  File "C:\GitHub\EyeCommander\eye_commander\display_tools\display.py", line 19, in draw_position_rect
\runneradmi    h, w = np.shape(frame)[:2]
n\AValueError: not enough values to unpack (expected 2, got 0)
ppData\Local\Temp\pip-req-build-sn_xpupm\opencv\modules\videoio\src\cap_msmf.cpp (376) `anonymous-namespace'::SourceReaderCB::OnReadSample videoio(MSMF): OnReadSample() is called with error status: -2147467259 -2147467259                                                                                                                                                                                         c ReadSample() call is failed with error status: -2147467259
[ WARN:1] global C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-sn_xpupm\opencv\modules\videoio\src\cap_msmf.cpp (388) `anonymous-namespace'::SourceReaderCB::OnReadSample videoio(MSMF): async callbackc ReadSample() call is failed with error status: -2147467259                                                                                                                                         c callback
[ WARN:0] global C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-sn_xpupm\opencv\modules\videoio\src\cap_msmf.cpp (438) `anonymous-namespace'::SourceReaderCB::~SourceReaderCB terminating async callback
[ WARN:0] global C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-sn_xpupm\opencv\modules\videoio\src\cap_msmf.cpp (438) `anonymous-namespace'::SourceReaderCB::~SourceReaderCB terminating async callback
willwade commented 2 years ago

OK. Got it. But don't get it..

@Dkashkett - Whats happening here. https://github.com/AceCentre/EyeCommander/blob/3f96c5bbb329896bc8c9651640e246797676b7a0/eye_commander/commander/commander.py#L140

Whats happening is that None Is getting sent to the output handler.. But I don't get how.. This part of the code is only run on detection of a movement right?

                            if self.output_vjoyswitch:
                                switches = {'up': 1, 'right': 2,
                                            'down': 3, 'right': 4, 'center': 5}
                               vjoy_switch.Switch_Press_Release(
                                        switches[label])

Label is often type "None". I copied the logic from the keyboard keys code so don't get what I could be doing wrong..