将自己的图片做成cityscape格式(自用)

1.电脑下labelme(c:\users\yeye\anaconda3\envs\labelme\lib\site-packages\labelme)
2.anaconda下载labelme和pip install opencv-python( c:\users\yeye\anaconda3\lib\site-packages (from opencv-python) (1.18.5))
3.anaconda下载
将自己的图片做成cityscape格式(自用)_第1张图片

https://blog.csdn.net/s534435877/article/details/106937561
https://blog.csdn.net/fjssharpsword/article/details/102718302?ops_request_misc=%25257B%252522request%25255Fid%252522%25253A%252522161190417716780262549643%252522%25252C%252522scm%252522%25253A%25252220140713.130102334.pc%25255Fall.%252522%25257D&request_id=161190417716780262549643&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allfirst_rank_v2~rank_v29-6-102718302.pc_search_result_hbase_insert&utm_term=%25E5%2588%2586%25E5%2589%25B2%25E8%25AE%25AD%25E7%25BB%2583Cityscapes
https://blog.csdn.net/wang27623056/article/details/106884385?ops_request_misc=%25257B%252522request%25255Fid%252522%25253A%252522161190417716780262549643%252522%25252C%252522scm%252522%25253A%25252220140713.130102334.pc%25255Fall.%252522%25257D&request_id=161190417716780262549643&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allfirst_rank_v2~rank_v29-1-106884385.pc_search_result_hbase_insert&utm_term=%25E5%2588%2586%25E5%2589%25B2%25E8%25AE%25AD%25E7%25BB%2583Cityscapes
https://blog.csdn.net/qq_34798152/article/details/108692987
https://blog.csdn.net/avideointerfaces/article/details/104139298
https://blog.csdn.net/qq_38855907/article/details/106377913
https://blog.csdn.net/chenzhoujian_/article/details/106874950
https://blog.csdn.net/wang27623056/article/details/106631196
https://blog.csdn.net/weixin_45609455/article/details/106334688?utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-5.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-5.control
https://blog.csdn.net/weixin_44049693/article/details/111694142
https://blog.csdn.net/weixin_44791964/article/details/103117365
https://blog.csdn.net/fengxin1995/article/details/80511227?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-15.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-15.control
https://github.com/mcordts/cityscapesScripts
https://github.com/caozhiwei1994/labelme2dataset/blob/main/labelme2coco_cityscape/labelme2coco.py
https://blog.csdn.net/qq_38855907/article/details/105922546?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522161269571416780299068079%2522%252C%2522scm%2522%253A%252220140713.130102334…%2522%257D&request_id=161269571416780299068079&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allbaidu_landing_v2~default-2-105922546.pc_search_result_hbase_insert&utm_term=%E5%88%B6%E4%BD%9Ccityscape&spm=1018.2226.3001.4187
https://blog.csdn.net/u014453898/article/details/93380037?ops_request_misc=&request_id=&biz_id=102&utm_term=cityscape%2520label&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-1-93380037.pc_search_result_hbase_insert
https://blog.csdn.net/nominior/article/details/104905656?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522161269666916780262550402%2522%252C%2522scm%2522%253A%252220140713.130102334…%2522%257D&request_id=161269666916780262550402&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allbaidu_landing_v2~default-1-104905656.pc_search_result_hbase_insert&utm_term=gtfine&spm=1018.2226.3001.4187
https://blog.csdn.net/j_starry/article/details/103764911
https://blog.csdn.net/qq_39197555/article/details/112155822?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-12.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-12.control

1.labelme分割图片
2.将json转label

主要参考
https://blog.csdn.net/s534435877/article/details/104353804
https://blog.csdn.net/weixin_45609455/article/details/106334688?utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-5.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-5.control
https://blog.csdn.net/weixin_44049693/article/details/111694142

问题
ModuleNotFoundError: No module named ‘labelme’
解决
pip install labelme==3.20.0
将自己的图片做成cityscape格式(自用)_第2张图片

问题
module ‘labelme.utils’ has no attribute ‘draw_label’
参考
https://blog.csdn.net/qq_43571311/article/details/108490909
解决
因为labelme版本问题 少draw_label这个模块
(我的地址C:\Users\YEYE\anaconda3\Lib\site-packages\labelme\utils )

停!
换版本了!
labelme 4.2.9

位置C:\Users\YEYE\anaconda3\Lib\site-packages\labelme\cli\json_to_dataset.py
C:\Users\YEYE\anaconda3\Lib\site-packages\imgviz\label.py

问题
label_name_to_value = {‘road’: 1, ‘sidewalk’: 2, ‘building’: 3, ‘wall’: 4, ‘fence’: 5, ‘pole’: 6, ‘traffic light’: 7, ‘traffic sign’: 8, ‘vegetation’: 9, ‘terrain’:10, ‘sky’:11, ‘person’:12, ‘rider’:13, ‘car’:14, ‘truck’:15, ‘bus’:16, ‘train’:17, ‘motorcycle’:18, ‘bicycle’:19}
报错
File “c:\users\yeye\anaconda3\lib\site-packages\labelme\cli\json_to_dataset.py”, line 73, in main
f.write(lbl_name + ‘\n’)
TypeError: unsupported operand type(s) for +: ‘NoneType’ and ‘str’
就是label_names.txt里面是空的

修改
label_name_to_value = {‘background’: 0, ‘building’: 1, ‘fence’: 2, ‘pole’: 3, ‘vegetation’: 4, ‘person’: 5, ‘ground’: 6}

为什么 是必须要有’background’: 0吗????????

将自己的图片做成cityscape格式(自用)_第3张图片
变成gtFine标签图像

存储位置
将自己的图片做成cityscape格式(自用)_第4张图片

你可能感兴趣的:(将自己的图片做成cityscape格式(自用))