I tried to run the tutorial on Ubuntu 18.04. yolov3 works fine, but yolov2 fails with the following errors/warnings:
$ ./from_darknet.py
Downloading from url https://github.com/dmlc/web-data/blob/main/darknet/cfg/yolov2.cfg?raw=true to /home/alex/.tvm_test_data/darknet/yolov2.cfg
...100%, 0.01 MB, 8 KB/s, 0 seconds passed
Downloading from url https://pjreddie.com/media/files/yolov2.weights to /home/alex/.tvm_test_data/darknet/yolov2.weights
...100%, 194.49 MB, 11197 KB/s, 17 seconds passed
File /home/alex/.tvm_test_data/darknet/libdarknet2.0.so exists, skip.
Converting darknet to relay functions...
Compiling the model...
One or more operators have not been tuned. Please tune your model for better performance. Use DEBUG logging level to see more details.
Loading the test image...
File /home/alex/.tvm_test_data/data/dog.jpg exists, skip.
Running the test image...
/home/alex/workspace/tvm/python/tvm/relay/testing/yolo_detection.py:90: RuntimeWarning: overflow encountered in exp
bw = np.exp(data[location[0]][2][location[1]][location[2]]) * biases[2 * n] / w
/home/alex/workspace/tvm/python/tvm/relay/testing/yolo_detection.py:91: RuntimeWarning: overflow encountered in exp
bh = np.exp(data[location[0]][3][location[1]][location[2]]) * biases[2 * n + 1] / h
/home/alex/workspace/tvm/python/tvm/relay/testing/yolo_detection.py:79: RuntimeWarning: invalid value encountered in double_scalars
u = a.w * a.h + b.w * b.h - i
/home/alex/workspace/tvm/python/tvm/relay/testing/yolo_detection.py:74: RuntimeWarning: invalid value encountered in double_scalars
return w * h
File /home/alex/.tvm_test_data/data/coco.names exists, skip.
File /home/alex/.tvm_test_data/data/arial.ttf exists, skip.
Traceback (most recent call last):
File "./from_darknet.py", line 198, in <module>
tvm.relay.testing.yolo_detection.show_detections(img, dets, thresh, names, last_layer.classes)
File "/home/alex/workspace/tvm/python/tvm/relay/testing/yolo_detection.py", line 273, in show_detections
valid, detection = get_detections(im, det, thresh, names, classes)
File "/home/alex/workspace/tvm/python/tvm/relay/testing/yolo_detection.py", line 221, in get_detections
left = int((b.x - b.w / 2.0) * imw)
OverflowError: cannot convert float infinity to integer
yolov3-tiny fails too. The cfg file does not exist here - https://github.com/dmlc/web-data/blob/main/darknet/cfg/yolov3-tiny.cfg?raw=true