mapooon / SelfBlendedImages

[CVPR 2022 Oral] Detecting Deepfakes with Self-Blended Images https://arxiv.org/abs/2204.08376
Other
196 stars 34 forks source link

Faulty imports in the inference_image.py #42

Closed Timotej979 closed 8 months ago

Timotej979 commented 8 months ago

As stated i have succeeded in running the src/inference/inference_image.py by adding the import of opencv (import cv2), meanwhile the current repo code does not include it, also the os library is imported twice.

import os
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torchvision
from torchvision import datasets,transforms,models,utils
import numpy as np
import matplotlib.pyplot as plt
import os
import pandas as pd
from PIL import Image
import sys
import random
import shutil
from model import Detector
import argparse
from datetime import datetime
from tqdm import tqdm
from retinaface.pre_trained_models import get_model
from preprocess import extract_face
import warnings
warnings.filterwarnings('ignore')

Can be a quick fix by changing a few lines and pushing :smile:

Timotej979 commented 8 months ago

Created a PR for this issue, check it there