-
-
Notifications
You must be signed in to change notification settings - Fork 16.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After update cannot redirect output to file anymore. #5960
Comments
@superalino YOLOv5 has consolidated logging now using the LOGGER instance: Line 54 in 8f35436
See #5569 |
Ok, I'm not able to understand how it works so I did this stupid workaround: detect.py >& output.log |
@superalino it works! Why does adding the & work?? |
👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs. Access additional YOLOv5 🚀 resources:
Access additional Ultralytics ⚡ resources:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed! Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐! |
Search before asking
YOLOv5 Component
Detection
Bug
After update I have noticed that detect.py behavior has changed
If I launch this command with latest version of yolov5:
python3 detect.py --weights weights/yolov5x6.pt --classes 0 --conf-thres 0.71 --img-size=1280 --source /archivio/Evento-1035663-VialeSilvia-00026-capture.jpg --project /dev/shm/test/ > /tmp/anal.log
The output file /tmp/anal.log is empty.
root@videosorveglianza:/scripts/yolov5_last# python3 detect.py --weights weights/yolov5x6.pt --classes 0 --conf-thres 0.71 --img-size=1280 --source /archivio/Evento-1035663-VialeSilvia-00026-capture.jpg --project /dev/shm/test/ > /tmp/anal.log
detect: weights=['weights/yolov5x6.pt'], source=/archivio/Evento-1035663-VialeSilvia-00026-capture.jpg, imgsz=[1280, 1280], conf_thres=0.71, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_conf=False, save_crop=False, nosave=False, classes=[0], agnostic_nms=False, augment=False, visualize=False, update=False, project=/dev/shm/test/, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False
YOLOv5 🚀 v6.0-139-g8f35436 torch 1.10.0+cu102 CUDA:0 (NVIDIA GeForce GTX 1060 6GB, 6078MiB)
Fusing layers...
Model Summary: 574 layers, 140730220 parameters, 0 gradients
image 1/1 /archivio/Evento-1035663-VialeSilvia-00026-capture.jpg: 768x1280 Done. (0.168s)
Speed: 0.7ms pre-process, 168.2ms inference, 0.8ms NMS per image at shape (1, 3, 1280, 1280)
Results saved to /dev/shm/test/exp
root@videosorveglianza:/scripts/yolov5_last# ls -altr /tmp/anal.log
-rw-r--r-- 1 root root 0 12 dic 15.48 /tmp/anal.log
If I launch this command on version 6-0-35 output file has the output I need:
root@videosorveglianza:/scripts/yolov5_6# python3 detect.py --weights weights/yolov5x6.pt --classes 0 --conf-thres 0.71 --img-size=1280 --source /archivio/Evento-1035663-VialeSilvia-00026-capture.jpg --project /dev/shm/test/ > /tmp/anal.log
YOLOv5 🚀 v6.0-35-ga4fece8 torch 1.10.0+cu102 CUDA:0 (NVIDIA GeForce GTX 1060 6GB, 6077.9375MB)
Fusing layers...
/usr/local/lib/python3.9/dist-packages/torch/functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:2157.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
Model Summary: 574 layers, 140730220 parameters, 0 gradients
root@videosorveglianza:/scripts/yolov5_6# cat /tmp/anal.log
detect: weights=['weights/yolov5x6.pt'], source=/archivio/Evento-1035663-VialeSilvia-00026-capture.jpg, imgsz=[1280, 1280], conf_thres=0.71, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_conf=False, save_crop=False, nosave=False, classes=[0], agnostic_nms=False, augment=False, visualize=False, update=False, project=/dev/shm/test/, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False
image 1/1 /archivio/Evento-1035663-VialeSilvia-00026-capture.jpg: 768x1280 Done. (0.268s)
Speed: 2.2ms pre-process, 267.7ms inference, 11.6ms NMS per image at shape (1, 3, 1280, 1280)
Results saved to /dev/shm/test/exp7
Environment
YOLOv5 🚀 v6.0-139-g8f35436 torch 1.10.0+cu102 CUDA:0 (NVIDIA GeForce GTX 1060 6GB, 6078MiB)
Debian 11
Python 3.9.2
Minimal Reproducible Example
python3 detect.py > /tmp/output.log
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: