I have mounted my Google drive to my colab notebook:
from google.colab import drive
drive.mount("/content/gdrive")
I can import csv files through it, in my case:
df = pd.read_csv("/content/gdrive/MyDrive/colab/heart-disease.csv")
But when I try to import images in markdown/text in colab nothing happens:
![](/content/gdrive/MyDrive/colab/6-step-ml-framework.png)
Here's my directory on Google drive:
You can using OpenCV in colab by import cv2 as cv
, read image by img = cv.imread('/content/gdrive/MyDrive/colab/6-step-ml-framework.png')
, convert image to numpy array using img = np.float32(img)
@Mr. For Example you should not use np.float(img)
, because OpenCV's method imread
has converted it to np.array already
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.