Julian-Wyatt / AnoDDPM

CVPR Workshop paper - AnoDDPM: Anomaly Detection with Denoising Diffusion Probabilistic Models using Simplex Noise
https://julianwyatt.co.uk/anoddpm
MIT License
154 stars 27 forks source link

Problem about saving .mp4 files during training process #32

Closed lomoda0715 closed 6 months ago

lomoda0715 commented 7 months ago

Hi, Julian. Sorry to disturb you. The research is so great! I am trying to refactor that on my custom dataset. But I am trapped with the problem about saving .mp4 files during training process. I can not save the .mp4 file by "ani.save(f'{ROOT_DIR}diffusion-videos/ARGS={args["arg_num"]}/sample-EPOCH={epoch}.mp4')"

The error message indicates issues with the ffmpeg encoder, mentioning "incorrect library version loaded' and 'Error initializing output stream 0:0'. It suggests that there might be incorrect parameters such as bit_rate, rate, width, or height."

I have already checked the matplotlib's version is 3.1.1, and also installed some other versions. Does anyone have some idea about this problem? Thanks. 屏幕截图 2023-12-16 231736 屏幕截图 2023-12-16 231853

Julian-Wyatt commented 7 months ago

Unfortunately I reckon it will be due to the ffmpeg and mpl versions but I don't have the original versions I used available. I'd recommend doing a clean install of ffmpeg and mpl and trying to get the sample to generate? I've found ffmpeg to be a tad finicky in the past too.

lomoda0715 commented 6 months ago

Thank you very much for your suggestion. I successfully resolved the issue by reinstalling the relevant packages. I solved the problem following the method described in the link below, hoping it might help others facing the same issue.

https://stackoverflow.com/questions/72596662/error-in-making-animation-through-ffmpeg-python3-9

azadfatemeh commented 5 months ago

the problem would be solved by updating or reinstalling the ffmpeg package :)