Skip to content

Update readme - #11

Merged
heyufan1995 merged 1 commit into
NVIDIA-Medtech:mainfrom
heyufan1995:main
Mar 31, 2026
Merged

Update readme#11
heyufan1995 merged 1 commit into
NVIDIA-Medtech:mainfrom
heyufan1995:main

Conversation

@heyufan1995

Copy link
Copy Markdown
Contributor

No description provided.

@heyufan1995
heyufan1995 merged commit e04af88 into NVIDIA-Medtech:main Mar 31, 2026
1 check failed
@greptile-apps

greptile-apps Bot commented Mar 31, 2026

Copy link
Copy Markdown

Greptile Summary

This PR restructures the documentation across both the NV-Segment-CT and NV-Segment-CTMR bundles: it simplifies installation/download commands (removing the cd .. dance and using relative models/ paths), moves the detailed continual-learning/finetuning steps out of the READMEs and into finetune.md, and updates brain-segmentation usage examples with better inline comments.

Key issues found during review:

  • Broken finetuning link in NV-Segment-CTMR/docs/README.md — the new "Continual learning / Finetuning" section links to [details](inference.md), but inference.md does not exist in the CTMR docs directory. The correct target is finetune.md.
  • Wrong finetuning link in NV-Segment-CT/docs/README.md — similarly links to inference.md, which covers inference configuration rather than finetuning; should point to finetune.md.
  • Self-referential links in NV-Segment-CT/docs/finetune.md — two links ([this](finetune.md) and [here](finetune.md)) were carried over from README.md without being updated; they now loop back to the same file instead of navigating anywhere useful.
  • Typo — "temperary" should be "temporary" in NV-Segment-CTMR/docs/README.md.
  • Missing rmdir cleanup — the intermediate models/vista3d_pretrained_model/ directory created by hf download is left behind after the mv.

Confidence Score: 4/5

Safe to merge after fixing the three broken/self-referential links; the documentation changes are otherwise clear improvements.

Three P1 findings exist: one definitively broken link (404) in the CTMR README, one misdirected link in the CT README pointing to the wrong guide, and two self-referential circular links in finetune.md. These will confuse users following the finetuning documentation. All other changes are positive simplifications. Score is 4 rather than 5 because of the P1 link issues that should be corrected before merge.

NV-Segment-CTMR/docs/README.md (broken link), NV-Segment-CT/docs/README.md (wrong link), and NV-Segment-CT/docs/finetune.md (self-referential links)

Important Files Changed

Filename Overview
NV-Segment-CT/docs/README.md Simplified installation/download commands and condensed the finetuning section to a brief pointer — but the finetuning link incorrectly points to inference.md instead of finetune.md, and a malformed adjacent code fence is present.
NV-Segment-CT/docs/finetune.md Receives the detailed finetuning content moved from README.md, but two cross-reference links ([this](finetune.md) and [here](finetune.md)) were not updated and now point self-referentially back to this same file.
NV-Segment-CTMR/docs/README.md Simplifies download instructions and brain-segmentation comments positively, but the finetuning section links to inference.md which does not exist in this docs directory (404); should be finetune.md.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User: Quick Start / Installation] --> B[Clone repo & install deps]
    B --> C["mkdir -p models\nhf download ... --local-dir models/"]
    C --> D["mv models/vista3d_pretrained_model/model.pt\nmodels/model.pt"]
    D --> E{Inference type?}
    E -->|Automatic| F["monai.bundle run\nconfigs/inference.json"]
    E -->|Interactive| G["monai.bundle run\nconfigs/inference.json\n+ points/point_labels"]
    E -->|Batch multi-GPU| H["torchrun + configs/mgpu_inference.json"]
    E -->|Brain MRI| I["run_brain_segmentation.sh\n--input / --input_folder / --file_list"]
    E -->|TensorRT| J["configs/inference_trt.json"]
    F --> K[Output segmentation]
    G --> K
    H --> K
    I --> K
    J --> K
    K --> L{Need finetuning?}
    L -->|Yes - predefined| M["See finetune.md\nStep1: data JSON\nStep2: hyperparams\nStep3: run training"]
    L -->|Yes - custom| N["Load checkpoint\nvista3d132.load_state_dict(...)"]
    L -->|No| O[Done]
    M --> O
    N --> O
Loading

Reviews (1): Last reviewed commit: "Update readme" | Re-trigger Greptile


See [details](docs/inference.md)
# Continual learning / Finetuning
We provide predefined finetuning tutorial in [details](inference.md).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Broken link — inference.md does not exist in this directory

The link [details](inference.md) points to a file that does not exist in NV-Segment-CTMR/docs/. The only available docs files are README.md, data.md, and finetune.md. The finetuning tutorial content that was previously in this README was moved to finetune.md, so the link should point there instead.

Suggested change
We provide predefined finetuning tutorial in [details](inference.md).
We provide predefined finetuning tutorial in [details](finetune.md).


```text
NOTE: Evaluation does not support point evaluation.`"validate#evaluator#hyper_kwargs#val_head` is always set to `auto`.
We provide predefined finetuning tutorial in [details](inference.md).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Finetuning link points to wrong file

[details](inference.md) links to NV-Segment-CT/docs/inference.md, which covers inference configuration — not the finetuning tutorial. The detailed finetuning steps (data preparation, hyperparameters, multi-GPU training, evaluation, FAQ) were explicitly moved to finetune.md in this PR. Users following this link will be misdirected.

Suggested change
We provide predefined finetuning tutorial in [details](inference.md).
We provide predefined finetuning tutorial in [details](finetune.md).


`index_1_in_user_data`,...,`index_N_in_user_data` is the class index value in the groundtruth that user tries to segment. `mapped_index_1`,...,`mapped_index_N` is the mapped index value that the bundle will output. You can make these two the same for finetuning, but we suggest finding the semantic relevant mappings from our unified [global label index](../configs/metadata.json). For example, "Spleen" in MSD09 groundtruth label is represented by 1, but "Spleen" is 3 in `docs/labels.json`. So by defining label mapping `[[1, 3]]`, VISTA3D can segment "Spleen" using its pretrained weights out-of-the-box, and can speed up the finetuning convergence speed.
If you cannot find a relevant semantic label for your class, just use any value < `num_classes` defined in train_continue.json.
For more details about this label_mapping, please read [this](finetune.md).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Self-referential links after content was moved from README

Both this line and line 61 contain links that point back to finetune.md — the file they are already in. These were originally cross-references from README.md that said "see finetune.md for details", but when the content was moved here, the link targets were not updated. Clicking them just reloads the current page with no useful navigation.

Line 55:

Suggested change
For more details about this label_mapping, please read [this](finetune.md).
For more details about this label_mapping, please read the [Configurations section below](#configurations).

Line 61 (#### 3. Optional hyperparameters and details are [here](finetune.md)) should similarly be updated to reference the Configurations section within this file, or the link can simply be removed since the reader is already in finetune.md.


./brain_t1_preprocess/run_brain_segmentation.sh --input example/brain_t1.nii.gz
./brain_t1_preprocess/run_brain_segmentation.sh --input example/brain_t1.nii.gz --output_dir results/
# keep temperary files for skull stripping and registration

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Typo: "temperary" → "temporary"

Suggested change
# keep temperary files for skull stripping and registration
# keep temporary files for skull stripping and registration

Comment on lines 41 to +44
```

```
Note: For more details about batch processing, please refer to NV-Segment-CTMR readme.md
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing blank line between adjacent fenced code blocks

The closing triple backtick of the bash code block is immediately followed by another opening triple backtick with no blank line in between. Consider using a blockquote note instead for cleaner rendering.

Suggested change
```
```
Note: For more details about batch processing, please refer to NV-Segment-CTMR readme.md
```
torchrun --nproc_per_node=2 --nnodes=1 -m monai.bundle run --config_file="['configs/inference.json', 'configs/batch_inference.json', 'configs/mgpu_inference.json']" --input_dir="example/" --output_dir="example/"

Note: For more details about batch processing, please refer to NV-Segment-CTMR readme.md


<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

Comment on lines +20 to +21
hf download nvidia/NV-Segment-CT --local-dir models/ && \
mv models/vista3d_pretrained_model/model.pt models/model.pt

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Empty vista3d_pretrained_model/ directory left behind after mv

After downloading with hf download nvidia/NV-Segment-CT --local-dir models/, HuggingFace Hub places the file at models/vista3d_pretrained_model/model.pt. The mv moves the file but the now-empty directory is never removed. Consider re-adding the cleanup step:

Suggested change
hf download nvidia/NV-Segment-CT --local-dir models/ && \
mv models/vista3d_pretrained_model/model.pt models/model.pt
hf download nvidia/NV-Segment-CT --local-dir models/ && \
mv models/vista3d_pretrained_model/model.pt models/model.pt && \
rmdir models/vista3d_pretrained_model

The same applies to NV-Segment-CTMR/docs/README.md line 41.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant