Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 30, 2024
1 parent bbebdb2 commit 3926770
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ limitations under the License.
-->

# MONAI VISTA Repository
This is the repository for VISTA3D and VISTA2D For the older VISTA2.5d code, please checkout the vista2.5d branch
This is the repository for VISTA3D and VISTA2D For the older VISTA2.5d code, please checkout the vista2.5d branch
2 changes: 1 addition & 1 deletion vista3d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Ask and answer questions on [MONAI VISTA's GitHub discussions tab](https://githu

## License

The codebase is under Apache 2.0 Licence. The model weight is under special NVIDIA license.
The codebase is under Apache 2.0 Licence. The model weight is under special NVIDIA license.

## Reference

Expand Down
2 changes: 1 addition & 1 deletion vista3d/data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The output of this step is multiple JSON files, each file corresponds
to one dataset.

##### 2. Add label_dict.json and label_mapping.json
Add new class indexes to `label_dict.json` and the local to global mapping to `label_mapping.json`.
Add new class indexes to `label_dict.json` and the local to global mapping to `label_mapping.json`.

## SupverVoxel Generation
1. Download the segment anything repo and download the ViT-H weights
Expand Down
10 changes: 7 additions & 3 deletions vista3d/scripts/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,20 @@ def on_button_click(event, ax=ax):
print("-- segmenting ---")
self.generate_mask()
print("-- done ---")
print("-- Note: Point only prompts will only do 128 cubic segmentation, a cropping artefact will be observed. ---")
print("-- Note: Point without class will be treated as supported class, which has worse zero-shot ability. Try class > 132 to perform better zeroshot. ---")
print(
"-- Note: Point only prompts will only do 128 cubic segmentation, a cropping artefact will be observed. ---"
)
print(
"-- Note: Point without class will be treated as supported class, which has worse zero-shot ability. Try class > 132 to perform better zeroshot. ---"
)
print("-- Note: CTRL + Right Click will be adding negative points. ---")
print(
"-- Note: Click points on different foreground class will cause segmentation conflicts. Clear first. ---"
)
print(
"-- Note: Click points not matching class prompts will also cause confusion. ---"
)

self.update_slice(ax)
# self.point_start = len(self.clicked_points)

Expand Down
12 changes: 6 additions & 6 deletions vista3d/scripts/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
import torch
import torch.distributed as dist
import yaml
from data.datasets import (
compute_dataset_weights,
get_class_names,
get_datalist_with_dataset_name,
get_datalist_with_dataset_name_and_transform,
)
from monai import transforms
from monai.apps.auto3dseg.auto_runner import logger
from monai.apps.utils import DEFAULT_FMT
Expand All @@ -41,12 +47,6 @@
from torch.utils.tensorboard import SummaryWriter
from tqdm import tqdm

from data.datasets import (
compute_dataset_weights,
get_class_names,
get_datalist_with_dataset_name,
get_datalist_with_dataset_name_and_transform,
)
from vista3d import vista_model_registry

from .sliding_window import sliding_window_inference
Expand Down
1 change: 0 additions & 1 deletion vista3d/scripts/validation/build_vista3d_eval_only.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import numpy as np
import torch
from monai.metrics import compute_dice

from vista3d.modeling import (
VISTA3D2,
Class_Mapping_Classify,
Expand Down
1 change: 0 additions & 1 deletion vista3d/vista3d/modeling/vista3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import torch
import torch.nn as nn
from monai.utils import optional_import

from scripts.utils.trans_utils import convert_points_to_disc
from scripts.utils.trans_utils import get_largest_connected_component_mask as lcc
from scripts.utils.workflow_utils import sample_points_patch_val
Expand Down

0 comments on commit 3926770

Please sign in to comment.