# Features — datafy_rekognition

Evidence date: 2026-10-17. Revision: `main` `1d03653` (2024-06-03, Dirk, "Adding function to detect images").

The source repository does not list features. Status below is from the git tree, `app.py`, `template.yaml`, `readme.md`, and git history. No roadmap file was found.

## Current features (main)

| Feature | What it does | Evidence | Status |
|---|---|---|---|
| Rhodes image corpus | 1,564 JPEG images and 1,530 Pascal VOC XML files under `training/` | Commit `4124a18`; label inventory 2026-10-17 | Implemented. Not split into train and test |
| Juice packs | 2,307 files under `training/100% JUICE/`, grouped `MUSI 6X200ML RHODES JUICE` (756), `SHANNON 1L RHODES JUICE` (626), `YOLANDA 2L RHODES JUICE` (924), plus one MHTML file | Same inventory | Implemented. Meaning of the three group names is **Unknown** |
| Squish infant food | 583 files under `training/INFANT FOOD/` (`SQUISH APPLE`, `SQUISH APPLE BANANA YOGHURT`, `SQUISH APPLE GUAVA`, `SQUISH APPLE GUAVA YOGHURT`, `SQUISH FRUIT SALAD`, `SQUISH MIXED VEGETABLES`) | Same inventory | Implemented |
| Jam packs | 191 files under `training/JAM/` (`APRICOT 450G`, `APRICOT 900G`, `MIXED FRUIT JAM 450G`, `MIXED FRUIT JAM 900G`, `Photos`) | Same inventory | Implemented. `Photos` is three JPEGs and no XML |
| Jam XML without images | 16 XML files in `training/JAM TRAINING/`, including filenames that contain `SHOPRITE EMPUMALANGA` and `SUPERSPAR GANSBAAI` | Directory listing | Implemented files. Those words are filenames, not a confirmed store integration |
| Label catalogue | 29 distinct `<name>` strings, 4,930 boxes. See `prd.md` FR-002 | Parsed XML | Implemented strings. SKU normalisation is not implemented |
| `classes.txt` | 17 lines in `training/JAM/APRICOT 900G/classes.txt`, mixing unrelated names (`dog`, `person`, `tv`, foods) with two jam labels | File contents | Implemented. It is not applied by any script in the repo |
| YOLO-style sidecar | One `.txt` of normalised boxes next to an apricot image | `training/JAM/APRICOT 900G/WhatsApp Image 2024-04-16 at 11.15.01.txt` | Implemented file. Format **Inferred**. No loader |
| Catalogue file | `training/RFG CATALOGUE 2024.pptx` (19,255,360 bytes) | Git tree | Implemented blob. Slide text was not extracted. Contents **Unknown** |
| OneDrive snapshot | MHTML page titled `MUSI 6X200ML FRUIT MEDLEY - OneDrive`, dated 6 May 2024 | `training/100% JUICE/6X200ML FRUIT MEDLEY - OneDrive.mhtml` | Implemented file. Not an API |
| TensorFlow how-to | Venv, LabelImg, TFRecord example, 200,000-step train, export, OpenCV draw at 0.5 | `readme.md` | Documented. No `generate_tfrecord.py`, no `pipeline.config`, no checkpoint |
| S3-triggered detector | Lambda starts Rekognition Custom Labels, detects, writes DynamoDB, stops the model | `DatafyRek/aws_rekognition/app.py`, `DatafyRek/template.yaml` | Implemented source. Deployed stack **Unknown** |
| Fixed confidence 95 | `MinConfidence=95` | `app.py` | Implemented constant |
| One inference unit | `MinInferenceUnits=1` | `app.py` | Implemented constant |
| DynamoDB first-label write | Partition value is the S3 key; `predicted` is label 0; `label_count` is the list length | `write_dynamodb` | Implemented call. Table resource is not in the template |
| SAM deploy settings | Stack name `DatafyRek`, IAM capability, confirm changeset, `resolve_s3` | `DatafyRek/samconfig.toml` | Implemented config. No region and no parameter overrides |
| X-Ray and JSON logs | Function tracing `Active`, `LogFormat: JSON`, API tracing flag | `template.yaml` Globals | Implemented in template. No API resource exists for the API tracing flag to attach to |
| SonarQube pipeline | Scan on branch `main` | `bitbucket-pipelines.yml`, `sonar-project.properties` | Implemented pipeline file. Last scan result **Unknown** |
| Ignore rules | Root stock Bitbucket ignore; `DatafyRek/.gitignore` is a gitignore.io Python/OS/IDE list and also ignores `*/build/*` | Both `.gitignore` files | Implemented |

## Completed, from git history

| When | Commit | What landed |
|---|---|---|
| 2024-05-28 | `eaff27e` | `.gitignore` only. Author Jaco Brits |
| 2024-05-28 | `c87084a` | `sonar-project.properties`. Author Jaco Brits, created online with Bitbucket |
| 2024-05-28 | `152517f` | `bitbucket-pipelines.yml`. Author Jaco Brits, created online with Bitbucket |
| 2024-05-28 | `4124a18` | `training/` (3,098 files). Author Jaco Brits |
| 2024-05-28 | `b9477c5` | `readme.md`. Author Jaco Brits |
| 2024-05-28 | `9673edc` | Markdown fences in `readme.md` changed from `console` / `python` to bare fences. Author Jaco Brits |
| 2024-06-03 | `1d03653` | Entire `DatafyRek/` SAM tree (15 files). Author Dirk |

No release tag marks any of these as a completed product.

## In development

No branch other than `main`. No unmerged work was visible at `origin` on 2026-10-17.

The DynamoDB comment `replace with postgress function` is the only future-looking note in code. Provenance: **Documented** comment. Treat PostgreSQL as **Planned** only if a human confirms it is still intended. Nothing in the repo implements it.

`DatafyRek/` still contains the SAM hello-world event and tests. That is leftover sample code on `main`, not a second active feature. Provenance: **Implemented** files that do not match `app.py`.

## Recently changed

The last change is `1d03653` (2024-06-03): the Rekognition Lambda, template, SAM config, sample event, sample tests, and `DatafyRek/README.md`. Nothing in `training/` or `readme.md` changed after 2024-05-28.

## Deprecated or removed

No removal commit exists. The hello-world names in the README, tests, and `events/event.json` were never replaced. They are obsolete relative to `app.py`, and they are still in the tree.

`sonarqube_scan.bat` was listed at task creation (2026-09-28) and is absent from every commit. It is not a removed tracked file. Provenance: **Unknown**.

## Not features of this repository

- A UI, login, or role check.
- Creating or training a Rekognition Custom Labels project (`CreateProject`, dataset upload, `train_project`).
- Calling the `datafy_web` route `POST /analyze-image`.
- A train/test split or an evaluation metric run. The readme names mAP and does not record a number.
- PostgreSQL.
- A scheduled start/stop of the model independent of S3.
