wongkinyiu / yolor Goto Github PK
View Code? Open in Web Editor NEWimplementation of paper - You Only Learn One Representation: Unified Network for Multiple Tasks (https://arxiv.org/abs/2105.04206)
License: GNU General Public License v3.0
implementation of paper - You Only Learn One Representation: Unified Network for Multiple Tasks (https://arxiv.org/abs/2105.04206)
License: GNU General Public License v3.0
Thanks for your work!
I would like to understand solutions that could be applied in final products, that is, solutions that are at the yolo4-tiny level in terms of speed / accuracy or better. The computational complexity of the solution is not entirely clear from the reamde file, as well as the possibility of using acceleration (for example, tkDNN) to increase the output speed. If you can describe in more detail the result obtained in terms of speed.
I wanted to have a testing table on jetson type devices
I see in the train phase that we provide only 1280 as a dimension. So do we resize the image to say 1280x1280 before converting to yolo label format? Currently my yolo label was created with 720x1280 images. (Sorry, I'm new to Yolo)
Hi,
I have been looking through your projects, they are very cool. however I have noticed that, unlike darknet from alexab, none of your code has a license file... Which means that, at the moment, technically, people only have rights to view it, running and modifying the code is not allowed. I realize thinking about copyright is a pain in the rear, but the lawyers do care...
If you could add a license file to your projects (yolov4, yolov4csp, yolor, etc) it would be greatly appreciated.
Could you share config of yolor-d6 in main branch?
Hello. Thanks for your work.
When testing yolor-ssss-dwt 640 on devices like jetson Xavier NX, an unsatisfactory result was obtained in terms of performance (about 30 frames per second), yolo4-tiny + tkDNN FP16 640 * 640 ~ 100 fps. Are there ways to speed up the output for end devices?
At 2070S ~ 100 FPS
Does the difference of both layers do inference?
I saw the method
io[..., :4] *= self.stride io[..., 4:] = F.softmax(io[..., 4:])
What does it means?
Do you think it would be possible to run this model on Deepstream,
Here's YOLOV5 on deepstream processing function: https://github.com/marcoslucianops/DeepStream-Yolo/blob/master/external/yolov5-5.0/nvdsinfer_custom_impl_Yolo/yololayer.cu
would a similar thing work ?
Since YOLO-R Implementation is in pytorch, i believe the process would be similar to https://github.com/marcoslucianops/DeepStream-Yolo/blob/master/YOLOv5-5.0.md
I am training yolor with crowdhuman dataset. Even the train and test batch sizes are set to 1, the program still encounters memory problems when testing (I got 12G memory). I found it is due to non_max_suppression
, anyone has the same problem?
Traceback (most recent call last):
File "train.py", line 537, in <module>
train(hyp, opt, device, tb_writer, wandb)
File "train.py", line 336, in train
results, maps, times = test.test(opt.data,
File "/workplace/Codes/yolor/test.py", line 134, in test
output = non_max_suppression(inf_out, conf_thres=conf_thres, iou_thres=iou_thres)
File "/workplace/Codes/yolor/utils/general.py", line 341, in non_max_suppression
i = torch.ops.torchvision.nms(boxes, scores, iou_thres)
RuntimeError: CUDA out of memory. Tried to allocate 10.49 GiB (GPU 0; 10.91 GiB total capacity; 618.68 MiB already allocated; 6.45 GiB free; 3.78 GiB reserved in total by PyTorch)
Class Images Targets P R [email protected]
Class Images Targets P R [email protected]
Class Images Targets P R [email protected]
Class Images Targets P R [email protected]
Class Images Targets P R [email protected]
Class Images Targets P R [email protected]
[email protected]:.95: 100%|█| 18/18 [00:14<00:00, 1.89it/s]
all 548 3.88e+04 0.377 0.559 0.488 0.309
Speed: 8.8/4.6/13.4 ms inference/NMS/total per 1280x1280 image at batch-size 32
Evaluating pycocotools mAP... saving runs/test/yolor_p6_val8/best_ap_predictions.json...
loading annotations into memory...
ERROR: pycocotools unable to run: expected str, bytes or os.PathLike object, not list
Results saved to runs/test/yolor_p6_val8
This is what I get while testing. What should I do when this happens?
!python train.py --data ./data/uav_coco.yaml --batch-size 8 --cfg ./models/uav_e6.yaml --name yolor-p6 --weights "" --hyp ./data/hyp.scratch.1280.yaml
i have some problems
Traceback (most recent call last):
File "train.py", line 537, in
train(hyp, opt, device, tb_writer, wandb)
File "train.py", line 86, in train
model = Darknet(opt.cfg).to(device) # create
File "/content/yolor/models/models.py", line 530, in init
self.module_defs = parse_model_cfg(cfg)
File "/content/yolor/utils/parse_config.py", line 13, in parse_model_cfg
with open(path, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: './models/uav_e6.yaml.cfg'
作者你好,继上次我使用自己的数据集训练好网络后,想使用训练好的权重检测一段mp4视频,但是报错了。视频为test.mp4,我放在和detct.py同级的目录下,运行指令如下:
python detect.py --source test.mp4 --cfg cfg/yolor_p6_puxiang.cfg --weights runs/train/exp3/weights/last_998.pt --conf 0.25 --img-size 1280 --device 0
报错如下:
Traceback (most recent call last):
File "detect.py", line 186, in
detect()
File "detect.py", line 44, in detect
model.load_state_dict(torch.load(weights[0], map_location=device)['model'])
File "D:\Software\Anaconda3\envs\YOLOR\lib\site-packages\torch\serialization.py", line 579, in load
with _open_file_like(f, 'rb') as opened_file:
File "D:\Software\Anaconda3\envs\YOLOR\lib\site-packages\torch\serialization.py", line 230, in _open_file_like
return _open_file(name_or_buffer, mode)
File "D:\Software\Anaconda3\envs\YOLOR\lib\site-packages\torch\serialization.py", line 211, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'y'
请问是否是yoloR不支持检测视频,只支持检测图片?还是我环境配置的问题呢?谢谢
Here's what I did:
I have a pascal voc format label (8 classes, completely different form coco labels), which I converted to yolo format using this: https://gist.github.com/Amir22010/a99f18ca19112bc7db0872a36a03a1ec
I made changes to yolor_p6.cfg, replacing filters from 255 with appropriate value, in my case 39, and the num_classes.
I replaced labels in coco.labels with 8 classes of my own.
The train command I used:
python train.py --batch-size 1 --img 1280 1280 --data coco.yaml --cfg cfg/yolor_p6.cfg --weights yolor_p6.pt --device 0 --name yolor_p6_digit --hyp hyp.scratch.1280.yaml --epochs 20
Also tried with hyp.finetune.1280.yaml
But the model doesn't learn anything. Infact after 12 epochs the losses start increasing and mAP starts falling, which was already bad to begin with. Can you please guide me?
I have a dataset of my own which has 8 labels, completely different from the coco labels. I changed the data/coco.names and data/coco.yaml accordingly. But I get an index error:
Traceback (most recent call last):
File "train.py", line 537, in <module>
train(hyp, opt, device, tb_writer, wandb)
File "train.py", line 344, in train
log_imgs=opt.log_imgs if wandb else 0)
File "/home/ubuntu/yolor/test.py", line 226, in test
plot_images(img, output_to_target(output, width, height), paths, f, names) # predictions
File "/home/ubuntu/yolor/utils/plots.py", line 164, in plot_images
cls = names[cls] if names else cls
IndexError: list index out of range
I tried printing the detection classes and its in the range 0-79 i.e coco labels. But why is this happening when I completely changed the labels?
Training command:
python train.py --batch-size 1 --img 1280 1280 --data coco.yaml --cfg cfg/yolor_p6.cfg --weights yolor_p6.pt --device 0 --name yolor_p6_digit --hyp hyp.scratch.1280.yaml --epochs 5
I am currently using this repository in a Colab notebook on a custom dataset but when I try running the training script, I keep getting the following error:
Traceback (most recent call last):
File "train.py", line 537, in <module>
train(hyp, opt, device, tb_writer, wandb)
File "train.py", line 183, in train
rank=rank, world_size=opt.world_size, workers=opt.workers)
File "/content/yolor/utils/datasets.py", line 72, in create_dataloader
rank=rank)
File "/content/yolor/utils/datasets.py", line 499, in __init__
assert not augment, '%s. Can not train without labels.' % s
AssertionError: WARNING: No labels found in ../train/labels/. See https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data. Can not train without labels.
I know for a fact that my dataset structure is formatted correctly and I do have labels in my train/labels/
folder so I was unsure what could be causing this issue. My folder structure looks something like this:
For reference, I am running the following command to start the training process:
python train.py --batch-size 8 --img 416 416 --data /content/data.yaml --cfg cfg/yolor_p6.cfg --weights '' --device 0 --name yolor_p6 --hyp hyp.scratch.1280.yaml --epochs 300
And my data.yaml
file looks like this:
train: ../train/images
val: ../valid/images
nc: 3
names: ['Crab', 'Lobster', 'Shrimp']
Any and all help would be appreciated; thank you!
I'm wait for the open!
I'm running detect.py on personal images. However, it's not saving the output anywhere.
Hello, I'm trying to train YOLOR on my custom data.
In previous versions of YOLO, we set (classes + 5) * 3
filters in [convolution]
layers before [yolo]
layers.
I think we should do the same thing to 4 [implicit_mul]
layers in yolor_p6.cfg
in your work.
Is this collect?
Thank you.
Hi ,
Thanks for your great job. I want to use your yolov4-csp-fast model. My codebranch is "paper".
As your paper said :YOLOv4-CSP-fast is modified from YOLOv4-CSP, we replace Stem A in YOLOv4-CSP by Stem B to form YOLOv4-CSP-fast.
so I only replace the first layer to ;
backbone:
# [from, number, module, args]
[[-1, 1, ReOrg, []], # 0
[-1, 1, Conv, [64, 3, 1]], # 1-P1/2
[-1, 1, Bottleneck, [64]],
[-1, 1, Conv, [128, 3, 2]], # 3-P2/4
[-1, 2, BottleneckCSP, [128]],
[-1, 1, Conv, [256, 3, 2]], # 5-P3/8
[-1, 8, BottleneckCSP, [256]],
[-1, 1, Conv, [512, 3, 2]], # 7-P4/16
[-1, 8, BottleneckCSP, [512]],
[-1, 1, Conv, [1024, 3, 2]], # 9-P5/32
[-1, 4, BottleneckCSP, [1024]], # 10
]
But it seems wrong:
RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED Traceback (most recent call last): File "train.py", line 562, in <module> train(hyp, opt, device, tb_writer, wandb) File "train.py", line 318, in train scaler.scale(loss).backward() File "/opt/conda/lib/python3.6/site-packages/torch/tensor.py", line 227, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph) File "/opt/conda/lib/python3.6/site-packages/torch/autograd/__init__.py", line 138, in backward allow_unreachable=True) # allow_unreachable flag
but if i set second layer to
[-1, 1, Conv, [64, 3, 2]], # 1-P1/2
it seems no problem.
can you share me your yolov4-csp-fast.yaml?
if i want inference more quickly, can i use DownC and BottleneckCSPF like yolor-d6?
thanks
Thanks!
运行train.py,报错:Exception: Dataset not found
我想请问,YOLOR是否支持txt标注的数据集直接进行训练? 还是必须要先转成json或者xml的标注格式才能用?
README文件并未说明。也就是说,我是否要先把自己的数据集变成COCO数据集的格式才可以使用YOLOR,还是说可以向YOLOV5那样,使用txt标注的数据集直接训练呢?
谢谢
Hi, how can I use detect.py to count a number of objects?
!python models/export.py --weights yolor_p6.pt --img-size 512 --cfg cfg/yolor_p6.cfg
i got this error
Traceback (most recent call last):
File "models/export.py", line 5, in
from utils.google_utils import attempt_download
ModuleNotFoundError: No module named 'utils'
Traceback (most recent call last):
File "train.py", line 540, in
train(hyp, opt, device, tb_writer, wandb)
File "train.py", line 287, in train
pred = model(imgs) # forward
File "D:\Software\Anaconda3\envs\YOLOR\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "G:\datasets_models\obj_models\yolor\models\models.py", line 543, in forward
return self.forward_once(x)
File "G:\datasets_models\obj_models\yolor\models\models.py", line 594, in forward_once
x = module(x, out) # WeightedFeatureFusion(), FeatureConcat()
File "D:\Software\Anaconda3\envs\YOLOR\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "G:\datasets_models\obj_models\yolor\utils\layers.py", line 404, in forward
return a.expand_as(x) * x
RuntimeError: The expanded size of the tensor (39) must match the existing size (255) at non-singleton dimension 1. Target sizes: [1, 39, 160, 160]. Tensor sizes: [1, 255, 1, 1]
Used the following command:
python test.py --data data/coco.yaml --img 1280 --batch 32 --conf 0.001 --iou 0.65 --device 0 --cfg cfg/yolor_p6.cfg --weights yolor_p6.pt --name yolor_p6_val
Got the following result:
What am I missing? It says that there are no labels, but I have provided the JSON file. Do I need to provide the annotation TXT files too? I am sorry if the question is dumb I am a beginner
hi, when I change --img-size from 1280 to 320 for example it is not working and throws me an error which is :
Traceback (most recent call last):
File "detect.py", line 187, in
detect()
File "detect.py", line 86, in detect
pred = model(img, augment=opt.augment)[0]
File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\ASUS\Desktop\yoloR\yolor\models\models.py", line 543, in forward
return self.forward_once(x)
File "C:\Users\ASUS\Desktop\yoloR\yolor\models\models.py", line 594, in forward_once
x = module(x, out) # WeightedFeatureFusion(), FeatureConcat()
File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\ASUS\Desktop\yoloR\yolor\utils\layers.py", line 69, in forward
return torch.cat([outputs[i] for i in self.layers], 1) if self.multiple else outputs[self.layers[0]]
RuntimeError: torch.cat(): Sizes of tensors must match except in dimension 1. Got 15 and 16 in dimension 2 (The offending index is 1)
any solution for this problem .
Why is autoanchor disabled?
谷歌云盘有时候进不去
@WongKinYiu Could you share the ImageNet pretrained model?Thank you very much!!!
Congrats. Great work!
Do you have information on the license of this repository?
Thanks
I have large dataset of 1 class: drone, labeled in coco json format, which details can i modify to train your model in my dataset? Thank you!
代码修改如下:
import argparse
from models import *
from utils.torch_utils import select_device
import torch
from utils.google_utils import attempt_download
from utils.google_utils import attempt_load
if name == 'main':
parser = argparse.ArgumentParser()
parser.add_argument('--weights', type=str, default='./yolov4.pt', help='weights path')
parser.add_argument('--img-size', nargs='+', type=int, default=[640, 640], help='image size')
parser.add_argument('--batch-size', type=int, default=1, help='batch size')
parser.add_argument('--cfg', type=str, help='batch size')
opt = parser.parse_args()
opt.img_size *= 2 if len(opt.img_size) == 1 else 1 # expand
print(opt)
# Input
img = torch.zeros((opt.batch_size, 3, *opt.img_size)) # image size(1,3,320,192) ### ### iDetection
# Load PyTorch model
attempt_download(opt.weights)
model = Darknet(opt.cfg, opt.img_size)
model.load_state_dict(torch.load(opt.weights)['model'])
model.eval()
y = model(img) # dry run
try:
import onnx
print('\nStarting ONNX export with onnx %s...' % onnx.__version__)
f = opt.weights.replace('.pt', '.onnx') # filename
model.fuse() # only for ONNX
torch.onnx.export(model, img, f, verbose=False, opset_version=12, input_names=['images'],
output_names=['output'])
# Checks
onnx_model = onnx.load(f) # load onnx model
onnx.checker.check_model(onnx_model) # check onnx model
print(onnx.helper.printable_graph(onnx_model.graph)) # print a human readable model
print('ONNX export success, saved as %s' % f)
except Exception as e:
print('ONNX export failure: %s' % e)
代码我修改为上面的样式,onnx版本1.9.0,
使用命令为:python models/export.py --weights yolor_p6.pt --img-size 1280 --cfg cfg/yolor_p6.cfg
目前报错ONNX export failure: Exporting the operator silu to ONNX opset version 12 is not supported. Please open a bug to request ONNX export support for the missing operator.
我尝试了其他版本的onnx,也尝试了不同版本的opset_version,10以上都是这个错误,10以下是ONNX export failure: step!=1 is currently not supported
非常感谢,期待您的回复
How can I fix this?
Traceback (most recent call last):
File "train.py", line 537, in <module>
train(hyp, opt, device, tb_writer, wandb)
File "train.py", line 288, in train
loss, loss_items = compute_loss(pred, targets.to(device), model) # loss scaled by batch_size
File "/yolor/utils/loss.py", line 66, in compute_loss
tcls, tbox, indices, anchors = build_targets(p, targets, model) # targets
File "/yolor/utils/loss.py", line 145, in build_targets
r = t[None, :, 4:6] / anchors[:, None] # wh ratio
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!
I have test trained yolor-p6.yaml In VisDrone dataset (a famous UAV dataset) use 640 size and your pretrained .pt. And I get a excellent results, It's a great work!
Then, I trained yolov4-p6-light.yaml(remove the reOrg and IDetect module and I fix it in yolov5's rep) in VisDrone dataset use 640 size without pretrained, but the results under the original yolov4-csp‘s result. maybe it have some bug in my code.
So I'm training the same yolov4-p6-light.yaml(remove the reOrg and IDetect module and I fix it in your yolor's rep) in VisDrone use 640 size without pretrained, and I need find the bug in my own code if your yolor rep can get a good results. If not, that says yolov4-p6-light need a coco pretrained? because the model have four output, the loss can hard to convergence?
The all experiment trained in 300epoch, 32batchsize, 640*640 size, use single V100 to train the model. maybe you can solve my question. thks!
Hi,
I am confused about your training schedule logic in branch "paper".
`python -m torch.distributed.launch --nproc_per_node 8 --master_port 9527 train.py --batch-size 64 --img 1280 1280 --data data/coco.yaml --cfg models/yolor-p6.yaml --weights '' --sync-bn --device 0,1,2,3,4,5,6,7 --name yolor-p6 --hyp hyp.scratch.1280.yaml --epochs 300
python -m torch.distributed.launch --nproc_per_node 8 --master_port 9527 tune.py --batch-size 64 --img 1280 1280 --data data/coco.yaml --cfg models/yolor-p6.yaml --weights 'runs/train/yolor-p6/weights/last_298.pt' --sync-bn --device 0,1,2,3,4,5,6,7 --name yolor-p6-tune --hyp hyp.finetune.1280.yaml --epochs 450
python -m torch.distributed.launch --nproc_per_node 8 --master_port 9527 train.py --batch-size 64 --img 1280 1280 --data data/coco.yaml --cfg models/yolor-p6.yaml --weights 'runs/train/yolor-p6-tune/weights/epoch_424.pt' --sync-bn --device 0,1,2,3,4,5,6,7 --name yolor-p6-fine --hyp hyp.finetune.1280.yaml --epochs 450`
In third step, why you choose the epoch_424, and train only bis 450 epochs(only train remain 26 epochs )? why not chose the best finetung epoch?
Thanks for this repository!
I managed to convert a trained model to ONNX using convert_onnx.py
, but I can't manage to convert it to TensorRT for inference on a Jetson Xavier NX.
I have included the TensorRT (v7.1.3) build output below:
----------------------------------------------------------------
Input filename: best.onnx
ONNX IR version: 0.0.6
Opset version: 11
Producer name: pytorch
Producer version: 1.8
Domain:
Model version: 0
Doc string:
----------------------------------------------------------------
[06/10/2021-17:40:43] [W] [TRT] onnx2trt_utils.cpp:220: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
[06/10/2021-17:40:43] [W] [TRT] onnx2trt_utils.cpp:246: One or more weights outside the range of INT32 was clamped
[06/10/2021-17:40:43] [W] [TRT] onnx2trt_utils.cpp:246: One or more weights outside the range of INT32 was clamped
[06/10/2021-17:40:43] [W] [TRT] onnx2trt_utils.cpp:246: One or more weights outside the range of INT32 was clamped
[06/10/2021-17:40:43] [W] [TRT] onnx2trt_utils.cpp:246: One or more weights outside the range of INT32 was clamped
[06/10/2021-17:40:43] [W] [TRT] onnx2trt_utils.cpp:246: One or more weights outside the range of INT32 was clamped
[06/10/2021-17:40:43] [W] [TRT] onnx2trt_utils.cpp:246: One or more weights outside the range of INT32 was clamped
[06/10/2021-17:40:43] [W] [TRT] onnx2trt_utils.cpp:246: One or more weights outside the range of INT32 was clamped
[06/10/2021-17:40:43] [W] [TRT] onnx2trt_utils.cpp:246: One or more weights outside the range of INT32 was clamped
[06/10/2021-17:40:43] [W] [TRT] onnx2trt_utils.cpp:246: One or more weights outside the range of INT32 was clamped
[06/10/2021-17:40:43] [I] [TRT] ModelImporter.cpp:135: No importer registered for op: ScatterND. Attempting to import as plugin.
[06/10/2021-17:40:43] [I] [TRT] builtin_op_importers.cpp:3659: Searching for plugin: ScatterND, plugin_version: 1, plugin_namespace:
[06/10/2021-17:40:43] [E] [TRT] INVALID_ARGUMENT: getPluginCreator could not find plugin ScatterND version 1
ERROR: builtin_op_importers.cpp:3661 In function importFallbackPluginImporter:
[8] Assertion failed: creator && "Plugin not found, are the plugin name, version, and namespace correct?"
[06/10/2021-17:40:43] [E] Failed to parse onnx file
[06/10/2021-17:40:43] [E] Parsing model failed
[06/10/2021-17:40:43] [E] Engine creation failed
[06/10/2021-17:40:43] [E] Engine set up failed
&&&& FAILED TensorRT.trtexec # trtexec --onnx=best.onnx
Any ideas on how to solve the ScatterND issue? Seems like a broadcasting operation unsupported by TRT.
Maybe using different opset version than 11, or rewriting all the lines that have elipsis indexing?
Hi,
Great work!
I use the main branch to train my model. I checked the pretrained yolor_p6.pt is okay. But could you provide more well-trained model for fine-tune? such as yolor_w6.pt, yolor_e6.pt....
I noticed in your paper branch, you provide these model, yolor-w6.pt, yolor-e6.pt....But it may not be compatible with the main branch code with the following error:
ModuleNotFoundError: No module named 'models.yolo'
Hope to get your advice!
Hi! i'm on the paper branch and have exported a yolor-p6 model to onnx using models/export.py
.
The onnx model has the output shape output: batch, 3, 96, 160, nc
though I expected the shape output: batch, 3, max_boxes, nc
Am I doing anything wrong?
Thanks!
Darknet repo has guide "How to train (to detect your custom objects)", where described how change count filters and other parameters for custom dataset. If i change in yolor_p6.cfg number of classes to 2, i get error
File "/workspace/yolor/models/models.py", line 400, in forward
p = p.view(bs, self.na, self.no, self.ny, self.nx).permute(0, 1, 3, 4, 2).contiguous() # prediction
RuntimeError: shape '[4, 3, 7, 80, 80]' is invalid for input of size 6528000
作者你好,我在运行我自己的数据集,到了最后一个epoch时,出现了下面的错误
Traceback (most recent call last):
File "F:/jinyuan/yolor-main/train.py", line 537, in
train(hyp, opt, device, tb_writer, wandb)
File "F:/jinyuan/yolor-main/train.py", line 344, in train
log_imgs=opt.log_imgs if wandb else 0)
File "F:\jinyuan\yolor-main\test.py", line 226, in test
plot_images(img, output_to_target(output, width, height), paths, f, names) # predictions
File "F:\jinyuan\yolor-main\utils\plots.py", line 163, in plot_images
cls = names[cls] if names else cls
IndexError: list index out of range
因为这个问题,导致最后在run里面少了很多图片,没有mAp的曲线图
请教,这是什么原因导致的呢,有何解决的方法,谢谢
File "test.py", line 155
for *xyxy, conf, cls in x:
^
SyntaxError: invalid syntax
I know that the code is great(syntax error didn't happen when ran on the server), but I get syntaxerror when running test.py on jetson xavier nx. What should I do?
I couldn't find YOLOR(or YOLOv4)-SSS(or SSSS)-DWT(or S2D) model in this repo.
It also has no detailed information in the paper.
Q1. How do I use DWT model or DWT module?
Q2. Can you provide DWT model and the weights?
Q3. What is S2D in YOLOR-SSSS and what is the difference between S2D and DWT? (not essential)
Thanks for your great work!
I noticed the "mmdet" branch, could you describe how to use yolor in mmdet?
Hi
when exporting onnx, i faced a problem. Do you know how to solve this problem? I used leakyrelu to replace silu(not supported bei onnx ).
python -m torch.distributed.launch --nproc_per_node 8 --master_port 9527 train.py --batch-size 256 --img 640 640 --data data/.yaml --cfg models/yolor-ssss-dwt.yaml --weights '' --sync-bn --device 0,1,2,3,4,5,6,7 --name yolor-ssss --hyp hyp.scratch.1280.yaml --epochs 2
Starting ONNX export with onnx 1.7.0...
ONNX export failure: Sizes of tensors must match except in dimension 1. Got 23 and 24 in dimension 2 (The offending index is 1)
Hello! When I finish training with branch paper, it encountered with an error:
File "train.py", line 562, in <module>
train(hyp, opt, device, tb_writer, wandb)
File "train.py", line 369, in train
log_imgs=opt.log_imgs if wandb else 0)
File "/home/linghu8812/yolor_ele/test.py", line 211, in test
plot_images(img, output_to_target(output, width, height), paths, f, names) # predictions
File "/home/linghu8812/yolor_ele/utils/plots.py", line 108, in output_to_target
return np.array(targets)
File "/media/D/anaconda3/envs/deeplearning/lib/python3.7/site-packages/torch/tensor.py", line 630, in __array__
return self.numpy()
TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
perhaps it should be this?
return np.array(targets.cpu())
ERROR: torchtext 0.10.0 has requirement torch==1.9.0, but you'll have torch 1.7.0 which is incompatible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.