Lesson 3 of 7 · 2 min
Check the data first
Duplicate pictures across training and testing make any score meaningless.
# run locally: dupes.py
import hashlib, pathlib
seen = {}
for f in pathlib.Path("data").rglob("*.jpg"):
h = hashlib.md5(f.read_bytes()).hexdigest()
if h in seen and seen[h].parts[1] != f.parts[1]:
print("in both splits:", seen[h], f)
seen.setdefault(h, f)Slices from one patient can still sit in both splits. The dataset does not say who is who, so state that limit in your write-up.
