ming71 / toolbox Goto Github PK
View Code? Open in Web Editor NEWvarious cv tools, such as label tools, data augmentation, label conversion, etc.
various cv tools, such as label tools, data augmentation, label conversion, etc.
'''
/toolbox/converter/toDOTA/HRSC2016/prepare_hrsc2016.py
File "/content/toolbox/converter/toDOTA/HRSC2016/HRSC2DOTA.py", line 10, in
from dota_poly2rbox import rbox2poly_single
ModuleNotFoundError: No module named 'dota_poly2rbox'
'''
Why "dota_poly2rbox" file is missing?
ModuleNotFoundError: No module named 'dota_utils'
voc2coco.py
line 288:
PascalVOC2coco(xml_file, 'train.json')
should be
PascalVOC2coco(xml_files, 'train.json')
缺乏命名:
E:\Anaconda\python.exe "G:/CV projects/toolbox/converter/toCOCO/HRSC2COCO.py"
HRSC2COCOTrain: 0%| | 0/436 [00:00<?, ?it/s]
Traceback (most recent call last):
File "G:/CV projects/toolbox/converter/toCOCO/HRSC2COCO.py", line 183, in
HRSC2COCOTrain(r'C:\Users\admin\Downloads\HRSC2016_dataset\HRSC2016\HRSC2016',
File "G:/CV projects/toolbox/converter/toCOCO/HRSC2COCO.py", line 66, in HRSC2COCOTrain
objects = parse_voc_poly(os.path.join(labelparent, filename+'.xml'))
File "G:/CV projects/toolbox/converter/toCOCO/HRSC2COCO.py", line 159, in parse_voc_poly
gtpoly = shgeo.Polygon(object_struct['poly'])
NameError: name 'shgeo' is not defined
Process finished with exit code 1
could I ask you a question about bordervalue why not this value is set to imageNet mean value like [123.675, 116.28, 103.53]
thanks your reply
what is the format of your label file? is it yolo text file?
eg: 0 0.717448 0.654630 0.168229 0.244444
but what is boxes_a = labels[:,5] in class Copy paste?
there is no fifth element in text file. or which format are you using?
thank u for your code,it helps a lot!
but the image format in HRSC2016 dataset is '.bmp',
in toolbox/tree/master/converter/toDOTA/HRSC2016)/prepare_hrsc2016.py line 35 and line 36,
src_im = osp.join(data_dir + '/FullDataSet/AllImages', trf.strip() + '.jpg')
dst_im = osp.join(train_dir + '/images', trf.strip() + '.jpg')
this will result in an error.
after I replace .jpg with .bmp,it works!
in voc2coco.py, it has this:
obj_path = glob.glob(os.path.join(path, 'SegmentationObject', '*.png'))
however, in general, making voc-style dataset will form 3 dirs:
Annotations、ImageSets、JPEGImages
it has not SegmentationObject(we all knows official voc dataset has SegmentationObject and SegmentationClass)
how can i solve this problem? thank you very much!
@ming71
I am using your this toolbox to augment my DOTA type custom dataset. The environment is all set on windows 10 server with anaconda environment.
After running the code I am getting the following error. As DOTA has 10 values in annotation file "x1 y1 x2 y2 x3 y3 x4 y4 class category"
The error is in the function below, as we have 10 values 0-9 in the array I also did change the reshape(5, 2) but again error.
def bbox_area(bbox):
bbox = np.asarray(bbox)
bbox = np.array(bbox).reshape(4, 2)
poly = Polygon(bbox).convex_hull
return poly.area
Can you please guide me through what is going wrong here? @Captain1986
File "D:/project/mydesign/Rotated_Object/HRSC2016_dataset/HRSC2016_COCO/tool/HRSC2COCO.py", line 167, in parse_voc_poly
object_struct['long-axis'] = max(distance(poly[0], poly[1]), distance(poly[1], poly[2]))
NameError: name 'distance' is not defined
作者您好,再次打扰了!关于你的https://github.com/kongyan66/toolbox/blob/master/converter/toCOCO/HRSC2COCO.py
这个脚本测试成功,但我发现生成.json文件不包含角度信息,不适配旋转检测器训练,我尝试加入角度信息,效果不太好,
请问作者怎么解决的呢?谢谢
不好意思打扰了,我是一名小白,水平太弱了,能烦请作者将HRSC转DOTA的时,存放HRSC数据集文件目录结构告知一下么,文件路径总是错,万分感谢
ModuleNotFoundError: No module named 'utils'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.