AgriFieldNet India Challenge
Can you detect crop types in a class-imbalanced satellite image dataset?
Prize
$10 000 USD
Time
~1 month to go
Participants
78 active · 355 enrolled
Helping
India
Advanced
Classification
Agriculture
How to Extract Crop_id label dictionary
Help · 22 Sep 2022, 02:58 · 4

Hello,

I am trying to extract the crop_id label dictionary using the below code provided in the notebook in vain:

# extract crop_id-label dictionary
with open ('ref_agrifieldnet_competition_v1/ref_agrifieldnet_competition_v1_labels_train/ref_agrifieldnet_competition_v1_labels_train_001c1/ref_agrifieldnet_competition_v1_labels_train_001c1.json') as ll:

What's the correct file name kindly? I have tried with 'ref_agrifieldnet_competition_v1' in vain.

Discussion 4 answers

Just use

crop_dict      =  {  1 : "Wheat",
		     2 : "Mustard",
		     3 : "Lentil",
		     4 : "No Crop",
		     6 : "Sugarcane",
		     8 : "Garlic",
		    15 : "Potato",
		     5 : "Green pea",
		    16 : "Bersem",
		    14 : "Coriander",
		    13 : "Gram",
		     9 : "Maize",
		    36 : "Rice" }

from starter notebook. If you want to extract it, starter shows how, or check paths or download for correctness and completeness.

Thanks. I hope it helps! I see you already use starter code ... then perhaps check your path?

It has helped. Thanks again.