Open WJerry66 opened 1 year ago
btw, my monitor resolution is 2560x1600,but i manually set it as window mode, 2560x1440. I'm not sure if this could be an issue
try this: go to folder 'code' open file 'distanceFinder.py' with code editor go to strings number 91 and 93 and change: tankArrow = i.numpy() to: tankArrow = i.numpy(force=True) and: yellowMarker = i.numpy() to: yellowMarker = i.numpy(force=True)
thank you! it works;) but there is another exception raised
Initialization of neural network YOLOv5 2023-2-6 Python-3.10.9 torch-1.13.0+cu116 CUDA:0 (NVIDIA GeForce RTX 3070 Laptop GPU, 8192MiB)
Loading code\yolo5\best.onnx for ONNX Runtime inference... Adding AutoShape...
The program is waiting for a keystroke
Tank position (171.02439453781292, 524.2225942304058)
Center of the yellow mark (217.05326744817918, 180.67533316663517)
Traceback (most recent call last):
File "C:\Users\20887\Desktop\distance\miniMap.py", line 93, in
when I look the files in C:\Users\20887\Desktop\distance\code\yolo5\data there is no resolution_2 folder, and aletter.png
ok, distance and data folders must be in the same shared folder
my bad, I wrongly unzip it Thank you for your reply and contribution to the program!
Traceback (most recent call last): File "C:\Users\20887\Desktop\distance\miniMap.py", line 93, in
process = distanceFinder.checkDistance(model)
Desktop\distance\code\distanceFinder.py", line 91, in checkDistance
tankArrow = i.numpy()
TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
there is a type error being raised, and the program terminated, my cpu does not support the cuda
I am not sure what could I do to fix this, could u please give me some advice?