Code Monkey home page Code Monkey logo

isat_with_segment_anything's Introduction

ISAT_with_segment_anything

An Interactive Semi-Automatic Annotation Tool Based on Segment Anything

GitHub forks GitHub forks PyPI - Version Pepy Total Downlods

[中文] [English]

标注.gif

Our tool enables interactive use of segment anything for rapid image segmentation with low RAM requirements (optional bf16 mode).

Demo Video:YouTube


Features

Annotaion modes

  • Semi-automatic Annotation: utilizes SAM with point and bbox prompts.
  • Manual Annotation: click or drag to draw polygons (0.15s per point).

Annotation adjustments

  • Polygon Adjustments: delete points and adjust object occlusions.
  • Polygon Visualization: Preview groups and semantic/instance segmentation masks.

Export annotations

  • Supported formats: MSCOCO, YOLO, LabelMe, and VOC (also xml)

For more features, see the Features Description.


Installation

There are three ways to install ISAT-SAM:

  1. from source code (recommended)
  2. pip install
  3. from .exe

Option 1: from source code

(1) Create environment

conda create -n isat_env python=3.8
conda activate isat_env

(2) Install ISAT_with_segment_anything and its dependencies

To use GPU, please install Pytorch-GPU on Windows OS frist.

git clone https://github.com/yatengLG/ISAT_with_segment_anything.git
cd ISAT_with_segment_anything
pip install -r requirements.txt

(3) Download Segment anything pretrained checkpoint.

Download the checkpoint, and save in under: ISAT_with_segment_anything/ISAT/checkpoints

After version 0.0.3, you can manage checkpoints within GUI, click [menubar]-[SAM]-[Model manage] to open the GUI.

Now support SAM, sam-hq, MobileSAM, and EdgeSAM etc.

pretrained checkpoint memory size
SAM sam_vit_h_4b8939.pth 7305M 2.6G
sam_vit_l_0b3195.pth 5855M 2.6G
sam_vit_b_01ec64.pth 4149M 375M
sam-hq sam_hq_vit_h.pth 7393M 2.6G
sam_hq_vit_l.pth 5939M 1.3G
sam_hq_vit_b.pth 4207M 379M
sam_hq_vit_tiny.pth 1463M 43M
mobile-sam mobile_sam.pt 1375M 40M
edge-sam edge_sam.pth 960M 39M
edge_sam_3x.pth 960M 39M
sam-med sam-med2d_b.pth 1500M 2.4G

(4) Run

python main.py

Option 2: pip install

Note that the version may be lower than source code version if installed with pip

(1) Create environment

conda create -n isat_env python=3.8
conda activate isat_env

(2) pip install isat-sam

To use GPU, please install Pytorch-GPU on Windows OS frist.

pip install isat-sam

(3) Run

isat-sam

Option 3: install with .exe

(1) download the .exe

The version of exe maybe older than source code.

Download three .zip files, total 2.7G

Download link
Baidu Netdisk link:https://pan.baidu.com/s/1vD19PzvIT1QAJrAkSVFfhg code:ISAT

Click main.exe to run the tool.

(2) Download Segment anything pretrained checkpoint.

The download zip files, container sam_hq_vit_tiny.pth, but somebody told the model not support cpu. You can download mobile_sam.pt to test the tool.

If you want use other models, seeDownload Segment anything pretrained checkpoint


Usage

1. Annotation

1. Choose the categories in left window of software.
    Edit the category in Toolbar-File-Setting.
    
2. Start annotating
    2.1 semi-automatic annotate with SAM.
        Click button named [Segment anything] start annotate(shortcut Q).
        Click interested area with left button of mouse, click uninterested area with right button of mouse, SAM will calcute masks.
    2.2 draw polygons manually.
        Click the button [Draw polygon] to start annotation (shortcut C).
        Left click to add point into the polygon.
        Hold the left click and drag will automaticly add point into the polygon (time interval of 0.15 seconds).
    2.3 Undo
        Click the button [Backspace] to return to the previous state (shortcut Z).
3. Finish the annotation with [Annotate finished] or shortcut E.
4. Save the annotation with [Save] or shortcut S

2. Polygon Modification

1. Modify polygons coordinates
    Drag and drop polygon vertices to modify the shape of the polygon.
    Drag the polygon to adjust its position.
2. Modify polygons category
    Choose the polygon and click [Edit] or double click the polygon, and choose the new category in editing window. 
3. Occlusion modification
    Choose the polygon and click [To top] (shortcut T) or [To bottom] (shortcut B).
4. Delete polygon
    Choose the polygon and click [Delete] to delete the polygon.

3. Visualization

1. Preview annotations
    Click the [Bit map] to preview semantic and instance annotation masks (shortcut space).
    The order of swithing is polygons-semantic-instance.
2. Image window
    Click [Zoom in], [Zoom out], [Fit window] (shortcut F) to adjust the zooming distances.
3. Show / hide polygons
    Click [Visible] to show / hide polygons (shortcut V).
4. Mask aplha (only effective when using SAM)
    Drag the [mask aplha] bar to adjust the mask transparency.

4. Convet annotations

ISAT has a specific format with .json. You can use export it to other formarts.

1. ISAT to VOC
    Convert ISAT jsons to PNG images.
2. ISAT to COCO
    Convert ISAT jsons to COCO json.
3. ISAT to LABELME
    Convert ISAT jsons to LABELME jsons.
4. COCO to ISAT
    Convert COCO json to ISAT jsons.

Star History

Please support us with a star—it's like a virtual coffee! Star History Chart

Contributors

yatengLG Alias-z ...
yatengLG Alias-z ...

Citation

@misc{ISAT with segment anything,
  title={{ISAT with segment anything}: An Interactive Semi-Automatic Annotation Tool Based on Segment Anything},
  url={https://github.com/yatengLG/ISAT_with_segment_anything},
  note={Open source software available from https://github.com/yatengLG/ISAT_with_segment_anything},
  author={yatengLG, Alias-z and horffmanwang},
  year={2023},
}

isat_with_segment_anything's People

Contributors

ala-tay avatar alias-z avatar gh-w5 avatar gtoo8888 avatar horffmanwang avatar yatenglg avatar zs-yang 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  avatar

isat_with_segment_anything's Issues

标注多边形的结果中segment点如何保存为浮点数?

请问进行多边形标注的时候,最后的结果中,segment点都是整数,并不准确,如何修改代码,将其标注的时候,保存为精确的浮点数。

自行修改了polygon.py 代码如下:但是不成功。

-- coding: utf-8 --

@author : LG

from PyQt5 import QtCore, QtWidgets, QtGui
from annotation import Object
import typing

class Vertex(QtWidgets.QGraphicsPathItem):
def init(self, polygon, index, color):
super(Vertex, self).init()
self.polygon = polygon
self.index = index
self.color = color

    self.hover_size = 3
    self.nohover_size = 2
    self.line_width = 0

    self.nohover = QtGui.QPainterPath()
    self.nohover.addEllipse(QtCore.QRectF(-self.nohover_size/2, -self.nohover_size/2, self.nohover_size, self.nohover_size))
    self.hover = QtGui.QPainterPath()
    self.hover.addEllipse(QtCore.QRectF(-self.hover_size/2, -self.hover_size/2, self.hover_size, self.hover_size))

    self.setPath(self.nohover)
    self.setBrush(self.color)
    self.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
    self.setPen(QtGui.QPen(self.color, self.line_width))
    self.setFlag(QtWidgets.QGraphicsItem.ItemIsSelectable, True)
    self.setFlag(QtWidgets.QGraphicsItem.ItemIsMovable, True)
    self.setFlag(QtWidgets.QGraphicsItem.ItemSendsGeometryChanges, True)
    self.setAcceptHoverEvents(True)
    self.setZValue(1e5)

def itemChange(self, change: 'QtWidgets.QGraphicsItem.GraphicsItemChange', value: typing.Any):
    if change == QtWidgets.QGraphicsItem.ItemPositionChange and self.isEnabled():
        # Limit vertex movement within the scene bounds
        if value.x() < 0:
            value.setX(0)
        if value.x() > self.scene().width()-1:
            value.setX(self.scene().width()-1)
        if value.y() < 0:
            value.setY(0)
        if value.y() > self.scene().height()-1:
            value.setY(self.scene().height()-1)

        self.polygon.movePoint(self.index, value)

    return super(Vertex, self).itemChange(change, value)

def hoverEnterEvent(self, event: 'QGraphicsSceneHoverEvent'):
    self.setPath(self.hover)
    super(Vertex, self).hoverEnterEvent(event)

def hoverLeaveEvent(self, event: 'QGraphicsSceneHoverEvent'):
    self.setPath(self.nohover)
    super(Vertex, self).hoverLeaveEvent(event)

class Polygon(QtWidgets.QGraphicsPolygonItem):
def init(self):
super(Polygon, self).init(parent=None)
self.line_width = 0
self.hover_alpha = 150
self.nohover_alpha = 80
self.points = []
self.vertexs = []
self.category = ''
self.group = 0
self.iscrowd = 0
self.note = ''

    self.rxmin, self.rxmax, self.rymin, self.rymax = 0, 0, 0, 0
    self.color = QtGui.QColor('#ff0000')
    self.is_drawing = True

    self.setPen(QtGui.QPen(self.color, self.line_width))
    self.setBrush(QtGui.QBrush(self.color, QtCore.Qt.FDiagPattern))

    self.setAcceptHoverEvents(True)
    self.setFlag(QtWidgets.QGraphicsItem.ItemIsSelectable, True)
    self.setFlag(QtWidgets.QGraphicsItem.ItemIsMovable, True)
    self.setFlag(QtWidgets.QGraphicsItem.ItemSendsGeometryChanges, True)
    self.setZValue(1e5)

def addPoint(self, point):
    self.points.append(point)
    vertex = Vertex(self, len(self.points)-1, self.color)
    # Add the vertex to the scene
    self.scene().addItem(vertex)
    self.vertexs.append(vertex)
    vertex.setPos(point)

def movePoint(self, index, point):
    if not 0 <= index < len(self.points):
        return
    self.points[index] = self.mapFromScene(point)
    self.redraw()
    if self.scene().mainwindow.load_finished and not self.is_drawing:
        self.scene().mainwindow.set_saved_state(False)

def removePoint(self, index):
    if not self.points:
        return
    self.points.pop(index)
    vertex = self.vertexs.pop(index)
    self.scene().removeItem(vertex)
    del vertex
    self.redraw()

def delete(self):
    self.points.clear()
    while self.vertexs:
        vertex = self.vertexs.pop()
        self.scene().removeItem(vertex)
        del vertex

def moveVertex(self, index, point):
    if not 0 <= index < len(self.vertexs):
        return
    vertex = self.vertexs[index]
    vertex.setEnabled(False)
    vertex.setPos(point)
    vertex.setEnabled(True)

def itemChange(self, change: 'QGraphicsItem.GraphicsItemChange', value: typing.Any):
    if change == QtWidgets.QGraphicsItem.ItemSelectedHasChanged and not self.is_drawing:
        # Selection changed
        if self.isSelected():
            color = QtGui.QColor('#00A0FF')
            color.setAlpha(self.hover_alpha)
            self.setBrush(color)
        else:
            self.color.setAlpha(self.nohover_alpha)
            self.setBrush(self.color)
        self.scene().mainwindow.labels_dock_widget.set_selected(self)

    if change == QtWidgets.QGraphicsItem.ItemPositionChange:
        # ItemPositionHasChanged
        bias = value
        l, t, b, r = self.boundingRect().left(), self.boundingRect().top(), self.boundingRect().bottom(), self.boundingRect().right()
        if l + bias.x() < 0: bias.setX(-l)
        if r + bias.x() > self.scene().width(): bias.setX(self.scene().width()-r)
        if t + bias.y() < 0: bias.setY(-t)
        if b + bias.y() > self.scene().height(): bias.setY(self.scene().height()-b)

        for index, point in enumerate(self.points):
            self.moveVertex(index, point+bias)

        if self.scene().mainwindow.load_finished and not self.is_drawing:
            self.scene().mainwindow.set_saved_state(False)

    return super(Polygon, self).itemChange(change, value)

def hoverEnterEvent(self, event: 'QGraphicsSceneHoverEvent'):
    if not self.is_drawing:
        self.color.setAlpha(self.hover_alpha)
        self.setBrush(self.color)
    super(Polygon, self).hoverEnterEvent(event)

def hoverLeaveEvent(self, event: 'QGraphicsSceneHoverEvent'):
    if not self.is_drawing:
        self.color.setAlpha(self.nohover_alpha)
        self.setBrush(self.color)
    super(Polygon, self).hoverLeaveEvent(event)

def mouseDoubleClickEvent(self, event: 'QGraphicsSceneMouseEvent'):
    if event.button() == QtCore.Qt.LeftButton:
        self.scene().mainwindow.category_edit_widget.polygon = self
        self.scene().mainwindow.category_edit_widget.load_cfg()
        self.scene().mainwindow.category_edit_widget.show()

def redraw(self):
    if len(self.points) < 1:
        return
    xs = [p.x() for p in self.points]
    ys = [p.y() for p in self.points]
    self.rxmin, self.rymin, self.rxmax, self.rymax = min(xs), min(ys), max(xs), max(ys)
    self.setPolygon(QtGui.QPolygonF(self.points))

def change_color(self, color):
    self.color = color
    self.color.setAlpha(self.nohover_alpha)
    self.setPen(QtGui.QPen(self.color, self.line_width))
    self.setBrush(self.color)
    for vertex in self.vertexs:
        vertex_color = self.color
        vertex_color.setAlpha(255)
        vertex.setPen(QtGui.QPen(vertex_color, self.line_width))
        vertex.setBrush(vertex_color)

def set_drawed(self, category, group, iscrowd, note, color: QtGui.QColor, layer=None):
    self.is_drawing = False
    self.category = category
    self.group = group
    self.iscrowd = iscrowd
    self.note = note

    self.color = color
    self.color.setAlpha(self.nohover_alpha)
    self.setPen(QtGui.QPen(self.color, self.line_width))
    self.setBrush(self.color)
    if layer is not None:
        self.setZValue(layer)
    for vertex in self.vertexs:
        vertex_color = self.color
        vertex_color.setAlpha(255)
        vertex.setPen(QtGui.QPen(vertex_color, self.line_width))
        vertex.setBrush(vertex_color)
        if layer is not None:
            vertex.setZValue(layer)

def calculate_area(self):
    area = 0
    num_points = len(self.points)
    for i in range(num_points):
        p1 = self.points[i]
        p2 = self.points[(i + 1) % num_points]
        d = p1.x() * p2.y() - p2.x() * p1.y()
        area += d
    return abs(area) / 2

def load_object(self, object):
    segmentation = object.segmentation
    for x, y in segmentation:
        point = QtCore.QPointF(x, y)
        self.addPoint(point)
    color = self.scene().mainwindow.category_color_dict.get(object.category, '#000000')
    self.set_drawed(object.category, object.group, object.iscrowd, object.note, QtGui.QColor(color), object.layer)

def to_object(self):
    if self.is_drawing:
        return None
    segmentation = []
    for point in self.points:
        point = point + self.pos()
        x_str = '{:.20f}'.format(point.x())  # Use the format specifier to display full precision
        y_str = '{:.20f}'.format(point.y())  # Use the format specifier to display full precision
        segmentation.append((x_str, y_str))  # Save as strings with full precision
    xmin = self.boundingRect().x() + self.pos().x()
    ymin = self.boundingRect().y() + self.pos().y()
    xmax = xmin + self.boundingRect().width()
    ymax = ymin + self.boundingRect().height()

    object = Object(self.category, group=self.group, segmentation=segmentation,
                    area=self.calculate_area(), layer=self.zValue(), bbox=(xmin, ymin, xmax, ymax),
                    iscrowd=self.iscrowd, note=self.note)
    return object

The possibility of separation of front and back ends

Since the project has large requirements for GPU and my server cannot use the graphical interface, I hope to separate the business and the graphical interface. Can the separation of the front and back ends be achieved? If so, what constructive comments would you have?Thanks for your open source.

希望用这个工具处理素材

不知道有没有可能加一些功能,比如勾选或者未勾选的图层不显示(擦除掉)然后导出标注的图片/ 原图 ,
(因为有时候需要人物图片,要先把不用的元素啥的P掉,不知道有没有表达清楚)

ToCOCO Bug: potential categories mismatch splitting train / val datasets

The issue

Assuming we have all images and JSON files under a given folder, where we want to split them into train/val dataset for training. The structure may look as the following:

train //
    |__ train_image_1.png
    |_ ... .png
    |_ ... train_COCO.json


val //
    |__ val_image_1.png
    |_ ... .png
    |_ ... val_COCO.json

The categories of train_COCO.json may look like this:
categories": [{"name": "CLASS_A", "id": 0, "supercategory": null}, {"name": "CLASS_B", "id": 1, "supercategory": null}, {"name": "CLASS_C", "id": 2, "supercategory": null}, {"name": "CLASS_D", "id": 3, "supercategory": null}]

While that of val_COCO.json:
"categories": [{"name": "CLASS_A", "id": 0, "supercategory": null}, {"name": "CLASS_C", "id": 1, "supercategory": null}, {"name": "CLASS_B", "id": 2, "supercategory": null}, {"name": "CLASS_D", "id": 3, "supercategory": null}]

Note that CLASS_B id =1 in train, while CLASS_B id=2 in val, which impacts model performance.

Causation

train_image_1.png contains all four classes, while one of the classes was missing in val_image_1.png.

In line 42 of toCOCO.py categories_dict = {} , then categories were gradually added in line 88-89 if cat not in categories_dict: categories_dict[cat] = len(categories_dict). This means the categories' order depends on the first few images. (JSON 文件类别取决于前几张图片包含的类,如果类不全则可能引起最终训练和验证集种类id不匹配)

Potential solutions

  1. allow users to define categories:
    def __init__(self):
        super(TOCOCO, self).__init__()
        self.isat_json_root:str = None
        self.to_path:str = None
        **self.categories_dict =None**
        self.cancel = False
  1. alternatively, fetch the categories_dict from isat.yaml

Results

train_COCO.json
categories": [{"name": "CLASS_A", "id": 0, "supercategory": null}, {"name": "CLASS_B", "id": 1, "supercategory": null}, {"name": "CLASS_C", "id": 2, "supercategory": null}, {"name": "CLASS_D", "id": 3, "supercategory": null}]
val_COCO.json
categories": [{"name": "CLASS_A", "id": 0, "supercategory": null}, {"name": "CLASS_B", "id": 1, "supercategory": null}, {"name": "CLASS_C", "id": 2, "supercategory": null}, {"name": "CLASS_D", "id": 3, "supercategory": null}]

交互建议

作者你好,非常高兴看到有这么好的开源工具,感谢你的辛勤付出。这样的工具极大地减轻了标注的工程量,是我目前见到的最好用的分割标注工具了。但我还是有几点建议想反馈给您,希望能进一步完善:

  1. 在对不同的类别进行标注时,每标注完一个块就需要手动选择标签这样比较麻烦,不够优雅。因为通常逻辑是持续的标注完某个特定类,再标注新的类。因此,可以考虑在标注某类时,预先选定好类别,后面与之同类的标注mask就不用每次再手动选择标签了。
  2. 在按下鼠标左键自动出现mask后,会显示一些不连通的区域。通常这些分离区域都属于同一类,但是在选择了标签后却不能把所有的不连通块作为一类处理,往往只有某一个块被识别生成了掩码,别的同类的块被抛弃了。
  3. 可否考虑利用SAM增加一个一键分割功能,用户再在此基础上做细微的修改即可。

好人一生平安,respect!

在windows下mahotas和numpy包报错,可能是环境问题

软件效果看起来不错,支持!

我用的Windows 10,segment完的结果想转成png保存下来。按README教程操作,但是报了图片中的错误。

76811fe9250c897f65fe5288911d4a0

这个环境的问题能帮忙测试一下,看看怎么解决吗,如果能补到README里面最好,感谢!

LoRA做了finetune的模型

你好,我做了finetune但是没有做prompt训练,当我点击一张图做标注的时候,整张图都标上了mask,是不是finetune阶段要做prompt训练才能支持这种标注

添加多边形时角点大小不随分辨率改变

我传入一张分辨率为7000*4000的图像后,我想通过拖拽mask上的这些点来改变其形状,但是点看上去特别小,必须要放大才能找到这些点并拖拽,有没有办法在显示这些点的时候根据图像分辨率动态调节其大小呢

Can't run under GPU

While running the main.py, there always shows 'CPU' under the window, I tried to reinstall the torch, but it still is under 'CPU' mode. It's running slow in this mode. How could I switch to GPU mode?

大佬可以增加一个SAM的Segment everything的模式吗?

就是SAM的Demo里面的那个一次性把图中所有目标分割出来的功能,分配一个相同的id。这样可以适用于图片上有大量同类目标的情况,不用再一个一个地去点了,只需要手工修正一下结果就好

Support group view?

Hi, I tried to modify the code to visualize polygons belonging to the same group. Yet I am not skillful enough to do so...

If you find this potentially convenient as well, could you please provide a guide to achieve this? Thx!

分割出来的物体,边缘不是那么平滑

有计划再写一个,边缘编辑,局部填充,使得分割出来的物件,更光滑。
类似于ps里面的切割,图层使用那里。吗? (不会写qt,chatgpt生成出来的代码,老失败)
我是这样问的:

用 pyqt实现一个图像编辑界面:实现
1.边缘检测按钮,
2.光滑边缘按钮,
3.鼠标点击检测到的边缘做修改,使其更光滑,
4.鼠标画一条光滑的边缘线按钮,
5.让显示图在边缘线内部保持局部像素一致,实现图像边缘局部修复效果。

还有就是输入, rgba可以优化下。最后合并a通道。

想问一下这个错是为什么 啊

The checkpoint of [Segment anything] not existed.If you want use quick
annotate,please download from https:// github.com/facebookresearch/segment- anything#model-checkpoints

已经安装了segment_anything

关于单通道图片读取问题

大佬,你好!我是一个语义分割的小白,我想请问一下你说的标注单通道图片,在程序中应该用什么读取,我用cv读取不也是三通道的图片吗

无法生成标签

标注之后在图片路径下无法生成标签,后台会报'NoneType' object has no attribute 'shape'错误,想知道怎么解决该问题,谢谢up主,已三联支持。

SAM clone issue

On MacOS, git clone [email protected]:facebookresearch/segment-anything.git may not work as it shows below:
Cloning into 'segment-anything'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Instead, one could run git clone https://github.com/facebookresearch/segment-anything.git

Btw, thanks for your great efforts!

标签格式问题

请问这个工具生成的标签是通用的格式吗?例如coco等的通用格式?

有没有通过框进行标注的功能

在某些领域中,通过点击进行分割无法达到最优效果,通常采用先画框得到初版mask,最后进行点击修正可以得到令人满意的结果,同时节省大量操作,请问有没有通过框进行标注的功能,如果没有后续会加上吗

希望在segment anything结果的基础上进行更灵活的修改,不知有没有可以做到的方法或者工具?

感谢大佬提供了这么好用的工具!但使用过程中还是有一些别的需求,冒昧来问问。

现阶段只能拖拽多边形的顶点进行调整(应该没弄错吧?),我希望在当前分割结果的基础上更多操作,比如:

  1. 选中多边形的若干个点,并删除他们(有时划分太细致了,某个局部不希望划分那么细,但是很难直接得到理想结果)。
  2. 在多边形内部划线,将一个多边形分成两部分(有时segmenent anything可以取出整体,但无法分割得到整体的几个部分,所以希望在借助segment anything提取出整体后,进一步手动划分)。

有没有办法实现(特别是2)呢?或者有没有其他工具可以做到?

GPU识别不到

我用的是RTX3060(12G),每次运行项目都显示是cpu。是否是pytroch版本太低的缘故?

生成标签时候的问题

pCnTMkD.png
图1:原始图像
pCnTn0K.png
图2:segment_anaything分割后的效果,可以看到可以检测到小物块
pCnTuTO.png
图3:生成标签以后,成了整体的一块标签,忽略了小物块

使用segment_anything分割时候是正常的,但是在生成标签以后出现了问题,对于我中间镂空的小物块,标签把他忽略掉了,可以看一下我提供的图片。
之前使用EISeg进行标注时候,也出现过这个问题,这是那个标注软件的地址:
https://github.com/PaddlePaddle/PaddleSeg/tree/release/2.6/EISeg
我判断是生成的图片将生成的轮廓标签化的那个过程中,由于是中间镂空的,所以就被忽略掉了
可以告诉我源码的地址在哪里,我可以自己尝试修复一下

不使用终端命令,直接点击main.py运行时候报错

qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Support SAM in HQ

Hi, the model checkpoints of segment anything in high quality just released. It could be nice to implement that?

SAM-HQ

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.