Primary competition visual

AgriFieldNet India Challenge

Helping India
$10 000 USD
Completed (over 3 years ago)
Classification
Earth Observation
778 joined
179 active
Starti
Sep 05, 22
Closei
Oct 31, 22
Reveali
Oct 31, 22
User avatar
VKI
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
User avatar
skaak
Ferra Solutions

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.

22 Sep 2022, 03:10
Upvotes 0
User avatar
VKI

Thanks. I appreciate.

User avatar
skaak
Ferra Solutions

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

User avatar
VKI

It has helped. Thanks again.