Closed Yuanchihwei closed 8 months ago
👋 Hello @Yuanchihwei, thank you for your interest in YOLOv5 🚀! 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 a minimum reproducible example to help us debug it.
If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.
Python>=3.8.0 with all requirements.txt installed including PyTorch>=1.8. To get started:
git clone https://github.com/ultralytics/yolov5 # clone
cd yolov5
pip install -r requirements.txt # install
YOLOv5 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 YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training, validation, inference, export and benchmarks on macOS, Windows, and Ubuntu every 24 hours and on every commit.
We're excited to announce the launch of our latest state-of-the-art (SOTA) object detection model for 2023 - YOLOv8 🚀!
Designed to be fast, accurate, and easy to use, YOLOv8 is an ideal choice for a wide range of object detection, image segmentation and image classification tasks. With YOLOv8, you'll be able to quickly and accurately detect objects in real-time, streamline your workflows, and achieve new levels of accuracy in your projects.
Check out our YOLOv8 Docs for details and get started with:
pip install ultralytics
@Yuanchihwei make sure you are using the latest code from the Yolov7-seg
branch and have correct label formatting. Check out the YOLOv5 docs for label format requirements. Good luck!
👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.
For additional resources and information, please see the links below:
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 YOLO 🚀 and Vision AI ⭐
I meet with similar problem in yolov9.
Traceback (most recent call last):
File "D:/zyqi/yolov9-main/segment/train.py", line 646, in
It seems like there's a mismatch in the dimensions of your arrays during the concatenation process in the mixup
function. This often occurs when the data isn't uniformly structured. Ensure all your segments
arrays have the same number of dimensions before concatenation. A quick fix could be checking and reshaping arrays if necessary before the np.concatenate
call. For example:
if segments.ndim != segments2.ndim:
# Reshape or handle arrays to match dimensions
# Example reshaping to 3D if they are not:
segments = segments.reshape(-1, segments.shape[0], segments.shape[1])
segments2 = segments2.reshape(-1, segments2.shape[0], segments2.shape[1])
segments = np.concatenate((segments, segments2), 0)
This code is just a starting point; adjust as necessary based on your actual data structure. Good luck! 🚀
Yes,I do it. I have converted from json format with Polygon labels to YOLOv7 instance segmentation. The solution to this problem is to use hyp.scratch-high.yaml but set mixup to 0.0
天空 @.***
------------------ 原始邮件 ------------------ 发件人: "Glenn @.>; 发送时间: 2024年4月18日(星期四) 凌晨4:18 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [ultralytics/yolov5] How to convert from json format with Polygon labels to YOLOv7 instance segmentation Without Roboflow? (Issue #12560)
It seems like there's a mismatch in the dimensions of your arrays during the concatenation process in the mixup function. This often occurs when the data isn't uniformly structured. Ensure all your segments arrays have the same number of dimensions before concatenation. A quick fix could be checking and reshaping arrays if necessary before the np.concatenate call. For example: if segments.ndim != segments2.ndim: # Reshape or handle arrays to match dimensions # Example reshaping to 3D if they are not: segments = segments.reshape(-1, segments.shape[0], segments.shape[1]) segments2 = segments2.reshape(-1, segments2.shape[0], segments2.shape[1]) segments = np.concatenate((segments, segments2), 0)
This code is just a starting point; adjust as necessary based on your actual data structure. Good luck! 🚀
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Great to hear you've found a solution by adjusting the hyp.scratch-high.yaml
and setting mixup to 0.0
! 🎉 Remember, small tweaks in the hyperparameters can often resolve unexpected issues or improve training performance. If you have further questions or run into more challenges, feel free to ask. Happy training! 🚀
Search before asking
Question
Epoch GPU_mem box_loss seg_loss obj_loss cls_loss Instances Size 7/299 18.3G 0.06648 0.05584 0.03083 0.0004405 92 640: 100%|██████████| 260/260 [41:52<00:00, 9.66s/it] Class Images Instances Box(P R mAP50 mAP50-95) Mask(P R mAP50 mAP50-95): 100%|██████████| 33/33 [02:55<00:00, 5.32s/ all 1038 4626 0.677 0.127 0.106 0.0427 0.673 0.119 0.101 0.037
Traceback (most recent call last): File "D:\yolov7-u7\yolov7-u7\seg\segment\train.py", line 681, in
main(opt)
File "D:\yolov7-u7\yolov7-u7\seg\segment\train.py", line 577, in main
train(opt.hyp, opt, device, callbacks)
File "D:\yolov7-u7\yolov7-u7\seg\segment\train.py", line 295, in train
for i, (imgs, targets, paths, _, masks) in pbar: # batch ------------------------------------------------------
File "D:\anaconda\Lib\site-packages\tqdm\std.py", line 1178, in iter
for obj in iterable:
File "D:\yolov7-u7\yolov7-u7\seg\utils\dataloaders.py", line 171, in iter
yield next(self.iterator)
^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\torch\utils\data\dataloader.py", line 630, in next
data = self._next_data()
^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\torch\utils\data\dataloader.py", line 1345, in _next_data
return self._process_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\torch\utils\data\dataloader.py", line 1371, in _process_data
data.reraise()
File "D:\anaconda\Lib\site-packages\torch_utils.py", line 694, in reraise
raise exception
ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "D:\anaconda\Lib\site-packages\torch\utils\data_utils\worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]