Update readme - #11
Conversation
Greptile SummaryThis PR restructures the documentation across both the NV-Segment-CT and NV-Segment-CTMR bundles: it simplifies installation/download commands (removing the Key issues found during review:
Confidence Score: 4/5Safe 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.
Important Files Changed
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
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). |
There was a problem hiding this comment.
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.
| 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). |
There was a problem hiding this comment.
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.
| 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). |
There was a problem hiding this comment.
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:
| 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 |
| ``` | ||
|
|
||
| ``` | ||
| Note: For more details about batch processing, please refer to NV-Segment-CTMR readme.md | ||
| ``` |
There was a problem hiding this comment.
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.
| ``` | |
| ``` | |
| 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>
| hf download nvidia/NV-Segment-CT --local-dir models/ && \ | ||
| mv models/vista3d_pretrained_model/model.pt models/model.pt |
There was a problem hiding this comment.
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:
| 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.
No description provided.