LabelMe

标注数据集
https://github.com/wkentaro/labelme

笔者:macox
终端代码安装:

brew install qt qt4 || brew install pyqt # qt4 is deprecated(显示报错找不到qt4就直接pyqt4)
pip install labelme

Run** labelme –help **for detail.

几种报错:

1、第一种

from matplotlib.backends import _macosx
RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.

解决方法:
vim ~/.matplotlib/matplotlibrc
然后输入以下内容:
backend: TkAgg
注:
$ vi myfile
进入vi之后,是处于「命令行模式」,您要切换到「插入模式」才能够输入文字
i: 「命令行模式」→「插入模式」
ESC: 「插入模式」→「命令行模式」

2)退出 在「命令行模式」下,按一下「:」冒号键进入「Last line mode」,例如
w filename (输入 「w filename」将文章以指定的文件名filename保存)
wq (输入「wq」,存盘并退出vi)
q! (输入q!, 不存盘强制退出vi)

2、第二种


Traceback (most recent call last):
File "/usr/local/bin/labelme", line 7, in <module>
from labelme.app import main
File "/Library/Python/2.7/site-packages/labelme/app.py", line 37, in <module>
from PyQt4.QtGui import *
ImportError: No module named PyQt4.QtGui

解决方法:
**brew uninstall PyQt5
labelme –help**
报错:ImportError: cannot import name QtCore
* brew install PyQt5 *

如果上面的这个方法后还不行就将下面的代码加入~/.bash_profile中:
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH

3、成功

Run** labelme –help **for detail.

Bad key "ckend" on line 1 in
/Users/muaxiu/.matplotlib/matplotlibrc.
You probably need to get an updated matplotlibrc file from
http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
or from the matplotlib source distribution
usage: labelme [-h] [-O OUTPUT] [filename]positional arguments:
filename image or label filenameoptional arguments:
-h, --help show this help message and exit
-O OUTPUT, --output OUTPUT
output label name

操作:

打开labelme可视化窗口
labelme # Open GUI
用labelme打开指定文件
labelme static/apc2016_obj3.jpg # Specify file
用labelme打开指定文件退出后保存为XX.json文件
labelme static/apc2016_obj3.jpg -O static/apc2016_obj3.json # Close window after the save

快速查看json文件,可以使用实用程序脚本:
labelme_draw_json static/apc2016_obj3.json
**Convert to Dataset
To convert the json to set of image and label, you can run following:**
labelme_json_to_dataset static/apc2016_obj3.json
即可得到一个文件夹,有四个文件,*.png,info.yaml,label.png, label_viz.png。
其中label.png即是我们要的label_data.
看起来是全黑的,然而读到像素中,是可以看到对相同类别的文件进行标注了。

笔者还安装了labelImg,综合考量选择了Labelme,以下是LabelImg的安装过程

LabelImg

原作者github:https://github.com/tzutalin/labelImg#macos
安装参考:http://blog.csdn.net/roguesir/article/details/73647695
macOS

Python 2 + Qt4

brew install qt qt4
brew install libxml2
make qt4py2
python labelImg.py
python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]

笔者电脑/装载软件:
Mac os
python2.7.13

1.通过Homebrew安装pyqt

brew install cartr/qt4/pyqt

配置环境变量
whichpython/usr/bin/python w h i c h p y t h o n / u s r / b i n / p y t h o n which python /usr/bin/python which brew
/usr/local/bin/brew
PyQt4是通过brew安装的,明显这两个路径不一致,导致问题,解决如下:
cd/usr/local/lib/python2.7/site−packages c d / u s r / l o c a l / l i b / p y t h o n 2.7 / s i t e − p a c k a g e s cd /usr/local/lib/python2.7/site-packages ls
open /.bashprofile将下面的代码加入~/.bashprofile中:exportPYTHONPATH=/usr/local/lib/python2.7/site−packages: o p e n / . b a s h p r o f i l e 将 下 面 的 代 码 加 入 ~ / . b a s h p r o f i l e 中 : e x p o r t P Y T H O N P A T H = / u s r / l o c a l / l i b / p y t h o n 2.7 / s i t e − p a c k a g e s : open ~/.bash_profile 将下面的代码加入~/.bash_profile中: export PYTHONPATH=/usr/local/lib/python2.7/site-packages:PYTHONPATH
然后关闭terminal,重新开启,进入python中import:

这样,PyQt4就装好了。

2.安装lxml

sudo pip install lxml

3.安装labelImg

sudo pip install labelImg
文件夹内:shift+command+G
前往/usr/local/bin/labelImg
打开labelImg

4.遇到的问题

from PyQt4.QtGui import *
ImportError: No module named PyQt4.QtGui

cd /usr/local/lib/python2.7/site-packages
ls
既有PyQt4也有PyQt5
pip uninstall 所有刚刚装的重新装一遍
**解决:**Pyqt5并不兼容pyqt4,我觉得你需要把pyqt5改成pyqt4,brew uninstall qt5,先把pyqt5卸掉,然后在装pyqt4试试

5.使用步骤

1.利用上述方式,创建启动。
2.击菜单上Change default saved annotation folder
3.点击’Open Dir’
4.点击 ‘Create RectBox’
5.点击左键,选择一个区域来用矩形框注释
6.用右键,拖拽矩形框,复制或移动

这个注释将被存储到你指定的文件夹。

Ctrl + u:Load all of the images from a directory
Ctrl + r:Change the default annotation target dir
Ctrl + s:Save
Ctrl + d:Copy the current label and rect box
Space:Flag the current image as verified
w:Create a rect box
d:Next image
a:Previous image
del:Delete the selected rect box
Ctrl++:Zoom in
Ctrl–:Zoom out
↑→↓←:Keyboard arrows to move selected rect box

⇒ python
Python 2.7.10 (default, Feb 7 2017, 00:08:15)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.

from PyQt4 import QtCore, QtGui ,QtNetwork
quit()

Labelme、LabelImg的安装和使用相关推荐

  1. 深度学习半自动标注_图像识别中标注工具labelImg的安装和使用——深度学习打标签...

    1.下载 labelImg的github地址 : https://github.com/tzutalin/labelImg 由于国外的网站下载太慢,我将所有工程迁移到码云,我迁移到码云地址:https ...

  2. 图像标注工具labelimg的安装和使用教程

    图像标注工具labelimg的安装和使用教程 一.安装labelimg (1)首先通过Win+R快捷打开windows的"运行"对话框,在对话框中输入cmd进行终端界面. (2)在 ...

  3. Mac下图像标注工具labelImg的安装

    目标检测时需要对训练数据进行标注,标注工具为labelImg,其在Mac下的安装教程如下: # Install PyQt4, it must be this version brew install ...

  4. 使用tensorflow object detection API 训练自己的目标检测模型 (二)labelImg的安装配置过程

    上一篇博客介绍了goggle的tensorflow object detection API 的配置和使用, 这次介绍一下如何用这个API训练一个私人定制的目标检测模型. 第一步:准备自己的数据集.比 ...

  5. anaconda、labelme标注软件安装和使用

    anconda安装 https://blog.csdn.net/qq_38451119/article/details/83036495 注意: 安装过程中遇到下面这一步: 勾选第一项,后续步骤直接一 ...

  6. labelimg win10安装教程

    win10+python3.5安装labelimg 照网上安装的方法在我的电脑上有一些小bug,所以我将我遇到的问题整理出来,方便和我有相同问题的人... 一.下载labelimg GitHub搜索l ...

  7. 图片标注工具LabelImg下载安装使用教程

    链接:https://blog.csdn.net/jesse_mx/article/details/53606897       labelimg软件是一款免费的图像标注工具,可方便创建自己的数据集, ...

  8. 图片标注工具LabelImg的安装及使用方法

    项目地址:LabelImg  下载地址:Windows/Linux  百度云备份:最近几个版本 密码: cnn6 前言 我们知道,图片标注主要是用来创建自己的数据集,方便进行深度学习训练.本篇博客将推 ...

  9. labelImg和labelme的区别、安装和基本使用

    文章目录 labelImg和labelme的区别 labelImg labelme 区别 CV的四大基本任务 labelImg的安装和使用 labelImg的安装--Win10 labelImg的使用 ...

最新文章

  1. Oracle中的substr()函数 详解及应用
  2. HTML 事件属性_03
  3. c语言鼠标下棋,c语言写的鼠标操作的五子棋游戏,欢迎观赏!
  4. highCharts文档与演示效果的使用 - 文档(应用型)解读
  5. 云之讯 亿美 短信的三方接口
  6. FWT快速沃尔什变换
  7. ubuntu 卸载NetworkManager
  8. (转)基于FPGA技术的FAST行情解码研究
  9. 【单目标优化求解】基于matlab海洋捕食者算法(MPA)求解单目标问题【含Matlab源码 478期】
  10. 破产姐妹第六季/全集2 Broke Girls迅雷下载
  11. 金融数据挖掘与分析(三)-案例实战(1)
  12. 爱乐活改版未断根,改版后不伦不类
  13. Linux查看gzip文件原始大小,Linux 文件管理:Linux gzip 压缩
  14. 中科大入学考试(数学)
  15. 高等数学拾遗 矢量分析
  16. 该文件包与具有同一名称的现有文件包存在冲突
  17. 【手写汉字识别】基于深度学习的脱机手写汉字识别技术研究
  18. java linest_Java运行环境搭建的图文教程
  19. 预测混合模式发展前景计算机,基于混合模式的网络流量分类优化-计算机技术专业论文.docx...
  20. SpringBoot + Servlet + Mybatis+ layui 学生选课管理系统

热门文章

  1. 商业即生活,一些思考和感悟
  2. opencv实现人脸识别(四) 人脸识别模块
  3. 自助入住,智慧酒店必备——刷脸支付系统
  4. 中等计算机的配置,一份中等计算机配转置帐单
  5. matlab2017中工具箱,【2017年整理】matlab工具箱介绍.ppt
  6. 如何在El Capitan中重新安装OS X的默认应用
  7. 协同过滤与隐语义模型推荐系统实例3: 基于矩阵分解(SVD)的推荐
  8. 54节---------6月1日
  9. Android异常篇 Gradle项目同步失败,需要修复项目。同时app图标有红叉,无法正常运行
  10. 目标检测算法回顾之发展概览