abhijitjadhav1998 / Deepfake_detection_using_deep_learning

This projects aims in detection of video deepfakes using deep learning techniques like RestNext and LSTM. We have achived deepfake detection by using transfer learning where the pretrained RestNext CNN is used to obtain a feature vector, further the LSTM layer is trained using the features. For more details follow the documentaion.
GNU General Public License v3.0
495 stars 164 forks source link

No such file or directory #17

Closed twjjack closed 1 year ago

twjjack commented 1 year ago

Hi, I am using the docker and managed to launch the web app but I got the error below during the upload. Can you please advise?

=== | Started Videos Splitting | ===>
image_name /app/uploaded_videos/app/uploaded_videos/uploaded_file_1683025192_preprocessed_1.png
Internal Server Error: /predict/
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/app/ml_app/views.py", line 299, in predict_page
    img.save(image_path)
  File "/usr/local/lib/python3.6/site-packages/PIL/Image.py", line 2099, in save
    fp = builtins.open(filename, "w+b")
FileNotFoundError: [Errno 2] No such file or directory: '/home/app/staticfiles/app/uploaded_videos/app/uploaded_videos/uploaded_file_1683025192_preprocessed_1.png'
twjjack commented 1 year ago

Managed to fixed it by changing the line of 298 and 325 with below in file "Django Application\ml_app\views.py" image_path = image_name