circuitgen-datasets-private / DATASETS_STRUCTURE_README.md
lsnu's picture
Update README files for repaired CGDSL overlay
7f0f8c6 verified
# Dataset Structure README (for model ingestion)
This file documents the exact on-disk structure of datasets currently present in:
- `/mnt/c/users/luiss/circuitgen`
- `/mnt/c/users/luiss/circuitgen/datasets`
Use this as the source of truth for how to parse each dataset.
## Latest derived CGDSL overlay
The latest repaired derived CGDSL export in this repo is:
- `derived/cgdsl/20260307-081439-fix-open-netlistify-ams-overlay`
It is an overlay over:
- `derived/cgdsl/20260305-134840-fix-build-cgdsl-patched`
and only regenerates:
- `open-schematics_hf`
- `netlistify_schematic_images_hf`
- `ams-net.github.io`
Summary of what changed in the derived export:
- `open-schematics_hf`: reconstructed graph connectivity instead of emitting empty-member nets
- `netlistify_schematic_images_hf`: demoted partial/noisy component-layout supervision unless graph and visual component types match exactly
- `ams-net.github.io`: fixed graph-side transistor typing and demoted partial/noisy component-layout supervision unless graph and visual component types match exactly
This file still documents the raw source dataset structure below; it does not replace the per-version derived CGDSL README under `derived/cgdsl/20260307-081439-fix-open-netlistify-ams-overlay/README.md`.
## 1) Open Schematics (two mirrors)
Paths:
- `/mnt/c/users/luiss/circuitgen/open-schematics`
- `/mnt/c/users/luiss/circuitgen/datasets/open-schematics_hf`
Both have the same structure:
```text
open-schematics[_hf]/
README.md
.gitattributes
open-schematics.png
data/
train-00000-of-00078.parquet
...
train-00077-of-00078.parquet
```
Key facts:
- `78` parquet shards.
- Per-row parquet schema:
- `schematic: string` (schematic source text, typically KiCad)
- `image: struct{bytes: binary, path: string}` (rendered image bytes + filename)
- `components_used: list<string>`
- `json: string`
- `yaml: string`
- `name: string`
- `description: string`
- `type: string` (example: `.kicad_sch`)
How to treat:
- Primary supervised pair for generation: `schematic` (or graph derived from it) -> `image.bytes`.
- `json`, `yaml`, and `components_used` are auxiliary metadata/features.
## 2) Netlistify HF dataset (gated dataset, now pulled)
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/netlistify_schematic_images_hf`
Structure:
```text
netlistify_schematic_images_hf/
README.md
.gitattributes
comoponent_id.txt
images.zip
components.zip
pkl.zip
sp.zip
```
Inside archives:
- `images.zip` -> `images/circuit<ID>.jpg` (`100001` entries incl. folder entry)
- `components.zip` -> `components/circuit<ID>.txt`
- `pkl.zip` -> `pkl/circuit<ID>.pkl`
- `sp.zip` -> `sp_folder_after/circuit<ID>.sp`
Canonical sample key:
- Integer `<ID>` in filename (`circuit0`, `circuit1`, ...).
- Join all modalities by matching this `<ID>`.
Observed formats:
- `components/circuit<ID>.txt`: YOLO-like component lines + orientation token, e.g.
- `<class_id> <x_center> <y_center> <width> <height> <orientation>`
- `pkl/circuit<ID>.pkl`: Python `dict`; keys are net names (`net0`, `gnd`, ...), values are lists of line segments like `[x1, y1, x2, y2]` (normalized coords).
- `sp_folder_after/circuit<ID>.sp`: SPICE/HSPICE text netlist.
How to treat:
- Main pair for your task: `.sp` (graph) + `.pkl` (net geometry hints) -> `.jpg`.
- `components` can be used as auxiliary symbol supervision.
## 3) AMSNet 1.0 (repo + zip + extracted)
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/ams-net.github.io`
Top-level:
```text
ams-net.github.io/
amsnet_1.0-20240412T024532Z-001.zip # valid dataset zip
amsnet_1.0/ # extracted
amsnet_1.0/
0/
1/
...
733/ # 734 circuit folders total
AMSNet_1_1.ipynb
README.md
LICENSE
index.html
amsnet_1.0-from-blob.zip # HTML artifact from blob URL (ignore)
```
Per-circuit folder pattern (`<N>/`):
```text
<N>.cir
<N>.jpg
<N>_bbox.json
<N>_cpnt.jpg
<N>_net.jpg
```
Observed `*_bbox.json` format:
- JSON object; keys are class+orientation buckets (e.g. `nmos_90`, `resistor_0`, `net-black_100`, ...).
- Values are lists of bboxes, each like `[xmin, ymin, xmax, ymax]`.
How to treat:
- Core pair for generation: `<N>.cir` -> `<N>.jpg`.
- `<N>_cpnt.jpg`, `<N>_net.jpg`, and `<N>_bbox.json` are auxiliary supervision.
## 4) CI2N datasets
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/ci2n_datasets`
Structure:
```text
ci2n_datasets/
device_identification/
<ID>.png
<ID>.json
device_orientation/
train_amp_d/{d,l,r,u}/...
train_amp_m/{0,1}/...
train_bjt_d/{d,l,r,u}/...
train_bjt_m/{0,1}/...
train_diode/{d,l,r,u}/...
train_mos/{d,l,r,u}/...
train_switch/{d,l,r,u}/...
train_voltagelines/{d,l,r,u}/...
jumper_identification/
images/{train,val}/...
labels/{train,val}/...
validation/
images/<ID>.png
golden/<ID>.json
calc_ged.py
utils_ged.py
```
Validation JSON observed keys:
- `ckt_netlist`
- `ckt_type`
How to treat:
- Best as auxiliary detection/graph-eval data, not a single unified netlist->render benchmark.
## 5) Digitize-HCD (zip downloaded, not extracted)
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/digitize-hcd/Digitize-HCD Dataset.zip`
Zip top-level:
```text
Digitize-HCD Dataset/
Component Symbol and Text Label Data/
Circuit Diagram Images/circuit_<ID>.jpg
component_annotations.json
text_annotations.json
Component Port Location Data/
<17 class folders>/
Input Images/
Output Heatmaps/
XY Coordinates/
```
Observed 17 component class folders under `Component Port Location Data`:
- `BJT-NPN`, `BJT-PNP`, `Capacitor`, `Diode`, `GND`, `I-AC`, `I-DC`, `Inductor`, `MOSFET-N`, `MOSFET-P`, `Op-Amp`, `Resistor`, `V-AC`, `V-DC`, `V-DC (one-port)`, `Wire Crossover`, `Zener Diode`.
How to treat:
- Symbol/text/port localization dataset (handwritten domain).
- Not a direct netlist->render pair dataset.
## 6) SPICE netlist corpus (no paired images)
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/spice-datasets`
Structure:
```text
spice-datasets/
kicad_github/ # mostly .cir / .cir2 / .cir3
ltspice_demos/ # .net
ltspice_examples/ # .net
README.md
LICENSE.txt
```
How to treat:
- Topology/netlist source corpus only (good for graph sampling/pretraining).
- No direct rendered-image pairing inside this dataset.
## 7) Netlistify GitHub repo (tooling repo, not the HF dataset)
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/Netlistify`
Structure (top-level):
```text
Netlistify/
main.py
main_config.py
testing.py
Model.py
requirements.txt
final_test/
Visualizer/
...
```
How to treat:
- Code/training pipeline repository.
- Use for scripts/model logic, not as a raw dataset directory.
## 8) CGHD repo clone (metadata only in this checkout)
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/cghd`
Current structure:
```text
cghd/
.gitattributes
classes.json
README.md
LICENSE
```
Notes:
- `.gitattributes` marks image extensions as Git LFS-tracked.
- This checkout does not currently contain the actual large image/annotation payload.
How to treat:
- Metadata/reference only unless full data is later fetched.
## 9) AMSNet2.0 website repo clone (project page assets)
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/AMSNet2.0.github.io`
Structure:
```text
AMSNet2.0.github.io/
index.html
test.html
static/
css/
images/
js/
pdfs/
videos/
```
How to treat:
- Website/project-page assets only.
- No dataset payload in this checkout.
## 10) Placeholder folder from pre-auth attempt
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/netlistify_schematic_images`
Structure:
```text
netlistify_schematic_images/
README.md
```
How to treat:
- Placeholder from earlier gated-access attempt; not the real downloaded dataset.
- Use `netlistify_schematic_images_hf/` instead.
## 11) CGHD full payload from Zenodo (downloaded + extracted)
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/cghd_zenodo`
Structure:
```text
cghd_zenodo/
cghd-zenodo-4.zip
extracted/
README.md
classes.json
classes_color.json
classes_discontinuous.json
consistency.py
drafter_1/
...
drafter_22/
annotations/
images/
instances/
segmentation/
spice/ # present for some drafters/samples
```
Observed size/details:
- `cghd-zenodo-4.zip` is ~2.3 GB.
- `extracted/` is ~2.4 GB.
- `extracted/` currently contains `4700` files.
How to treat:
- This is the actual full CGHD payload to use for training/eval.
- Primarily handwritten symbol/box/segmentation supervision with some SPICE netlist coverage.
## 12) CGHD HF mirror snapshot (partial local pull)
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/cghd_hf`
Structure currently present:
```text
cghd_hf/
.cache/huggingface/
README.md
classes.json
classes_color.json
classes_discontinuous.json
classes_ports.json
consistency.py
drafter_-1/
drafter_0/
```
Notes:
- This local copy is partial due HF rate-limited snapshot attempts during pull.
- Prefer `cghd_zenodo/extracted/` as canonical CGHD data.
How to treat:
- Reference/partial mirror only.
## 13) CircuitSense-6k (HF clone)
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/Circuitsense-6k_hf`
Structure:
```text
Circuitsense-6k_hf/
.gitattributes
q1/
q1_image.png
q1_netlist.txt
q1_question.txt
q1_ta.txt
q2/
...
```
Observed details:
- Git-tracked files: `25197`.
- Current local checkout completeness: `missing=0` (all tracked files present).
- Directory count with `q<ID>/`: `6299`.
- Example netlist format is SPICE-like plain text lines.
- Question files ask transfer-function-style queries; `q*_ta.txt` holds answer text.
How to treat:
- Useful paired supervision: `q*_netlist.txt` + `q*_image.png`.
- QA fields are auxiliary tasks/features.
## 14) CircuitSense TransferFunction-only subset (HF clone)
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/CircuitSense-100-TF_hf`
Structure:
```text
CircuitSense-100-TF_hf/
.gitattributes
q<ID>/
q<ID>_image.png
q<ID>_netlist.txt
q<ID>_question.txt
q<ID>_ta.txt
```
Observed details:
- Git-tracked files: `397`.
- Current local checkout completeness: `missing=0`.
How to treat:
- Small TF-focused subset; good for quick sanity checks/evaluation.
## 15) CircuitVQA (HF clone)
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/circuitvqa_hf`
Structure:
```text
circuitvqa_hf/
.gitattributes
images/*.jpg
mapping_report.json
train.jsonl
val.jsonl
test.jsonl
```
Observed details:
- Git-tracked files: `5432`.
- Current local checkout completeness: `missing=0`.
- Image count (`images/*.jpg`): `5425`.
- `mapping_report.json` indicates `total=115582` QA rows and `matched=115582`.
- JSONL rows include fields:
- `image`, `question`, `answer`, `qtype`, `symbol`.
How to treat:
- Circuit visual QA supervision (count/value/position/symbol reasoning).
- Not a direct netlist->render benchmark by itself.
## 16) CircuitVQADesc (HF clone)
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/circuitvqadesc_hf`
Structure:
```text
circuitvqadesc_hf/
.gitattributes
images/*.jpg
mapping_report.json
train.jsonl
val.jsonl
test.jsonl
```
Observed details:
- Git-tracked files: `5430`.
- Current local checkout completeness: `missing=0`.
- Image count (`images/*.jpg`): `5425`.
How to treat:
- Same family as CircuitVQA; auxiliary circuit reasoning/description supervision.
## 17) LTspice SPICE<->ASC paired datasets (HF clones)
Paths:
- `/mnt/c/users/luiss/circuitgen/datasets/ltspice-spice-circuits_hf`
- `/mnt/c/users/luiss/circuitgen/datasets/ltspice-spice-circuits-no-aug_hf`
Shared structure:
```text
ltspice-spice-circuits*_hf/
README.md
.gitattributes
data/
train-00000-of-00001.parquet
test-00000-of-00001.parquet
```
Parquet schema:
- `netlist: string`
- `asc: string` (LTspice schematic text format)
Observed split sizes:
- `ltspice-spice-circuits_hf`: train `53000`, test `2790`.
- `ltspice-spice-circuits-no-aug_hf`: train `7866`, test `414`.
How to treat:
- Strong text-to-text grounded dataset for schematic layout representation learning.
- Good source for parser pretraining and graph-aware intermediate objectives.
## 18) Masala-CHAI repo + external payloads
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/Masala-CHAI`
Structure now present:
```text
Masala-CHAI/
README.md
main.py
Dataset/
data_1/
data_2/
data_3/
data_4/
data_5/
external_downloads/
masala-chai-dataset.zip
hough-assets.zip
dataset_payload/
masala-chai-dataset-new/
images/img<ID>.jpg
spice/spice<ID>.txt
captions/cap<ID>.txt
hough_payload/
hough/htlcnn/...
```
Observed counts (external dataset payload):
- `images/`: `6371` files.
- `spice/`: `6069` files.
- `captions/`: `6403` files.
Notes:
- The three modalities are not identical in count; join by numeric `<ID>` intersection.
- Repo `Dataset/data_*` folders are additional image collections from project sources.
How to treat:
- `spice` + `images` are useful for netlist-conditioned tasks.
- `captions` can support multimodal/description-side supervision.
## 19) Lessons in Electric Circuits source packs (textbook assets)
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/lessons-in-electric-circuits`
Structure:
```text
lessons-in-electric-circuits/
liechtml.tar.gz
liecsrc.tar
liectiny.tar
extracted_html/
AC/ DC/ Devel/ Digital/ Exper/ Ref/ Semi/
extracted_src/
AC/ DC/ Devel/ Digital/ Exper/ Ref/ Semi/ bin/
extracted_tiny/
AC/ DC/ Devel/ Digital/ Exper/ Ref/ Semi/ bin/
```
Observed counts:
- `extracted_html/`: `4034` files.
- `extracted_src/`: `98` files.
- `extracted_tiny/`: `98` files.
- Image assets inside `extracted_html/` (`png/jpg/jpeg/gif/svg`): `3632`.
How to treat:
- Style/reference corpus for textbook-like circuit figures.
- Not directly paired with machine-readable netlists in this dump.
## 20) kicad-library (CircuitSnips platform repo clone)
Path:
- `/mnt/c/users/luiss/circuitgen/datasets/kicad-library`
Structure:
```text
kicad-library/
README.md
package.json
src/
public/
scripts/
supabase/
...
```
Observed notes:
- This is the web/platform codebase clone.
- This checkout currently has `0` `.kicad_sch` files.
- The scraped corpus referenced in the README is not embedded as raw dataset files in this repo clone.
How to treat:
- Tooling/reference repository only unless separate circuit payload export is added.