WebFace 500K Portable R&D Sample
This directory is a self-contained delivery package generated by
face_analyze_dataset. It contains exactly 500,000 successfully labeled face
images unless unrecoverable source/model errors are listed under failures/.
The selected JPEG files are copied byte-for-byte from WebFace; they are not
decoded and recompressed for storage. After generation, consumers do not need
access to the original WebFace260M directory.
Package layout
500k/
├── README.md
├── manifest.json
├── data/<source-shard>/part-*.parquet
├── failures/<source-shard>/part-*.parquet
├── state/<source-shard>/part-*.done.json
└── images/<identity_id>/<original-image-name>.jpg
Every successful Parquet row has exactly seven columns:
| Column | Type | Description |
|---|---|---|
identity_id |
string | Original WebFace identity-directory label |
image_path |
string | Path relative to this package, under images/ |
embedding |
fixed-size list[512] FP32 | Bina face embedding |
age |
FP32 | MiVOLO predicted age |
gender |
string | MiVOLO predicted binary label |
gender_confidence |
FP32 | Softmax confidence of the predicted label |
quality |
FP32 | Bina face-quality output |
Age and gender are model predictions for research, not verified demographic
ground truth. Model versions, endpoints, deterministic sampling configuration,
counts, and status are recorded in manifest.json.
Start generation
Run from:
cd /mnt/hdd1/dataset_face/face_analyze_dataset
Build the current image:
docker compose build bina-research-extractor
Start one named detached writer:
docker compose --profile delivery run -d \
--name webface-label-500k-run \
webface-label-500k
The output lock rejects a second writer. Do not launch another container against
this directory while webface-label-500k-run is active.
Monitor
Follow progress and per-part throughput:
docker logs -f --tail 50 webface-label-500k-run
Check container status and resource use:
docker ps --filter name=webface-label-500k-run
docker stats --no-stream webface-label-500k-run
Inspect committed progress from another terminal:
cd /mnt/hdd1/dataset_face/face_analyze_dataset
python3 -c 'import json; m=json.load(open("output/500k/manifest.json")); print(m["status"]); print(json.dumps(m["progress"], indent=2))'
Only completed atomic Parquet parts appear in the progress counts. A part in flight is intentionally absent until its images, data Parquet, failure Parquet, and completion marker are safely written.
At the validated default concurrency, generation should take roughly 2–2.5 hours. Expected package size is approximately 4–6 GB, depending on JPEG sizes.
Stop and resume safely
Stop with a two-minute grace period, then remove only the stopped container:
docker stop --timeout 120 webface-label-500k-run
docker rm webface-label-500k-run
Committed parts and copied images remain in this directory. Resume with the same start command:
docker compose --profile delivery run -d \
--name webface-label-500k-run \
webface-label-500k
Do not delete or edit manifest.json, state/, data/, or images/
between runs. The configuration fingerprint prevents incompatible runs from
being mixed.
Verify completion
docker logs --tail 30 webface-label-500k-run
python3 -c 'import json; m=json.load(open("output/500k/manifest.json")); assert m["status"] == "completed"; assert m["progress"]["successful_images"] == 500000; print(m["progress"])'
After inspecting the final logs, remove the completed container:
docker rm webface-label-500k-run
Optional single-file handoff
After the manifest reports completed and the container is stopped, package the
whole delivery directory into one TAR file:
cd /mnt/hdd1/dataset_face/face_analyze_dataset
tar -cf output/webface-500k-delivery.tar -C output 500k
sha256sum output/webface-500k-delivery.tar > output/webface-500k-delivery.tar.sha256
JPEG and Parquet data are already compressed, so an uncompressed TAR avoids
wasting time while still providing one transferable file. The R&D recipient can
extract it with tar -xf webface-500k-delivery.tar. Keep the directory as the
authoritative resumable copy until the archive checksum has been verified.
Read the delivery
With PyArrow installed:
from pathlib import Path
import pyarrow.dataset as ds
package = Path("/path/to/500k")
table = ds.dataset(package / "data", format="parquet").to_table()
row = table.slice(0, 1).to_pylist()[0]
image_file = package / row["image_path"]
print(table.schema)
print(table.num_rows)
print(row["identity_id"], image_file, image_file.is_file())
print(len(row["embedding"])) # 512
Read without installing host dependencies by using the project image:
cd /mnt/hdd1/dataset_face/face_analyze_dataset
docker run --rm \
-v "$PWD/output/500k:/delivery:ro" \
--entrypoint python bina-research-extractor:2.0.0 \
-c 'import pyarrow.dataset as ds; t=ds.dataset("/delivery/data", format="parquet").to_table(); print(t.schema); print(t.num_rows); print(t.slice(0, 1).to_pylist()[0])'
The authoritative table is the complete data/ directory, not an individual
Parquet part. The state/ files are retained to document and support safe
resume; consumers normally read only manifest.json, data/, and
images/.