当前位置:网站首页>"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
边栏推荐
- Nuggets quantification: Obtain data through the history method, and use the same proportional weighting factor as Sina Finance and Snowball.different from a flush
- 剑指offer专项突击版第14天
- reading order
- Chapter 7 XGBoost
- [Network] LAN technology MSTP
- 数据库项目01文档:软件测试需要的数据库技能
- Tech Talk 活动回顾|基于 Amazon KVS 打造智能视觉产品
- 4G无线模块 电力通信模块
- TensorFlow Serving 高性能的机器学习模型服务系统
- Swagger
猜你喜欢

Interviewer: How does MySQL tune SQL statements based on execution plans?

Quantitative Finance

pycaret在钻石数据集上的使用 - 回归问题

hihoCoder #1143 : 骨牌覆盖问题·一

不堆概念、换个角度聊多线程并发编程

RocketQA: across batches negative sampling (cross - batch negatives), the denoising of strong negative cases of sampling (denoised hard negative from) and data to enhance (data augment

多智能体协同控制研究中光学动作捕捉与UWB定位技术比较

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

The two armies clash

商城商品的知识图谱构建
随机推荐
【高并发】我用多线程进一步优化了亿级流量电商业务下的海量数据校对系统,性能再次提升了200%!!(全程干货,建议收藏)
「硬核」labelme 图片中显示标签
一键搭建博客:如何使用WordPress插件搭建专属博客
HMS Core音频编辑服务音源分离与空间音频渲染,助力快速进入3D音频的世界
解析正则表达式(一)
Flutter dynamic | Fair server new version features
leetcode136 -- 只出现一次的数字
字典树(Trie)
地球超2亿蛋白质结构全预测,AlphaFold引爆「蛋白质全宇宙」
LinkedList 5-141. 环形链表
starlight.js几何图形背景js特效插件
Knowledge Graph Construction of Mall Commodities
tutorial/detailed_workflow.ipynb 量化金融Qlib库
[Network] Routing Routing Policy
Pocket money
固件、驱动、软件的区别
接口内容01文档:postman学习路线
【高并发】我用多线程优化了亿级流量电商业务下的海量数据校对系统,性能直接提升了200%!!(全程干货,建议收藏)
抗HER2/neu受体拟肽修饰的紫杉醇自蛋白纳米粒/环境敏感型多糖纳米粒的制备,
The two armies clash