Closed Lay-best closed 1 year ago
It is hard to say, since the codes have never been verified on Windows.
It's because of your CV2 version. Try opencv-python=3.4.10.37 version as mentioned in the requirements.txt file. Follow the requirements file to install the other packages.
It happened to me, and I found the $height$ and $width$ are on the GPU, it worked after put them on the CPU.
When I run the order that "python train_val.py -t" in the terminal , a error was found . ` File "D:\E-data\python-code\Counting\SAFECount-main\tools\train_val.py", line 302, in eval visualizer.vis_batch(outputs) File "D:\E-data\python-code\Counting\SAFECount-main\tools..\utils\vis_helper.py", line 85, in vis_batch self.vis_result(filename, resname, height, width, output) File "D:\E-data\python-code\Counting\SAFECount-main\tools..\utils\vis_helper.py", line 58, in vis_result output = cv2.resize(output, (width, height)) cv2.error: OpenCV(4.7.0) :-1: error: (-5:Bad argument) in function 'resize'