Closed narugo1992 closed 11 months ago
Hi @narugo1992 , Sorry for missing this message, I guess it's because the dependency that I'm using has set some environment variable that causes the problem, but I can't be sure which dependency is causing this problem in a short time.
But if you want to do visualization within jupyter, you can use the cv2_imshow
method below, which is more stable and convenient for me personally.
And see https://zhiqwang.com/yolov5-rt-stack/notebooks/comparison-between-yolort-vs-yolov5.html#Load-model-as-ultralytics-and-inference as usage example.
Hi @narugo1992 , Sorry for missing this message, I guess it's because the dependency that I'm using has set some environment variable that causes the problem, but I can't be sure which dependency is causing this problem in a short time.
But if you want to do visualization within jupyter, you can use the
cv2_imshow
method below, which is more stable and convenient for me personally.And see https://zhiqwang.com/yolov5-rt-stack/notebooks/comparison-between-yolort-vs-yolov5.html#Load-model-as-ultralytics-and-inference as usage example.
Thanks for your reply :smile: , using ` cv2_ Imshow ' is indeed a viable alternative. However, for my specific work, what I need to visualize on jupyter is not only original images and yolort detection results, but also various charts must be presented with matplotlib. I believe that I'm not alone, so~~~ looking forward to use the fixed released version.
🐛 Describe the bug
When I import
YOLOv5
, the backend of matplotlib will be changed toagg
unexpectly.You can run this code, the first output is the correct backend, while the second one will be changed to
agg
.This will cause the
plt.show
to fail in jupyter notebook with the following warning informationSuch side effects should be avoided to ensure that the original program will not be affected.
Versions