Skip to content

Commit

Permalink
Fixed rangeland_weeds_australia
Browse files Browse the repository at this point in the history
  • Loading branch information
amogh7joshi committed May 1, 2024
1 parent b07dea8 commit fe6a3ee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
19 changes: 9 additions & 10 deletions agml/_assets/public_datasources.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,16 +267,15 @@
]
},
"classes": {
"0": "no_weeds",
"1": "chinee_apple",
"2": "lantana",
"3": "parkinsonia",
"4": "parthenium",
"5": "prickly_acacia",
"6": "rubber_vine",
"7": "siam_weed",
"8": "snake_weed",
"9": "negative"
"0": "Chinee Apple",
"1": "Lantana",
"2": "Parkinsonia",
"3": "Parthenium",
"4": "Prickly Acacia",
"5": "Rubber Vine",
"6": "Siam Weed",
"7": "Snake Weed",
"8": "Negative"
},
"external_image_sources": []
},
Expand Down
4 changes: 2 additions & 2 deletions agml/_internal/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ def rangeland_weeds_australia(self, dataset_name):
os.makedirs(os.path.join(
processed_dir, unique_label.title()), exist_ok = True)
for file in tqdm(images, desc = "Moving Images", file = sys.stdout):
save_dir = df.loc[df['Filename'] == file]['Species'].values[0].title()
save_dir = df.loc[df['Filename'] == os.path.basename(file)]['Species'].values[0].title()
shutil.copyfile(
os.path.join(dataset_dir, 'images', file),
os.path.join(processed_dir, save_dir, file)
os.path.join(processed_dir, save_dir, os.path.basename(file))
)

def fruit_detection_worldwide(self, dataset_name):
Expand Down

0 comments on commit fe6a3ee

Please sign in to comment.