# Project plan — object_detection_py

Evidence date: 2026-10-08.

Source repository: `git@bitbucket.org:overdrive/object_detection_py.git` (inspected over HTTPS at the same commit).

Inspected revision: `main` at `b53f138` (2024-03-26, Dirk, "update readme"). The scan-host path `~/projects/sonar_scan/repos/object_detection_py` was not on this machine. The tree below was read from that git revision.

This plan describes what the repository contains. It does not decide what the product should become.

## Product

The repository is a local TensorFlow 2 object-detection notebook. `readme.md` records conda setup, protobuf compilation, a package install, a model-builder test, one image-inference command, LabelImg labelling, an XML-to-CSV conversion, and two commented training commands.

Provenance: **Documented** in `readme.md`. None of those commands is implemented by a script in this repository. Provenance of the missing scripts: **Unknown** — see [Scope](#scope-in-the-repository).

There is no product name beyond the repository slug `object_detection_py`. There is no prior Silicon Ark set for this project.

## Branch reality

| Line | Tip | Date | What it is |
|---|---|---|---|
| `main` (default; `origin/HEAD`) | `b53f138` | 2024-03-26 | Only branch. 4 commits from 2024-03-19 to 2024-03-26 |

No tags. No other local or remote branches.

History:

- 2024-03-19 — Jaco Brits (`jaco@overdrive.co.za`) added a stock Bitbucket `.gitignore` (`3eaa9eb`, "Initial commit").
- 2024-03-22 — Dirk (`dirk@overdrive.co.za`) recorded `tf2/models` as a gitlink (`c496ae6`, "add files") and added `readme.md` (`0d91c62`, "adding readme").
- 2024-03-26 — Dirk corrected the commented `model_main_tf2.py` line in `readme.md` (`b53f138`, "update readme"). The line stays commented.

**Discrepancy:** the task-creation scan on 2026-09-28 listed `sonar-project.properties` and `sonarqube_scan.bat` at the repository root, next to `readme.md` and `tf2`. Neither file is in git history at `b53f138`. Provenance: **Unknown** — they may have been untracked files on the scan host.

## Scope in the repository

Tracked paths:

| Path | What it is |
|---|---|
| `.gitignore` | Bitbucket's example ignore list (Node, Java, Python bytecode, logs, Maven, JetBrains, macOS, Windows, executables, large video and TIFF). |
| `readme.md` | The only product text. Informal command notes. No trailing newline. |
| `tf2/models` | Gitlink (mode `160000`) to commit `505c718df51d3c7d5f667d9acb0d6c1e34daa552`. There is no `.gitmodules`, so the remote URL is not stored. |

A normal clone leaves `tf2/models` empty because Git has no submodule URL to fetch. This inspection did not check out that tree. The gitlink SHA is a public commit on `github.com/tensorflow/models` (2024-03-15, tensorflower-gardener, PiperOrigin-RevId 616269325). At that commit, `research/object_detection/` exists, including `model_main_tf2.py`, `builders/model_builder_tf2_test.py`, and `data/mscoco_label_map.pbtxt`.

Provenance of the URL: **Inferred**. The SHA match and the readme paths support it. The repository does not record it.

These readme commands name files that are not blobs in `object_detection_py` and are not at the conventional `research/object_detection/` path of that pinned commit (GitHub returned 404 on 2026-10-08):

- `use_protobuff.py`
- `detect_from_image.py`
- `xml_to_csv.py`
- `generate_tfrecord.py` (commented)

Checkpoints, pipeline configs, and an `images/` directory are also absent from this git tree.

Out of scope of this repository, on the evidence: a web app, an API, a database, accounts, a deployment, CI, and tests owned by this repo.

## System architecture

```text
Developer workstation (conda, Python 3.9 — documented)
        |
        |  readme commands
        v
object_detection_py
        |-- readme.md          operator notes
        |-- .gitignore         stock template
        \-- tf2/models         gitlink, URL not recorded
                |
                |  inferred checkout of tensorflow/models @ 505c718
                v
        research/object_detection
                |-- model_main_tf2.py
                |-- builders/model_builder_tf2_test.py
                \-- data/mscoco_label_map.pbtxt

Not in either tree (location Unknown):
  use_protobuff.py, detect_from_image.py, xml_to_csv.py, generate_tfrecord.py
  saved_model checkpoint, pipeline config, images/
```

There is no service boundary, queue, or hosted runtime in this repository.

## Major components

| Component | Role | Evidence | Provenance |
|---|---|---|---|
| Operator notes | The only instructions | `readme.md` | Documented |
| Pinned model garden | Supplies the Object Detection API tree the notes `cd` into | gitlink `tf2/models` → `505c718` | Implemented as a gitlink. Remote **Inferred** |
| Inference notes | Run `detect_from_image.py` against an SSD MobileNet V2 COCO saved model | `readme.md` | Documented command. Script and weights **not in git** |
| Labelling notes | Install LabelImg and convert XML to CSV | `readme.md` | Documented. `xml_to_csv.py` **not in git** |
| Training notes | TFRecord generation and EfficientDet `model_main_tf2.py` | `readme.md`, both lines commented | Documented as comments. **Not an active instruction** |

## Milestones visible in git

| When | Commit | Milestone |
|---|---|---|
| 2024-03-19 | `3eaa9eb` | Repository created with `.gitignore` only |
| 2024-03-22 | `c496ae6` | `tf2/models` gitlink added |
| 2024-03-22 | `0d91c62` | Readme added, including the commented training lines |
| 2024-03-26 | `b53f138` | Commented training invocation corrected. Last commit on `main` |

No later milestone is recorded. Nothing in git describes a release, a customer, or a deployment date.

## Implementation plan

No written plan exists beyond the order of commands in `readme.md`. That order is:

1. Create and activate a conda environment with Python 3.9.
2. Compile Object Detection protos with `use_protobuff.py`.
3. `python -m pip install .`, `conda install numpy`, then `cd research/object_detection`.
4. Run `builders/model_builder_tf2_test.py`.
5. `pip install wget`.
6. Run image detection with a named saved model, the COCO label map, and `.\images`.
7. `pip install labelimg` and run `labelimg.exe`.
8. `python xml_to_csv.py`.
9. Commented: build `test.record` and `train.record` with `generate_tfrecord.py`.
10. Commented: train with `model_main_tf2.py` and `ssd_efficientdet_d0_512x512_coco17_tpu-8.config`.

Steps 9 and 10 were comments in the first readme commit and remained comments after the typo fix. Provenance: **Documented** as notes. Whether they were ever run is **Unknown**.

## Known dependencies

Documented by name in `readme.md`:

| Dependency | How the readme names it |
|---|---|
| conda | Create and activate `{name}` with Python 3.9 |
| Python | 3.9 |
| protobuf compiler | Invoked as `protoc` via `use_protobuff.py` |
| The Object Detection package | `python -m pip install .` after `cd` is written *below* that command — working-directory order is ambiguous |
| numpy | `conda install numpy` |
| wget | `pip install wget` |
| LabelImg | `pip install labelimg`, then `labelimg.exe` |
| SSD MobileNet V2 320 COCO17 | Directory `ssd_mobilenet_v2_320x320_coco17_tpu-8\saved_model` |
| COCO label map | `.\data\mscoco_label_map.pbtxt` |
| EfficientDet D0 512 config | `ssd_efficientdet_d0_512x512_coco17_tpu-8.config` (commented) |

TensorFlow itself is not named and has no version pin. No `requirements.txt`, `environment.yml`, `setup.py`, or `pyproject.toml` is in this repository. Provenance: **Unknown** which TensorFlow build the notes expect. The `tf2` directory name and `model_main_tf2.py` imply TensorFlow 2. That implication is **Inferred**.

## Current project status

Dormant notes repository. Last change 2024-03-26. One branch, no tags, no application code, no CI, no deployment config in git.

The gitlink cannot be fetched by `git submodule update` because `.gitmodules` is missing. Anyone cloning `main` gets the readme and an empty `tf2/models` directory.

## Human confirmation

- Confirm that `tf2/models` was a checkout of `https://github.com/tensorflow/models` at `505c718`. The SHA matches; the URL is not in git.
- Confirm where `use_protobuff.py`, `detect_from_image.py`, `xml_to_csv.py`, and `generate_tfrecord.py` live. They are not in this repo and not at `research/object_detection/` on the pinned commit.
- Confirm whether the commented training block is abandoned or still intended.
- Confirm what was being labelled. No class list is in the repository.
- Confirm the purpose of `pip install wget`. The readme does not say what it downloads.
- Confirm whether `sonar-project.properties` and `sonarqube_scan.bat` on the 2026-09-28 scan host should be treated as part of the project. They are not in git.
- Confirm the TensorFlow version and whether this was only Dirk's workstation notes.
