alex_bn_lee

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

【587】安装 labelme

  目前在做计算机视觉,需要自己打标,被安利 labelme,但是目前此网站以及不支持注册了,只能本地安装来实现。可以按照网站说明一步步操作。

  • 按照 https://github.com/wkentaro/labelme 操作完成的

  • 不同操作系统按照不同的方式安装,本文是 MacOS

  • 需要安装 Anaconda、Docker,前者比较容易,后者也还好

  • 下载 Docker Desktop,按照基本流程处理即可,然后运行下面代码,在 Terminal 里面运行即可

  • 1
    2
    3
    # on macOS
    socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\" &
    docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=docker.for.mac.host.internal:0 -v $(pwd):/root/workdir wkentaro/labelme
  • 然后安装 pyqt,用来实现图形界面效果的,可以参考:mac install PyQt5,通过以下实现

  • 1
    2
    3
    # brew 实现挺乱的
    pip3 install sip
    pip3 install pyqt5
  • 最后在安装 labelme 即可,如下所示:

  • 1
    pip install labelme

     

  使用方法:

  • Run labelme --help for detail.

  • The annotations are saved as a JSON file.

  • 直接定位到图片所在文件夹,然后通过下面代码即可打开窗体操作

  • 1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    labelme  # just open gui
     
    # tutorial (single image example)
    cd examples/tutorial
    labelme apc2016_obj3.jpg  # specify image file
    labelme apc2016_obj3.jpg -O apc2016_obj3.json  # close window after the save
    labelme apc2016_obj3.jpg --nodata  # not include image data but relative image path in JSON file
    labelme apc2016_obj3.jpg \
      --labels highland_6539_self_stick_notes,mead_index_cards,kong_air_dog_squeakair_tennis_ball  # specify label list
     
    # semantic segmentation example
    cd examples/semantic_segmentation
    labelme data_annotated/  # Open directory to annotate all images in it
    labelme data_annotated/ --labels labels.txt  # specify label list with a file

     

  其他相关链接及操作见 GitHub 链接。

posted on   McDelfino  阅读(378)  评论(0编辑  收藏  举报

编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2019-07-02 【423】COMP9024 Revision
2019-07-02 【422】Insert often-used pieces of text in gedit
点击右上角即可分享
微信分享提示