TypeError: Object of type ‘int32’ is not JSON serializable
在运行将labelme标注产生的json文件转换成coco数据集的json格式的代码时,遇到错误:TypeError: Object of type ‘int32’ is not JSON serializable。
原因:labelme标注产生的json文件中的"points"中的值为int型,将其转换成float型即可。
如:将
转换为
TypeError: Object of type ‘int32’ is not JSON serializable
在运行将labelme标注产生的json文件转换成coco数据集的json格式的代码时,遇到错误:TypeError: Object of type ‘int32’ is not JSON serializable。
原因:labelme标注产生的json文件中的"points"中的值为int型,将其转换成float型即可。
如:将
转换为