Closed thibault390 closed 3 years ago
👋 Hello @thibault390, thank you for your interest in YOLOv3 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.
If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.
If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.
For business inquiries or professional support requests please visit https://www.ultralytics.com or email Glenn Jocher at glenn.jocher@ultralytics.com.
Python 3.8 or later with all requirements.txt dependencies installed, including torch>=1.7
. To install run:
$ pip install -r requirements.txt
YOLOv3 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
If this badge is green, all YOLOv3 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv3 training (train.py), testing (test.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.
My error come from yolo.py and is as follow:
TorchScript: starting export with torch 1.7.1+cpu...
/home/yolov5/models/yolo.py:51: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if self.grid[i].shape[2:4] != x[i].shape[2:4] or self.onnx_dynamic:
terminate called after throwing an instance of 'c10::Error'
what(): [enforce fail at inline_container.cc:380] . PytorchStreamWriter failed writing file version: file write failed
frame #0: c10::ThrowEnforceNotMet(char const, int, char const, std::string const&, void const) + 0x47 (0x7f2ade3ce6a7 in /home/thibault/.local/lib/python3.7/site-packages/torch/lib/libc10.so)
frame #1: caffe2::serialize::PyTorchStreamWriter::valid(char const, char const) + 0xa2 (0x7f2acfa52f72 in /home/thibault/.local/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
frame #2: caffe2::serialize::PyTorchStreamWriter::writeRecord(std::string const&, void const, unsigned long, bool) + 0xbf (0x7f2acfa5391f in /home/thibault/.local/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
frame #3: caffe2::serialize::PyTorchStreamWriter::writeEndOfFile() + 0xe1 (0x7f2acfa54441 in /home/thibault/.local/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
frame #4: caffe2::serialize::PyTorchStreamWriter::~PyTorchStreamWriter() + 0x115 (0x7f2acfa54c35 in /home/thibault/.local/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
frame #5:
I solved my problem
@thibault390 great to hear that you were able to solve the issue! If you have any other questions or need further assistance, feel free to ask.
❔I'm trying to convert my yolo model with "python3 models/export.py --weights ./best_weight_large_12epochs.pt --img-size 640 384 --batch 1" command and results in Abandon (core dumped)
No idea how to correct that?
Additional context
Ubuntu 18.04 python3.8 pytorch: 1.7.1+cpu torchvision: 0.8.2+cpu