ve450su2021-group26 / Algorithm

The algorithm part for the poster project
0 stars 0 forks source link

Create Data loader for Pitt Ads #1

Open junjzhang opened 3 years ago

junjzhang commented 3 years ago

Refer to http://people.cs.pitt.edu/~kovashka/ads/#image For data loader, refer to https://pytorch.apachecn.org/docs/1.4/5.html 对图片的transform可能主要用到torchvision.transforms这个库 https://pytorch.org/vision/stable/transforms.html IO的话应该是PIL的Image格式 要224*224大小的tensor形式的图片,topic label 和 sentiment label; 初始化时接受一个flag去判断用作train还是eval,train的话对图片做一些增强(随机的翻转,裁剪)

junjzhang commented 3 years ago

注意train,valid, test读取的文件路径不一样哦,后两个算eval

junjzhang commented 3 years ago

在image_module/data下,看看,写了个抽象类