SpiceNet: reproducibility archive

Artifacts for the paper "SpiceNet: Measuring and Narrowing the Cross-Source Gap in Fine-Grained Spice Recognition" (Md. Noushad Jahan Ramim, Maisha Sameha, Dr. Nazmun Nahid; University of Asia Pacific).

This repository contains everything needed to reproduce the paper except the source images, which are not redistributed here (see Licensing). You reconstruct the benchmark by downloading the two public image collections and applying the splits in manifests/.

Contents

Folder What it holds
manifests/ The deterministic manifests and 70/15/15 splits (seed 42): the 22-class unified benchmark, the 8-class overlap in each source, and the de-duplicated variants. Each entry references a source image by its original identifier.
code/ All training, evaluation, audit, and figure scripts, plus the src/ package (dataset, model, domain-generalization methods).
results/ The computed result tables and per-sample/per-seed JSON behind every number and figure in the paper.
checkpoints/ Trained model weights (best.pth) for every experimental run reported in the paper: the cross-source SpiceFusionNet matrix, the eight benchmark backbones, the single-source ARC-V/RSC/SD study over three seeds, the invariance model, and GranuFormer. Smoke tests and the Paper-2 leave-one-source-out runs are excluded.
DATASHEET.md Datasheet for the benchmark (provenance, licences, splits, dedup).

Download from the Hub

from huggingface_hub import snapshot_download

local = snapshot_download(repo_id="Noushad999/SpiceNet", repo_type="model")
# manifests, code, results, and checkpoints are now under `local`

To pull a single checkpoint instead of the whole 6.5 GB:

from huggingface_hub import hf_hub_download

ckpt = hf_hub_download(repo_id="Noushad999/SpiceNet", repo_type="model",
                       filename="checkpoints/arcv_sd_indian_s42/best.pth")

The two source datasets (download these)

The images are not in this repository. Obtain them from their original sources:

  • Studio source - Mendeley Indian Spice dataset, Thite et al., Data in Brief 57:110936, 2024. CC BY 4.0. doi:10.1016/j.dib.2024.110936 (Mendeley vg77y9rtjb).
  • In-the-wild source - SpiceSpectrum, Ramim et al., Data in Brief 63:112097,
    1. Image deposit CC BY-ND 4.0. doi:10.17632/5v7w2hx8n5.2.

Reconstructing the benchmark

  1. Download both collections above and note the local root path of each.
  2. The manifests in manifests/ list, for every split, the source image identifiers and the normalized class label. Map those identifiers to your local image paths.
  3. Apply the splits as given (do not reshuffle; the seed is 42).
  4. Reproduce the headline numbers without retraining using the released checkpoints:
    • code/eval_baseline_mcnemar.py - single-source held-out accuracy and per-seed McNemar.
    • code/eval_commodity_matched.py - the collapse with the coriander label-mismatch class removed.
    • code/eval_stats_hardening.py - cluster bootstrap and seed-level paired tests. Paths at the top of each script may need to point at your checkpoint and manifest locations.

Licensing

  • Code in code/ is released under the MIT License.
  • Manifests, splits, and result files are released CC BY 4.0.
  • Checkpoints are the authors' own trained weights and contain no source images.
  • Source images retain their original licences (studio CC BY 4.0, in-the-wild CC BY-ND 4.0) and are obtained from the repositories above, not from this archive.

Citation

Please cite the paper and both source datasets. See DATASHEET.md for the dataset references and the paper for the full bibliography.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support