当前位置:网站首页>"Hardcore" labelme shows the label in the picture
"Hardcore" labelme shows the label in the picture
2022-07-29 18:06:00 【ViatorSun】

This is a niche blog that most friends may not be able to use, but it is definitely a good medicine for those who need it!Hope it will be useful to those in need!
Although labelme is mainly used for data labeling, when the labelled data set is checked, checks whether the label corresponding to the label box is correct. This work is not commonly used, but it is not used when it is used.It is very inconvenient. Each picture needs to be clicked one by one, and then check whether the corresponding label is correct, which is very time-consuming and labor-intensive.
Here, on the basis of labelme, bloggers display the corresponding labels together, which makes it no longer necessary to click to view them one by one, but to scan them directly, which is very convenient and can be increased by at least 10 times.
Modified code to upload to viatorsun.blog.csdn.net
Just in case, it is recommended that friends only include app.py and widgets/canvas.py , widgets/label_dialog.py file replacement, not recommended to replace __main__.py
A total of two files need to be modified. The specific operations are as follows:
1, app.py
In the def loadFile(self, filename=None): function, add the following two lines of code at about 1533 lines of code
2, widgets/canvas.py
The script imports several packages of PyQt5from PyQt5.QtGui import QPainter,QFont,QColor, in def __init__(self, *args, **kwargs):Add the attribute self._shapes = [] to record the annotation information, and finally add the following information in def paintEvent(self, event):
3. Display of newly added annotations

4. Modify the size of the Edit label dialog box
In the widgets/label_dialog.py file, add the following statement after line 48 [super(LabelDialog, self).__init__(parent)], and friends can modify the width according to their own conditionsHigh ratio
from qtpy.QtCore import QSizeself.resize(QSize(300, 500))This is it
Q&A
The project is relatively simple, there may be hidden bugs, please forgive me!!!
- Tags are not displayed in real time: they are displayed only when the corresponding data is read for the first time when the file is opened.The current target data needs to be saved in a JSON file before it can be displayed, which can be displayed through the [Next Image/Prev Image] operation
- According to the above operation, there may be cases where the displayed label will be covered by the callout box. Here, you can move the drawn code to the front of
p.end(), so that the correspondingLabel on top shows
- Because the images of the dataset are different, the color of the paint brush may not have strong contrast, so if there is a small partner whose label is not particularly obvious, you can modify the color of the paint brush by yourself
p.setFont(QColor( , , ))just
边栏推荐
- 【南瓜书ML】(task5)支持向量机的数学推导(更新ing)
- 城堡跑酷js小游戏源码
- Review | Tech Talk activities based on Amazon KVS create intelligent visual products
- 阅读顺序
- HMS Core Discovery第16期回顾|与虎墩一起,玩转AI新“声”态
- leetcode136 -- 只出现一次的数字
- Frame双向通信插件FrameDataTrans
- 【 Leetcode 】 200. The number of islands (medium)
- IDEA远程调试
- HMS Core音频编辑服务音源分离与空间音频渲染,助力快速进入3D音频的世界
猜你喜欢

query词权重, 搜索词权重计算

鸡兔同笼

阶乘因式分解

贪心(1)区间完全覆盖问题

InstallAnywhere 2022

js模拟白云慢慢出现js特效

浅析无人机发展趋势以及如何实现EasyDSS+无人机视频推流?

Nuggets quantification: Obtain data through the history method, and use the same proportional weighting factor as Sina Finance and Snowball.different from a flush

The two armies clash

4G无线模块 电力通信模块
随机推荐
传统渲染农场和云渲染农场选择哪个好?
leetcode53 -- 最大数组和
【 Leetcode 】 200. The number of islands (medium)
阅读顺序
Greedy (1) interval complete coverage problem
地球超2亿蛋白质结构全预测,AlphaFold引爆「蛋白质全宇宙」
unity-shader-游戏渲染效果逆向分析
Review | Tech Talk activities based on Amazon KVS create intelligent visual products
Tech Talk 活动回顾|基于 Amazon KVS 打造智能视觉产品
large number factorial calculation
掘金量化:通过history方法获取数据,和新浪财经,雪球同用等比复权因子。不同于同花顺
递归法解决N皇后问题
Pocket money
Recall i2i
解析正则表达式(一)
Interviewer: How does MySQL tune SQL statements based on execution plans?
Lanzhou Mencius Lightweight Pre-training Model Technical Practice
Frame双向通信插件FrameDataTrans
Database Project 01 Documentation: Database Skills Needed for Software Testing
CRM如何帮助企业营销获客