akai-katto / dandere2x

Dandere2x - Fast Waifu2x Video Upscaling.
https://www.reddit.com/r/Dandere2x/
GNU General Public License v3.0
1.45k stars 77 forks source link

Docker version... MinDisk error #185

Open AbelVM opened 3 years ago

AbelVM commented 3 years ago

Getting this in stdout eventually only on some runs

    Exception in thread Min Disk Thread:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/dandere2x/dandere2x/src/dandere2x/dandere2x_service/core/min_disk_usage.py", line 91, in run
    self.progressive_frame_extractor.release_capture()
  File "/dandere2x/dandere2x/src/dandere2x/dandere2xlib/wrappers/cv2/progressive_frame_extractor.py", line 32, in release_capture
    cv2.destroyAllWindows()
cv2.error: OpenCV(3.4.11) /tmp/pip-req-build-zc_q1ino/opencv/modules/highgui/src/window.cpp:652: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvDestroyAllWindows'

It keeps running anyway, but never ends

akai-katto commented 3 years ago

I'mt aking a guess that opencv deprecated this function sometime without me realizing it. I'll look into it today.

akai-katto commented 3 years ago

I added a try / catch (https://github.com/akai-katto/dandere2x/pull/186) to this - I'm not sure when cv2 deprecated support for this function, but if you can, could you give the docker a try? I triggered a rebuild of it.

AbelVM commented 3 years ago

Sure, but the file takes ~ 7h to process, and I'm suffering #184 too.

I will run it again tonight (CET time)

akai-katto commented 3 years ago

Sure, but the file takes ~ 7h to process, and I'm suffering #184 too.

I will run it again tonight (CET time)

I saw, I wasn't sure if they were related or not. I highly recommend singleprocessing for now (I should leave my computer on overnight more to do more testing), as it's not as well tested.

AbelVM commented 3 years ago

OK, then I will wait until next weekend to run it again as I suppose the single process run will take a lot longer than multiprocess

AbelVM commented 3 years ago

Single process made the trick to finish the run, but still same OpenCV error with the last docker image


...

pre_processed.mkv 2021-01-30 11:07:27,019 INFO     status_thread.py run     : [File: pre_processed.mkv][Frame: [67980] 99%]    Average of Last 10 Frames: 1.28 sec / frame
Exception in thread Min Disk Thread:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/dandere2x/dandere2x/src/dandere2x/dandere2x_service/core/min_disk_usage.py", line 91, in run
    self.progressive_frame_extractor.release_capture()
  File "/dandere2x/dandere2x/src/dandere2x/dandere2xlib/wrappers/cv2/progressive_frame_extractor.py", line 32, in release_capture
    cv2.destroyAllWindows()
cv2.error: OpenCV(3.4.11) /tmp/pip-req-build-zc_q1ino/opencv/modules/highgui/src/window.cpp:652: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvDestroyAllWindows'

pre_processed.mkv 2021-01-30 11:07:35,992 INFO     merge.py join    : Join called.
pre_processed.mkv 2021-01-30 11:07:38,590 INFO     status_thread.py run     : [File: pre_processed.mkv][Frame: [67990] 99%]    Average of Last 10 Frames: 1.16 sec / frame
pre_processed.mkv 2021-01-30 11:07:50,165 INFO     status_thread.py run     : [File: pre_processed.mkv][Frame: [68000] 99%]    Average of Last 10 Frames: 1.16 sec / frame
pre_processed.mkv 2021-01-30 11:08:01,373 INFO     status_thread.py run     : [File: pre_processed.mkv][Frame: [68010] 99%]    Average of Last 10 Frames: 1.12 sec / frame
pre_processed.mkv 2021-01-30 11:08:14,624 INFO     status_thread.py run     : [File: pre_processed.mkv][Frame: [68020] 99%]    Average of Last 10 Frames: 1.33 sec / frame
pre_processed.mkv 2021-01-30 11:08:25,553 INFO     status_thread.py run     : [File: pre_processed.mkv][Frame: [68030] 99%]    Average of Last 10 Frames: 1.09 sec / frame
pre_processed.mkv 2021-01-30 11:08:43,995 INFO     status_thread.py run     : [File: pre_processed.mkv][Frame: [68040] 99%]    Average of Last 10 Frames: 1.84 sec / frame
pre_processed.mkv 2021-01-30 11:09:00,969 INFO     status_thread.py run     : [File: pre_processed.mkv][Frame: [68050] 99%]    Average of Last 10 Frames: 1.7 sec / frame
pre_processed.mkv 2021-01-30 11:09:19,464 INFO     status_thread.py run     : [File: pre_processed.mkv][Frame: [68060] 99%]    Average of Last 10 Frames: 1.85 sec / frame
pre_processed.mkv 2021-01-30 11:09:36,529 INFO     status_thread.py run     : [File: pre_processed.mkv][Frame: [68070] 99%]    Average of Last 10 Frames: 1.71 sec / frame
pre_processed.mkv 2021-01-30 11:09:48,468 INFO     status_thread.py run     : [File: pre_processed.mkv][Frame: [68080] 99%]    Average of Last 10 Frames: 1.19 sec / frame
pre_processed.mkv 2021-01-30 11:09:51,635 INFO     pipe_thread.py kill    : Kill called.
pre_processed.mkv 2021-01-30 11:09:54,899 INFO     merge.py join    : Join finished.
pre_processed.mkv 2021-01-30 11:09:54,900 INFO     residual.py join    : Method called.
pre_processed.mkv 2021-01-30 11:09:54,900 INFO     residual.py join    : Join finished.
pre_processed.mkv 2021-01-30 11:09:54,900 INFO     status_thread.py join    : Join called.
pre_processed.mkv 2021-01-30 11:09:54,900 INFO     status_thread.py join    : Join finished.
Total runtime duration: 73995.2162861824
akai-katto commented 3 years ago

I'm back at my office, sorry for the slow reply (was out of power for a few days)

The opencv issues remains a problem so finding a solution is something I'll have to investigate. I might have to downgrade opencv versions to a much older version, since this wasn't a problem until recently.

If I can ask, did you pull the latest version? I don't have versioning on the docker images setup yet, so adding version control will be something I have to add

AbelVM commented 3 years ago

This issue doesn't trigger when using a single process, indeed