I know all the solutions on the internet say to give integer co-ordinates but that isn't working for me.
def box(x,y,w,h):
print(x,y,w,h)
print(type(x),type(y),type(w),type(h))
cv2.rectangle(image, (int(x),int(y)) , (int(x+w),int(y+h)) , (255,0,0) , 2.0) ----> error
for i in indices.flatten():
x,y,w,h = boxes[i][0],boxes[i][1],boxes[i][2],boxes[i][3]
box(int(x),int(y),int(w),int(h))
Run Code Online (Sandbox Code Playgroud)
Output of debug
414 1308 53 404
<class 'int'> <class 'int'> <class 'int'> <class 'int'>
Run Code Online (Sandbox Code Playgroud)
Python version - 3.7.0 OpenCv version - 4.4.0.42
当我!pip install 'library_name'
在 kaggle 控制台中运行时,它会抛出此警告:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))
after connection broken by 'NewConnectionError('
<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fc7bd22aed0>:
Failed to establish a new connection: [Errno -3] Temporary failure in name resolution
')': /simple/pip/
Run Code Online (Sandbox Code Playgroud)
最终不安装该库。
这个警告的原因是什么以及如何解决这个问题?