如何在PyTorch的transforms.Compose中使用自定義的Data Augmentation?

# OpenCV和Pillow格式互轉:# opencv -> pil
img_pil = Image.fromarray(cv2.cvtColor(img_cv,cv2.COLOR_BGR2RGB))
# pil -> opencv
img_cv = cv2.cvtColor(np.asarray(img_pil),cv2.COLOR_RGB2BGR)

--

--

--

Machine Learning | Deep Learning | https://linktr.ee/yanwei

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Yanwei Liu

Yanwei Liu

Machine Learning | Deep Learning | https://linktr.ee/yanwei

More from Medium

Predicting Sine Wave Output and Visualizing the Deep Learning Network

Remote Tensorboard Viewing on Your Local Browser

Some important Math functions in Pytorch

Addition and Subtraction using Recurrent Neural Networks.