diff --git a/README.md b/README.md index 098d2c9..14fe655 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,50 @@ -# deepfake +# Deepfake +*author: Zhuoran Yu* + +
+ +## Description + +Deepfake techniques, which present realistic AI-generated videos of people doing and saying fictional things, have the potential to have a significant impact on how people determine the legitimacy of information presented online. + +This operator predicts the probability of a fake video for a given video.This is an adaptation from [DeepfakeDetection](https://github.com/smu-ivpl/DeepfakeDetection). + +
+ +## Code Example + +Load videos from path '/home/test_video' +and use deepfake operator to predict the probabilities of fake videos. + + +```python +from towhee import ops +deepfake = ops.deepfake() +pred = deepfake('/home/test_video') +print(pred) +``` + + + +```shell +[0.9893, 0.9097] +``` + +
+ +## Interface + +A deepfake operator takes videos' paths as input. +It predicts the probabilities of fake videos.The higher the score, the higher the probability of it being a fake video.(It can be considered to be a fake video with score higher than 0.5) + +**Parameters:** + +***filepath:*** *str* + +Absolute address of the test videos. + + +**returns:** *list* + +The probabilities of videos being fake ones. \ No newline at end of file diff --git a/deepfake.png b/deepfake.png new file mode 100644 index 0000000..fecf931 Binary files /dev/null and b/deepfake.png differ diff --git a/deepfake.py b/deepfake.py index a846080..d90063b 100644 --- a/deepfake.py +++ b/deepfake.py @@ -60,7 +60,7 @@ class Deepfake(NNOperator): ''' if __name__ == "__main__": filepath = "/home/xuyu/Deepfake/deepfake_detec/" - op = Deepfakevit() + op = Deepfake() pred = op(filepath=filepath) print(pred) ''' diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..426fec5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,9 @@ +dlib +facenet-pytorch +albumentations +timm +pytorch_toolbelt +tensorboardxython +matplotlib +tqdm +pandas \ No newline at end of file