tfaehse / DashcamCleaner

Censor identifiable information in videos, in particular dashcam recordings in Germany.
GNU Affero General Public License v3.0
130 stars 27 forks source link

Many errors a noob can't solve ^^ #66

Open Profane opened 1 year ago

Profane commented 1 year ago

Hey, first, i have no clue in programming. I just found a video with a tutorial how to install DCC. The GUI is loading now and my first try ended in the "TypeError: unsupported operand type(s) for /: 'tuple' and 'int'" error. As you mentioned in the other issue, i deleted the ".cache/torch" folder. But now i receive the following error:

Blurrer started! Traceback (most recent call last): File "D:\Dashcam Shit\DashcamCleaner\dashcamcleaner\src\qt_wrapper.py", line 74, in run new_detections = self.detect_identifiable_information(frame_buffer) File "D:\Dashcam Shit\DashcamCleaner\dashcamcleaner\src\blurrer.py", line 39, in detect_identifiable_information results_list = self.detector(images, size=(scale,)).xyxy File "D:\Dashcam Shit\Anaconda\envs\py38\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl result = self.forward(*input, kwargs) File "D:\Dashcam Shit\Anaconda\envs\py38\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, *kwargs) File "C:\Users\spams/.cache\torch\hub\ultralytics_yolov5_master\models\common.py", line 704, in forward y = self.model(x, augment=augment) # forward File "D:\Dashcam Shit\Anaconda\envs\py38\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl result = self.forward(input, kwargs) File "C:\Users\spams/.cache\torch\hub\ultralytics_yolov5_master\models\common.py", line 514, in forward y = self.model(im, augment=augment, visualize=visualize) if augment or visualize else self.model(im) File "D:\Dashcam Shit\Anaconda\envs\py38\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl result = self.forward(*input, kwargs) File "C:\Users\spams/.cache\torch\hub\ultralytics_yolov5_master\models\yolo.py", line 209, in forward return self._forward_once(x, profile, visualize) # single-scale inference, train File "C:\Users\spams/.cache\torch\hub\ultralytics_yolov5_master\models\yolo.py", line 121, in _forward_once x = m(x) # run File "D:\Dashcam Shit\Anaconda\envs\py38\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl result = self.forward(*input, *kwargs) File "C:\Users\spams/.cache\torch\hub\ultralytics_yolov5_master\models\common.py", line 167, in forward return self.cv3(torch.cat((self.m(self.cv1(x)), self.cv2(x)), 1)) File "D:\Dashcam Shit\Anaconda\envs\py38\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl result = self.forward(input, kwargs) File "C:\Users\spams/.cache\torch\hub\ultralytics_yolov5_master\models\common.py", line 59, in forward_fuse return self.act(self.conv(x)) File "D:\Dashcam Shit\Anaconda\envs\py38\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "D:\Dashcam Shit\Anaconda\envs\py38\lib\site-packages\torch\nn\modules\conv.py", line 399, in forward return self._conv_forward(input, self.weight, self.bias) File "D:\Dashcam Shit\Anaconda\envs\py38\lib\site-packages\torch\nn\modules\conv.py", line 395, in _conv_forward return F.conv2d(input, weight, bias, self.stride, RuntimeError: CUDA out of memory. Tried to allocate 10.58 GiB (GPU 0; 24.00 GiB total capacity; 1.76 GiB already allocated; 19.60 GiB free; 1.96 GiB reserved in total by PyTorch)

And i have really no idea XD

Hope you can help. Thank you!

joshinils commented 1 year ago

your graphics card does not have enough video memory for what the program is trying to use.

I think you can lower the inference size and that should help, or maybe the batch size is too large

Which settings are you using?

Profane commented 1 year ago

When the program is running i have more than 19GiB of free VRAM. The settings are the standard ones when the program runs the 1st time.

I tried lowering the inference size, at 720p its the same error, but with 360p there comes a much longer error.

dcc

joshinils commented 1 year ago

hm, yeah maybe try lowering the batch size, it inherently multiplies the needed vram amount, since it does 16 times as much at the same time

Profane commented 1 year ago

No change, i even lowered it to 1, same error. Here you can find the error i get when i change it to 360p:

https://pastebin.com/1G6RKd4w

tfaehse commented 1 year ago

Sorry, I can't really make sense of this to be honest. @joshinils is correct, a large batch size very quickly depletes your RAM and VRAM, but at 1 this really shouldn't be an issue. Just out of curiosity: some modules may not handle paths with whitespace very well, could you move the project to one without whitespace?

Profane commented 1 year ago

Hey, da ich nun mitbekommen habe dass ihr deutsche seid, so weiter :-D Also, ich bin jetzt nach einiger Zeit noch mal dazu gekommen. Inzwischen wurde das System neu aufgesetzt und ich habe penibel darauf geachtet keine Leerzeichen zu verwenden. Leider klappt das ganze weiterhin nicht. Inzwischen geht nicht mal mehr das GUI auf.

Besteht keine Möglichkeit irgendwie eine Anleitung zu bekommen für Otto-Normal-Verbraucher? :-D Die Arbeit die ihr macht ist wirklich super, aber ihr setzt echt zu viel voraus bei jemandem der nur ein paar Videos blurren will. Die wenigsten wollen oder können sich bei sowas vorher noch großartig mit Linux/Python/Git/pytorch usw. beschäftigen ^^

Danke trotzdem!

Dave04O4 commented 1 year ago

Mit der neusten Version sollte es gehen, zumindest bei mir funktioniert es wieder.