Skip to content

Commit

Permalink
Discard rows with no label
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanzvonkov committed Nov 3, 2023
1 parent 83075e1 commit 9aadd7b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@ def load_labels(self) -> pd.DataFrame:
raw_folder / "ceo-Sudan-Feb-2022---Feb-2023-(Set-2)-sample-data-2023-11-03.csv"
)
df = pd.concat([df1, df2])

# Discard rows with no label
df = df[~df["Does this pixel contain active cropland?"].isna()].copy()
df[CLASS_PROB] = df["Does this pixel contain active cropland?"] == "Crop"
df[CLASS_PROB] = df[CLASS_PROB].astype(int)
df["num_labelers"] = 1
Expand Down

0 comments on commit 9aadd7b

Please sign in to comment.