hello all! i am working on my project how to detect deepfake images

  Kiến thức lập trình

i have taken the dataset from kaggle, i am at beginner level.
can anyone of help me with these errors, i am running the program in google colab
at a point i am stuck with this code
also

`tf.test.is_gpu_available()`

when i executed it output came as false

here’s my code

code link :-google colab

this is the error i am facing at line 42

    TypeError                                 Traceback (most recent call last)
     <ipython-input-42-624e20b779a5> in <cell line: 12>()
     15     plt.yticks([])
     16     plt.grid(False)
      ---> 17     plt.imshow(cv2.imread(image_path + Train_set.loc[i, "videoname"][:-4] + ".jpg"))
     18 
     19     if Train_set.loc[i, "label"] == "FAKE":

     3 frames
     /usr/local/lib/python3.10/dist-packages/matplotlib/image.py in set_data(self, A)
    699         if (self._A.dtype != np.uint8 and
    700                 not np.can_cast(self._A.dtype, float, "same_kind")):
-->       701             raise TypeError("Image data of dtype {} cannot be converted to "
    702                             "float".format(self._A.dtype))
    703 

    TypeError: Image data of dtype object cannot be converted to float

i have tried many ways to solve it using google,colab ai,chatgpt

but nothing could work out

if anyone of you could help me i will grateful

New contributor

DS B is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT