当前位置:网站首页>Target detection - make your own deep learning target detection data set with labelimg
Target detection - make your own deep learning target detection data set with labelimg
2022-07-02 15:46:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
Catalog
3.2 Some settings before annotation
1 labelimg Introduce
Labelimg It's an open source data Dimensioning tools , Three formats can be marked .
1 VOC Label format , Save as xml file .
2 yolo Label format , Save as txt file .
3 createML Label format , Save as json Format .
2 labelimg Installation
This is mainly about window Installation in the system , Start by opening cmd Command line ( Shortcut key :win+R). Get into cmd Command line console . Enter the following command :
pip install labelimg -i https://pypi.tuna.tsinghua.edu.cn/simple
After running the above command , The system will automatically download labelimg Dependent dependency . Because this is a very lightweight tool , So it downloads quickly , When the in the following red box tells us that the installation is successful , explain labelimg Installation is successful .
3 Use labelimg
3.1 Data preparation
First of all, we need to prepare the data set that we need to mark . Here I suggest to create a new one named VOC2007 Folder ( This is a convention , It's OK not to do so ), Create a new one called JPEGImages The folder of is used to store the image files that we need to label ; Create another one called Annotations Store labeled label files ; Finally, create a file named predefined_classes.txt Of txt File to store the category name to be marked .
VOC2007 The directory structure of is :
├── VOC2007 │├── JPEGImages Store image files that need to be labeled │├── Annotations Store labeled label files │├── predefined_classes.txt Define all categories you want to label ( This document is optional , But when we define more categories , It's best to have this to create such a txt File to store categories )
3.2 Some settings before annotation
First, in the JPEGImages This folder places the pictures to be marked , Here are three kinds of pictures , They are people 、 Dogs and cats .
And then again predefined_classes.txt This txt Enter the defined category in the document ; As shown in the figure below .
open cmd Command terminal ( Shortcut key :win+R). Enter the newly created VOC2007 route ( This is very important , It involves whether we can use predefined_classes.txt This txt Categories defined in the document , I've been stuck here for a long time , Once thought it couldn't show txt The category defined in the file is that I have problems installing ). Execute the command shown in the figure to enter VOC2007 Under the path ( Everyone's path is different , Write according to your personal path ) As shown in the figure below : You can see that you have entered the corresponding directory .
Enter the following command to open labelimg. This command means to open labelimg Tools ; open JPEGImage Folder , initialization predefined_classes.txt The classes defined inside .
labelimg JPEGImages predefined_classes.txt
Running the above command will open the tool ; as follows .
The buttons we commonly use in the figure are introduced below .
The path folder of the picture data to be marked , When you enter the command here, you select JPEGImages.( Of course, this can be changed )
The path folder where the category label is saved , Here we have chosen Annotations Folder .
This button can indicate that the label we marked is voc Format , Click to change to yolo perhaps createML Format .
Click on View, The options in the red box as shown in the figure... Will appear . You'd better tick it like me .
Auto Save mode: When switching to the next picture , The label is automatically saved .
Display Labels: The callout box and label... Are displayed
Advanced Mode: The marked cross will remain suspended in the window .
Common shortcut keys are as follows :
A: Switch to the previous picture
D: Switch to the next picture
W: Call up the marked cross
del : Delete dimension frame
Ctrl+u: Select the annotated picture folder
Ctrl+r: Select the marked label The folder where the tag exists
3.3 Start tagging
Because the cross we set for annotation is always on the annotation interface , This does not require us to press the shortcut key w, Then select the object we need to label . Hold down the left mouse button and drag it out of the box . As shown in the figure below , When we choose our goal , It will be loaded predefined_classes.txt Define all categories you want to label ( If there are many categories , It's really convenient , You don't need to type the name of each category by yourself ). The category of the frame will be on the labeled frame ( The picture is not very clear due to color , Look carefully and you will find ). Then the typed category label will appear on the far right of the interface . After typing a picture , Shortcut key D, Will enter the next , At this time, the label file will be automatically saved (voc Format will be saved xml,yolo Will save txt Format ).
After the label is typed, you can go to Annotations Under the file, you can see that the tag file has been saved in this directory .
Since then labelimg The use explanation is over .
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/147722.html Link to the original text :https://javaforall.cn
边栏推荐
- floyed「建议收藏」
- PTA 天梯赛习题集 L2-001 城市间紧急救援
- 2279. Maximum number of backpacks filled with stones
- [leetcode] 1020 number of enclaves
- 【LeetCode】876-链表的中间结点
- 【LeetCode】344-反转字符串
- 高考录取分数线爬虫
- Astra: could not open "2bc5/ [email protected] /6“: Failed to set USB interface
- Strings and arrays
- Cultural scores of summer college entrance examination
猜你喜欢
动态规划入门二(5.647.62)
【LeetCode】1162-地图分析
Loss function and positive and negative sample allocation: Yolo series
Leetcode skimming -- count the number of numbers with different numbers 357 medium
PostgresSQL 流复制 主备切换 主库无读写宕机场景
XPT2046 四线电阻式触摸屏
【LeetCode】1905-统计子岛屿
Leetcode skimming -- incremental ternary subsequence 334 medium
Redux - detailed explanation
How to intercept the value of a key from the JSON string returned by wechat?
随机推荐
XPT2046 四线电阻式触摸屏
College entrance examination score line climbing
Finally, I understand the event loop, synchronous / asynchronous, micro task / macro task, and operation mechanism in JS (with test questions attached)
[leetcode] 977 square of ordered array
【Salesforce】如何确认你的Salesforce版本?
【LeetCode】189-轮转数组
matlab中wavedec2,说说wavedec2函数[通俗易懂]
彻底弄懂浏览器强缓存和协商缓存
For the problem that Folium map cannot be displayed, the temporary solution is as follows
[salesforce] how to confirm your salesforce version?
Leetcode skimming -- verifying the preorder serialization of binary tree # 331 # medium
Demo of converting point cloud coordinates to world coordinates
二叉树前,中,后序遍历
Some problems about pytorch extension
6095. Strong password checker II
PTA ladder game exercise set l2-001 inter city emergency rescue
Fiddler实现手机抓包——入门
2303. 计算应缴税款总额
蚂蚁集团大规模图计算系统TuGraph通过国家级评测
Thoroughly understand browser strong cache and negotiation cache