Skip to content

Commit

Permalink
Add VISTA2D dependencies (#1745)
Browse files Browse the repository at this point in the history
* update the dependencies part

Signed-off-by: binliu <[email protected]>

* remove opencv package

Signed-off-by: binliu <[email protected]>

* remove redundant dependencies

Signed-off-by: binliu <[email protected]>

---------

Signed-off-by: binliu <[email protected]>
Co-authored-by: tangy5 <[email protected]>
  • Loading branch information
binliunls and tangy5 authored Sep 27, 2024
1 parent 4736d5f commit b85d6b1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
24 changes: 24 additions & 0 deletions sample-apps/vista2d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,35 @@ Segmentation Masks
# skip this if you have already downloaded the app or using github repository (dev mode)
monailabel apps --download --name vista2d --output apps

# install the dependencies
pip install -r ./apps/vista2d/requirements.txt

# Start server with vista2d model
monailabel start_server --app apps/vista2d --studies datasets --conf models vista2d --conf preload true --conf skip_trainers true
```

**Important Note**

If your environment already contains OpenCV, installing `cellpose` may lead to conflicts and produce errors such as:

```
AttributeError: partially initialized module 'cv2' has no attribute 'dnn' (most likely due to a circular import)
```

when executing. To resolve this issue, please uninstall OpenCV and then re-install `cellpose` with a command like:

```Bash
pip uninstall -y opencv && rm /usr/local/lib/python3.x/dist-packages/cv2
```

Alternatively, you can use the following command to install `cellpose` without its dependencies:

```
pip install --no-deps cellpose
```

**Specify bundle version** (Optional)

Above command will download the latest bundles from Model-Zoo by default. If a specific or older bundle version is used, users can add version `_v` followed by the bundle name. Example:

```bash
Expand Down
12 changes: 8 additions & 4 deletions sample-apps/vista2d/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# Licensed under the Apache License Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Unless required by applicable law or agreed to in writing software
# distributed under the License is distributed on an AS IS BASIS
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
cellpose==3.0.8
natsort==8.4.0
roifile==2024.5.24
fastremap==1.15.0

0 comments on commit b85d6b1

Please sign in to comment.