Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why my training model got only one result? #1

Open
LoginPages opened this issue Apr 26, 2023 · 5 comments
Open

why my training model got only one result? #1

LoginPages opened this issue Apr 26, 2023 · 5 comments

Comments

@LoginPages
Copy link

LoginPages commented Apr 26, 2023

I have a problem where the result of my training model comes out with only one output, which is [1]. actually has 2 outputs which are [1] real and [0] fake. I follow step by step from github but when I predict a fake video result it comes out [1]? that means the video is real. Is this coding wrong? also I use fake video to testing.. and the output show that video is real.

@PRITH-S07
Copy link
Owner

PRITH-S07 commented Apr 26, 2023

The [1] and [2] are not clear. Kindly elaborate on that. Also, if this is in reference to the code in this repository, this code will give you a frame by frame probabilistic output as to whether that particular frame might be a deepfake or not. So, the metric you use to decide whether the whole video would be a deepfake or not would essentially be whether any single frame in the video might actually be a deepfake or not.

@LoginPages
Copy link
Author

The [1] and [2] are not clear. Kindly elaborate on that. Also, if this is in reference to the code in this repository, this code will give you a frame by frame probabilistic output as to whether that particular frame might be a deepfake or not. So, the metric you use to decide whether the whole video would be a deepfake or not would essentially be whether any single frame in the video might actually be a deepfake or not.

I mean, I've tried to follow step by step in the code but when I predict a fake video, the result is more real every frame

@PRITH-S07
Copy link
Owner

PRITH-S07 commented Apr 26, 2023

So are you considering frame extraction? If so, it doesn't matter if the whole video is a deepfake or not. What really matters is that if atleast 1 frame in the video shows up as a fake frame, then the whole video can be flagged off as a deepfake. This, would suggest looking at all the outputs to compare and view whether atleast one frame in the video is a deepfake or not. Thus, evaluate your choice accordingly.
Also note that the training would be very biased as in some videos the deepfake effect might be more prominent in all the frames and in some just a few, so it's important to train on more videos to get a better accuracy.

@LoginPages
Copy link
Author

okay thank you I will try to train more videos

@LoginPages
Copy link
Author

Hi, I'm sorry, I want to ask. I have tried to test video prediction again by using sample video ('/content/drive/MyDrive/deepfake-detection-master/train_sample_videos/aagfhgtpmv.mp4') which is fake video. Then run, the output i get is:
[[1.00000 0.00000]]
[[0.99984 0.00016]]
[[0.99995 0.00005]]
[[0.99962 0.00038]]
[[0.99999 0.00001]]
[[0.99398 0.00602]]
[[0.99990 0.00010]]
[[0.98545 0.01455]]
[[0.99999 0.00001]]
[[1.00000 0.00000]]
[[1.00000 0.00000]]

You mean the vector on the left is real and the right is fake, right? so I predict the video to be fake but it is more like real ie 1.0 = 100%? right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants