Add Pixio as external encoder #136
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR integrates Pixio, an image encoder, into MapAnything to enable benchmarking against other SOTA encoders (e.g., DINO series).
Changes
model.pyto support lazy instantiation of encoder classes from/mapanything/models/external/.Testing
Manual validation was performed by running benchmark scripts on an H100 node and running local demos.
Benchmark:
Local Demo:
python scripts/demo_local_weight.py \ --image_folder <INPUT_IMAGES_DIR> \ --local_config '{ "path": "configs/train.yaml", "model_str": "pixio", "checkpoint_path": "<CHECKPOINT_PATH>", "config_overrides": [ "machine=aws", "model=pixio", "model/task=images_only", "model.encoder.uses_torch_hub=false" ], "trained_with_amp": true, "trained_with_amp_dtype": "bf16", "data_norm_type": "dinov2", "patch_size": 16, "resolution": 512, "strict": false }' \ --output_path <OUTPUT_FILE>Performance
See benchmark results here: Pixio Performance
Dependencies
None.
Breaking Changes
None.