Primary competition visual

CGIAR Wheat Growth Stage Challenge by CGIAR Platform for Big Data in Agriculture

Helping India
$3 000 USD
Completed (over 5 years ago)
Classification
Computer Vision
563 joined
203 active
Starti
Aug 28, 20
Closei
Oct 04, 20
Reveali
Oct 04, 20
Fastai Validation dataset
Data · 27 Sep 2020, 15:18 · 4

I would like to use only label quality 2 as the validation dataset during training. Using Fastai have been trying to write the code but it won't work.

Can anyone please help with the code. Thank you.

Discussion 4 answers

You can create a valid column and set that col to True only for label quality =2

Something like

train.loc[train.label_quality==2,'valid']=

27 Sep 2020, 15:24
Upvotes 0

thank you, but I really don't understand the code. Should I create a seperate csv for the validation dataset containing only label quality 2 ?

Sorry. I was not clear. What I meant was:

train = pd.read_csv('/content/drive/My Drive/cgiar-wheat/Train.csv')

train['images'] = train['UID'].apply(lambda x: x + ".jpeg")

train['valid'] = False

train.loc[train.label_quality==2,'valid']= True

dls = ImageDataLoaders.from_df(train, fn_col='images',label_col='growth_stage', valid_col='valid',path='', folder='/content/Images/',y_block= RegressionBlock,bs=16,num_workers=0)

Thank you so much, it worked!