JdeRobot / JdeRobot/PerceptionMetrics

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

Open
#612 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
112
Forks
109
PR merge metrics
No merged PRs in 30d

Description

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:
```python
img_dir = ""
ann_file = ""
```
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.

Contributor guide

Open the contributing guide

Research direction

Start in tutorial_image_detection.ipynb by inspecting the second cell and the COCO dataset-loading cell. Run the notebook on Windows to reproduce the directory-creation failure and confirm the dataset setup path. Done means the notebook creates its directories cross-platform and provides working COCO val2017 images and annotation setup guidance so it runs end to end.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
computer-vision, documentation, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.