Skip to content

Reproduce issue with the inference.json #68

Open

Description

@MelindaDong

Hi, I tried to reproduce the table 1 result in CVPR2025 paper for the VISTA3D auto, I noticed that you provide the example inference.json file for the spleen task, like this:

" "input_dict": "${'image': '/data/Task09_Spleen/imagesTr/spleen_10.nii.gz', 'label_prompt': [3]}",
"everything_labels": "$list(set([i+1 for i in range(132)]) - set([2,16,18,20,21,23,24,25,26,27,128,129,130,131,132]))","

When trying to do inference with the colon cancer task, I believe the label_prompt should be 27, based on thishttps://github.com/NVIDIA-Medtech/NV-Segment-CTMR/blob/main/NV-Segment-CT/configs/label_dict.json
But not sure how to modify the "everything_labels" part; it seems like you encoded the information that for one specific task, what the available classes are.
Or can you provide the full inference.json file for easy reproduction?

Your timely reply will be very helpful, thanks a lot.

Activity

  1. heyufan1995 commented on Mar 22, 2026

    @heyufan1995
    Member

    Hi If you want to reproduce the results from the paper, just follow the evaluation part in
    https://github.com/Project-MONAI/VISTA/blob/main/vista3d/README_research.md

    If you want to do inference, just change "everything_labels" in the inference.json to whatever class you want or
    python -m monai.bundle run --config_file configs/inference.json --input_dict "{'image':'example/s0289.nii.gz','label_prompt':[27]}"

  2. MelindaDong commented on Apr 27, 2026

    @MelindaDong
    Author

    Hi, when runing with this "... -m scripts.validation.val_multigpu_point_patch run --config_file "['configs/supported_eval/infer_patch_auto.yaml']" --dataset_name 'xxxx'" set the fold as -1, I can reproduce the result in paper; but by running this ".... python -m scripts.infer --config_file 'configs/infer.yaml' - infer --image_file 'example-1.nii.gz' --label_prompt "[1]" --save_mask true", then calculate dice by external dice function, the performance drops.

    so what is the main difference between those 2 approches? the vista3d auto version paper result is reported via "infer_patch_auto.yaml", right?

  3. heyufan1995 commented on Apr 27, 2026

    @heyufan1995
    Member

    Hi:
    Yes, the paper results is from scripts.validation.val_multigpu_point_patch and infer_patch_auto.yaml.
    Vista3d is prompt based binary segmentation, so the desired output is [class, H, W, D]. val_multigpu_point_patch did not perform argmax across class before dice calculation.

    For infer.py, it needs to save a nifiti file for visualization, it will compress all class into [1, H,W,D] and causing overlapped class to have reduced results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions