Skip to content

tutorial_image_detection.ipynb fails on Windows: Unix-only shell command and missing COCO dataset setup instructions #612

Description

@ashishsoni-ai

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions