你好,github上shp2coco程序,我运行后报错
我的操作是右键shp2coco.py 运行
Warning 1: PROJ: proj_create_from_database: D:\software\anaconda\envs\openmmlab\Library\share\proj\proj.db contains DATABASE.LAYOUT.VERSION.MINOR = 1 whereas a number >= 2 is expected. It comes from another PROJ installation.
Traceback (most recent call last):
File "D:\software\anaconda\envs\shp2coco\shp2coco-master\tif_process.py", line 154, in clip_mask_with_grid
save_image_with_georef(bg_img, gtiffDriver,
File "D:\software\anaconda\envs\shp2coco\shp2coco-master\tif_process.py", line 309, in save_image_with_georef
ds = driver.CreateCopy(save_path, ds, gdal.GF_Write)
File "D:\software\anaconda\envs\openmmlab\lib\site-packages\osgeo\gdal.py", line 1920, in CreateCopy
return _gdal.Driver_CreateCopy(self, *args, **kwargs)
RuntimeError: PROJ: proj_create_from_name: D:\software\anaconda\envs\openmmlab\Library\share\proj\proj.db contains DATABASE.LAYOUT.VERSION.MINOR = 1 whereas a number >= 2 is expected. It comes from another PROJ installation.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:/software/anaconda/envs/shp2coco/shp2coco-master/shape_to_coco.py", line 145, in
main()
File "D:/software/anaconda/envs/shp2coco/shp2coco-master/shape_to_coco.py", line 138, in main
clip_from_file(clip_size, ROOT, img_path, shp_path)
File "D:\software\anaconda\envs\shp2coco\shp2coco-master\tif_process.py", line 385, in clip_from_file
pic_num = tif.clip_tif_and_shapefile(clip_size, pic_id, root + '/' + shp_path + '/' + img_id + '/' + img_id + '.shp', root + '/dataset')
File "D:\software\anaconda\envs\shp2coco\shp2coco-master\tif_process.py", line 263, in clip_tif_and_shapefile
self.clip_mask_with_grid(clip_size=clip_size, begin_id=begin_id, out_dir=out_dir + '/annotations')
File "D:\software\anaconda\envs\shp2coco\shp2coco-master\tif_process.py", line 159, in clip_mask_with_grid
raise IOError('clip failed!%d' % count)
OSError: clip failed!1
感谢您分享代码!期待您的回复