MINTIME-Multi-Identity-size-iNvariant-TIMEsformer-for-Video-Deepfake-Detection icon indicating copy to clipboard operation
MINTIME-Multi-Identity-size-iNvariant-TIMEsformer-for-Video-Deepfake-Detection copied to clipboard

Inhomogenous Shape

Open AyeshaMalikAyesha opened this issue 1 year ago • 0 comments
trafficstars

I tested the model on my custom test set using line python3 predict.py --video_path fakes/qwkhktdtjj.mp4 --model_weights ./pretrained_model_weights/MINTIME_XC_Model_checkpoint30 --extractor_weights ./pretrained_model_weights/MINTIME_XC_Extractor_checkpoint30 --config config/size_invariant_timesformer.yaml --extractor_model 1

But it gives me this error /usr/local/lib/python3.10/dist-packages/torchvision/transforms/_functional_video.py:6: UserWarning: The 'torchvision.transforms._functional_video' module is deprecated since 0.12 and will be removed in the future. Please use the 'torchvision.transforms.functional' module instead. warnings.warn( /usr/local/lib/python3.10/dist-packages/torchvision/transforms/_transforms_video.py:22: UserWarning: The 'torchvision.transforms._transforms_video' module is deprecated since 0.12 and will be removed in the future. Please use the 'torchvision.transforms' module instead. warnings.warn( /usr/local/lib/python3.10/dist-packages/torchvision/transforms/functional_tensor.py:5: UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be removed in 0.17. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in torchvision.transforms.v2.functional. warnings.warn( Namespace(video_path='fakes/qwkhktdtjj.mp4', detector_type='FacenetDetector', random_state=42, gpu_id=0, workers=1, config='config/size_invariant_timesformer.yaml', model_weights='./pretrained_model_weights/MINTIME_XC_Model_checkpoint30', extractor_model=1, extractor_weights='./pretrained_model_weights/MINTIME_XC_Extractor_checkpoint30', output_type=0, save_attentions=False) Detecting faces... Traceback (most recent call last): File "/content/drive/MyDrive/Video-deepfake/MINTIME-Multi-Identity-size-iNvariant-TIMEsformer-for-Video-Deepfake-Detection/predict.py", line 536, in bboxes_dict = detect_faces(opt.video_path, opt.detector_type, opt) File "/content/drive/MyDrive/Video-deepfake/MINTIME-Multi-Identity-size-iNvariant-TIMEsformer-for-Video-Deepfake-Detection/predict.py", line 49, in detect_faces bboxes.update({i : b for i, b in zip(indices, detector._detect_faces(frames))}) File "/content/drive/MyDrive/Video-deepfake/MINTIME-Multi-Identity-size-iNvariant-TIMEsformer-for-Video-Deepfake-Detection/preprocessing/face_detector.py", line 49, in detect_faces batch_boxes, * = self.detector.detect(frames, landmarks=False) File "/usr/local/lib/python3.10/dist-packages/facenet_pytorch/models/mtcnn.py", line 313, in detect batch_boxes, batch_points = detect_face( File "/usr/local/lib/python3.10/dist-packages/facenet_pytorch/models/utils/detect_face.py", line 183, in detect_face batch_boxes, batch_points = np.array(batch_boxes), np.array(batch_points) ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (300,) + inhomogeneous part.

AyeshaMalikAyesha avatar Feb 21 '24 06:02 AyeshaMalikAyesha