1.json加载中文文件或者中文内容出现错误。
参考https://blog.csdn.net/weixin_40950781/article/details/105639301
在open的时候指定编码格式。
jsonObj = json.load(open("packBox/Annotations/210605135056C8[盒皮纸缺陷1].json", encoding="utf-8"))
imgWidth = jsonObj['imageWidth']
imgHeight = jsonObj['imageHeight']
2.pyqt5的一些模块的使用例子。
https://github.com/PyQt5/PyQt/blob/master/QtRemoteObjects/simpleswitch/directconnectdynamicclient.py
3.注意python类的析构,假如创建了类对象之后不将其赋值给个变量,他会立马析构。
# 这个不会被析构
dc = DynamicClient(remoteObj)
# 这样立马被析构了
DynamicClient(remoteObj)
4.图像数据增强库
Augmentor和imgaug——python图像数据增强库
例程代码 https://imgaug.readthedocs.io/en/latest/index.html
简介 https://blog.csdn.net/limiyudianzi/article/details/86497305
5.建立httpServer搭建
https://blog.csdn.net/whatday/article/details/106550650
6.从http取得的字符串二进制数据的解码
def do_POST(self):
datas = self.rfile.read(int(self.headers['content-length']))
print('-----receive text:', datas.decode('utf-8'))