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
397 stars 140 forks source link

Facing Sequence Error #18

Closed anuptilak closed 1 year ago

anuptilak commented 1 year ago

Hi There,

I'm new to python and deep learning stuff. I'm facing following error, can someone please guide me to resolve the issue,

Request Method: GET

http://ec2-13-212-202-36.ap-southeast-1.compute.amazonaws.com:8000/predict/ 3.0.5 IndexError list index out of range /home/ubuntu/Deepfake_detection_using_deep_learning/Django Application/ml_app/views.py in get_accurate_model, line 196 /usr/bin/python3 3.8.10 ['/home/ubuntu/Deepfake_detection_using_deep_learning/Django Application', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages']

Internal Server Error: /predict/ Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.8/dist-packages/django/core/handlers/base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "/usr/local/lib/python3.8/dist-packages/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/ubuntu/Deepfake_detection_using_deep_learning/Django Application/ml_app/views.py", line 268, in predict_page model_name = os.path.join(settings.PROJECT_DIR,'models', get_accurate_model(sequence_length)) File "/home/ubuntu/Deepfake_detection_using_deep_learning/Django Application/ml_app/views.py", line 196, in get_accurate_model final_model = sequence_model[0] IndexError: list index out of range

Thanks Anup Tilak

anuptilak commented 1 year ago

Hi There,

I could manage to solve the issue, in the code file views.py code tries to get the sequence number by splitting the string and it is splitting the index on the 3rd but when you're deploying the code on the ubuntu server without taking your app out of the repo, the index of string changes. So you need to count your new index and pass it instead of 3 and your code should be up and running.

Thanks Anup Tilak

pontifex03 commented 7 months ago

Can you please tell how to count our new index

Vcd2002 commented 4 months ago

Can you please tell how to count our new index

Would you solved this error

Vcd2002 commented 4 months ago

Hi There,

I could manage to solve the issue, in the code file views.py code tries to get the sequence number by splitting the string and it is splitting the index on the 3rd but when you're deploying the code on the ubuntu server without taking your app out of the repo, the index of string changes. So you need to count your new index and pass it instead of 3 and your code should be up and running.

Thanks Anup Tilak

Sir , please tell me how to pass index value