Giter Site home page Giter Site logo

samist's People

Contributors

dibrale avatar junior-senior avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

samist's Issues

No matter what image is selected, the program will report the same error: "ValueError: not enough values to unpack"

I created a virtual environment named "samist" and followed the instructions as the readme file. But only succeed once at the first I run it. After that, whatever the picture or model I choose, the program will always show the error as follows:
(samist) E:\samist>python main.py
Starting Segment Anything Model Image Segmentation Tool (SAMIST)
Traceback (most recent call last):
File "E:\samist\main.py", line 302, in
[masks, [out_bw, out_full_res, masked_images, out_cropped]] = values[event]
ValueError: not enough values to unpack (expected 4, got 0)

Missing dependencies

I'm getting this while running in a fresh venv:

Traceback (most recent call last):
  File "/samist/main.py", line 14, in <module>
    from segment_anything import sam_model_registry, SamAutomaticMaskGenerator
  File "/samist/env/lib/python3.9/site-packages/segment_anything/__init__.py", line 7, in <module>
    from .build_sam import (
  File "/samist/env/lib/python3.9/site-packages/segment_anything/build_sam.py", line 7, in <module>
    import torch
ModuleNotFoundError: No module named 'torch'

Traceback (most recent call last):
  File "/samist/main.py", line 14, in <module>
    from segment_anything import sam_model_registry, SamAutomaticMaskGenerator
  File "/samist/env/lib/python3.9/site-packages/segment_anything/__init__.py", line 14, in <module>
    from .predictor import SamPredictor
  File "/samist/env/lib/python3.9/site-packages/segment_anything/predictor.py", line 14, in <module>
    from .utils.transforms import ResizeLongestSide
  File "/samist/env/lib/python3.9/site-packages/segment_anything/utils/transforms.py", line 10, in <module>
    from torchvision.transforms.functional import resize, to_pil_image  # type: ignore
ModuleNotFoundError: No module named 'torchvision'

While it seems to be an upstream issue, after installing both torch (version 2.0.1) and torchvision (version 0.15.2) it seems to work fine.

Exception in thread Thread-2:

Hello, Dear author, I met this error below,How can I fix that?
I use mac pro, python3.8 to run this。

Exception in thread Thread-2:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/xx/Library/Python/3.8/lib/python/site-packages/PySimpleGUI/PySimpleGUI.py", line 11815, in _long_func_thread
return_value = original_func()
File "./main.py", line 266, in
lambda: segmentation(points_per_side, min_area, stability_thresh, predict_iou),
File "./main.py", line 58, in segmentation
sam = sam_model_registrymodel_type
File "/Users/xx/Library/Python/3.8/lib/python/site-packages/segment_anything/build_sam.py", line 15, in build_sam_vit_h
return _build_sam(
File "/Users/xx/Library/Python/3.8/lib/python/site-packages/segment_anything/build_sam.py", line 66, in _build_sam
sam = Sam(
File "/Users/xx/Library/Python/3.8/lib/python/site-packages/segment_anything/modeling/sam.py", line 46, in init
self.register_buffer("pixel_mean", torch.Tensor(pixel_mean).view(-1, 1, 1), False)
TypeError: register_buffer() takes 3 positional arguments but 4 were given
image

Python version

This may be a dumb question but what version of python are you using? I create my ENV and have had issues working with the latest version of python.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.