While completing the tutorial_image_detection.ipynb walkthrough on Windows, I hit two issues that block the notebook from running end-to-end out of the box:
1. !mkdir -p is Unix-only
The second cell uses:
!mkdir -p local/data/models
!mkdir -p local/outputs
-p is not a valid flag for Windows cmd.exe (which Jupyter shells out to by default on Windows), so this cell fails with SyntaxError: unexpected character after line continuation character.
2. COCO dataset cell has placeholder paths with no setup guidance
The dataset-loading cell expects:
img_dir = "<PATH_TO_COCO_VAL2017_IMAGES>"
ann_file = "<PATH_TO_COCO_INSTANCES_VAL2017_JSON>"
but there's no instruction anywhere in the notebook on how to obtain COCO val2017 data, so new contributors have no path forward without external research.
Proposed fix
- Replace
!mkdir -p with a cross-platform os.makedirs(..., exist_ok=True) call.
- Add a cell (or a linked script) that downloads and extracts COCO val2017 images + annotations automatically, so the notebook is fully runnable without manual dataset hunting.
I've already implemented and tested both fixes locally on Windows and I'm happy to open a PR.
While completing the
tutorial_image_detection.ipynbwalkthrough on Windows, I hit two issues that block the notebook from running end-to-end out of the box:1.
!mkdir -pis Unix-onlyThe second cell uses:
-pis not a valid flag for Windowscmd.exe(which Jupyter shells out to by default on Windows), so this cell fails withSyntaxError: unexpected character after line continuation character.2. COCO dataset cell has placeholder paths with no setup guidance
The dataset-loading cell expects:
but there's no instruction anywhere in the notebook on how to obtain COCO val2017 data, so new contributors have no path forward without external research.
Proposed fix
!mkdir -pwith a cross-platformos.makedirs(..., exist_ok=True)call.I've already implemented and tested both fixes locally on Windows and I'm happy to open a PR.