text
stringlengths
0
1.47k
help="(objaverse / general) Path to a txt file listing object "
"types to skip (one per line; blanks and '#' comments "
"ignored). Default 'auto' uses "
"<data_dir>/filtered_objects.txt if present. Pass an "
"empty string to disable.")
parser.add_argument("--clip_trims", type=str, default="auto",
help="Path to a txt file of hand-reviewed head trims, one "
"'<clip stem> <N>' per line with optional '#' comments: "
"the first N frames of that clip's export NPZ are "
"dropped on load, before downsampling and the static "
"trim (a bind-pose or foreign first frame that snaps "
"into the motion). Default 'auto' uses "
"<data_dir>/clip_trims.txt if present. Pass an empty "
"string to disable.")
parser.add_argument("--activity_keep", type=str, default="auto",
help="Path to a txt file of clip stems (one per line, '#' "
"comments) exempt from the low-activity filter: "
"hand-reviewed small but real motions such as a head "
"turn or a wave. Default 'auto' uses "
"<data_dir>/activity_keep.txt if present. Pass an empty "
"string to disable.")
parser.add_argument("--generic_captions", type=str, default="auto",
help="JSON {export clip: generic caption}, the second "
"caption of every clip (written by "
"tools/patch_annotations.py). Default 'auto' uses "
"<data_dir>/motion_captions_generic.json if present. "
"Saved as captions_generic.json beside captions.json, "
"keyed the same way. Pass an empty string to disable "
"(a stale captions_generic.json is then removed). "
"Not part of the per-object cache: changing it never "
"re-processes an object.")
parser.add_argument("--detail_captions", type=str, default="auto",
help="Like --generic_captions for the third, detail "
"caption (7-19 words): default 'auto' uses "
"<data_dir>/motion_captions_detail.json if present, "
"saved as captions_detail.json.")
parser.add_argument("--category_groups", type=str, default="auto",
help="Path to the body-plan category JSON copied into "
"the feature dir (the training loader reads it for "
"objects_subset). Default 'auto' uses "
"<data_dir>/category_groups.json if present; "
"with none, an earlier run's copy is removed. Pass "
"an empty string to leave it out — the stage-2 "
"classifier may still be running, and a partial "
"file would land in the feature dir as if it were "
"complete. Copy the finished file in afterwards "
"(a later run with an empty string leaves it in "
"place); nothing else in this stage reads it.")
# Execution
parser.add_argument("--num_workers", type=int, default=1,
help="Parallel worker processes (object types are independent)")
parser.add_argument("--vis", action=argparse.BooleanOptionalAction, default=True,
help="Render the per-clip MP4 preview (use --no-vis for bulk runs)")
parser.add_argument("--vis_ground", action=argparse.BooleanOptionalAction,
default=True,
help="Render previews with a checkerboard ground plane, "
"follow camera, contact shadow and root "
"trajectory (default). --no-vis_ground renders "
"the plain cubic view instead.")
parser.add_argument("--adopt_legacy_cache", action="store_true",
help="Keep cond_parts/ entries that record no export digest "
"instead of re-processing their objects, and stamp them with "
"the current one. Only for entries known to be built from the "
"current export: nothing checks it.")
parser.add_argument("--save_glb", action="store_true",
help="Afterwards bake <data_dir>/rigs/<asset>.glb (the export stage's "
"rest-pose assets, run_export.sh --save_glb / --glb_only) into the "
"canonical frame: <canonical_assets_dir>/<object_type>.glb, driven "
"by the feature clips with no cond.npy (canonical_assets.py; needs "
"bpy; one process, so shard canonical_assets.py for a large dataset).")
parser.add_argument("--canonical_assets_dir", type=str, default=None,
help="Where --save_glb writes (default: canonical_assets/<dataset> "
"beside the features root, e.g. dataset/canonical_assets/truebones "
"for dataset/features/truebones; <save_dir>_canonical_assets for "
"a save_dir outside a features root).")
return parser.parse_args(argv)
def _resolve_skip_list_path(path, data_dir, filename):
"""Both skip lists are optional: a missing file simply disables that step.
``"auto"`` looks for *filename* in *data_dir*; an empty string disables the
list; any other value is used as given but is still skipped (with a warning)
when it does not exist, so a stale path never aborts a run.
"""
if not path:
return None
if path == "auto":
default = pjoin(data_dir, filename)
if os.path.isfile(default):
return default
logger.info(f'No {filename} in {data_dir}; skipping that filter step')
return None
if os.path.isfile(path):
return path
logger.warning(f'Skip list {path!r} not found; skipping that filter step')
return None
def resolve_filtered_objects_path(path, data_dir):