Giter Club home page Giter Club logo

yolov6's Introduction

English | 简体中文


Open In Colab Open In Kaggle

YOLOv6

Implementation of paper:

What's New

Benchmark

Model Size mAPval
0.5:0.95
SpeedT4
trt fp16 b1
(fps)
SpeedT4
trt fp16 b32
(fps)
Params
(M)
FLOPs
(G)
YOLOv6-N 640 37.5 779 1187 4.7 11.4
YOLOv6-S 640 45.0 339 484 18.5 45.3
YOLOv6-M 640 50.0 175 226 34.9 85.8
YOLOv6-L 640 52.8 98 116 59.6 150.7
YOLOv6-N6 1280 44.9 228 281 10.4 49.8
YOLOv6-S6 1280 50.3 98 108 41.4 198.0
YOLOv6-M6 1280 55.2 47 55 79.6 379.5
YOLOv6-L6 1280 57.2 26 29 140.4 673.4
Table Notes
  • All checkpoints are trained with self-distillation except for YOLOv6-N6/S6 models trained to 300 epochs without distillation.
  • Results of the mAP and speed are evaluated on COCO val2017 dataset with the input resolution of 640×640 for P5 models and 1280x1280 for P6 models.
  • Speed is tested with TensorRT 7.2 on T4.
  • Refer to Test speed tutorial to reproduce the speed results of YOLOv6.
  • Params and FLOPs of YOLOv6 are estimated on deployed models.
Legacy models
Model Size mAPval
0.5:0.95
SpeedT4
trt fp16 b1
(fps)
SpeedT4
trt fp16 b32
(fps)
Params
(M)
FLOPs
(G)
YOLOv6-N 640 35.9300e
36.3400e
802 1234 4.3 11.1
YOLOv6-T 640 40.3300e
41.1400e
449 659 15.0 36.7
YOLOv6-S 640 43.5300e
43.8400e
358 495 17.2 44.2
YOLOv6-M 640 49.5 179 233 34.3 82.2
YOLOv6-L-ReLU 640 51.7 113 149 58.5 144.0
YOLOv6-L 640 52.5 98 121 58.5 144.0
  • Speed is tested with TensorRT 7.2 on T4.

Quantized model 🚀

Model Size Precision mAPval
0.5:0.95
SpeedT4
trt b1
(fps)
SpeedT4
trt b32
(fps)
YOLOv6-N RepOpt 640 INT8 34.8 1114 1828
YOLOv6-N 640 FP16 35.9 802 1234
YOLOv6-T RepOpt 640 INT8 39.8 741 1167
YOLOv6-T 640 FP16 40.3 449 659
YOLOv6-S RepOpt 640 INT8 43.3 619 924
YOLOv6-S 640 FP16 43.5 377 541
  • Speed is tested with TensorRT 8.4 on T4.
  • Precision is figured on models for 300 epochs.

Mobile Benchmark

Model Size mAPval
0.5:0.95
sm8350
(ms)
mt6853
(ms)
sdm660
(ms)
Params
(M)
FLOPs
(G)
YOLOv6Lite-S 320*320 22.4 7.99 11.99 41.86 0.55 0.56
YOLOv6Lite-M 320*320 25.1 9.08 13.27 47.95 0.79 0.67
YOLOv6Lite-L 320*320 28.0 11.37 16.20 61.40 1.09 0.87
YOLOv6Lite-L 320*192 25.0 7.02 9.66 36.13 1.09 0.52
YOLOv6Lite-L 224*128 18.9 3.63 4.99 17.76 1.09 0.24
Table Notes
  • From the perspective of model size and input image ratio, we have built a series of models on the mobile terminal to facilitate flexible applications in different scenarios.
  • All checkpoints are trained with 400 epochs without distillation.
  • Results of the mAP and speed are evaluated on COCO val2017 dataset, and the input resolution is the Size in the table.
  • Speed is tested on MNN 2.3.0 AArch64 with 2 threads by arm82 acceleration. The inference warm-up is performed 10 times, and the cycle is performed 100 times.
  • Qualcomm 888(sm8350), Dimensity 720(mt6853) and Qualcomm 660(sdm660) correspond to chips with different performances at the high, middle and low end respectively, which can be used as a reference for model capabilities under different chips.
  • Refer to Test NCNN Speed tutorial to reproduce the NCNN speed results of YOLOv6Lite.

Quick Start

Install
git clone https://github.com/meituan/YOLOv6
cd YOLOv6
pip install -r requirements.txt
Reproduce our results on COCO

Please refer to Train COCO Dataset.

Finetune on custom data

Single GPU

# P5 models
python tools/train.py --batch 32 --conf configs/yolov6s_finetune.py --data data/dataset.yaml --fuse_ab --device 0
# P6 models
python tools/train.py --batch 32 --conf configs/yolov6s6_finetune.py --data data/dataset.yaml --img 1280 --device 0

Multi GPUs (DDP mode recommended)

# P5 models
python -m torch.distributed.launch --nproc_per_node 8 tools/train.py --batch 256 --conf configs/yolov6s_finetune.py --data data/dataset.yaml --fuse_ab --device 0,1,2,3,4,5,6,7
# P6 models
python -m torch.distributed.launch --nproc_per_node 8 tools/train.py --batch 128 --conf configs/yolov6s6_finetune.py --data data/dataset.yaml --img 1280 --device 0,1,2,3,4,5,6,7
  • fuse_ab: add anchor-based auxiliary branch and use Anchor Aided Training Mode (Not supported on P6 models currently)
  • conf: select config file to specify network/optimizer/hyperparameters. We recommend to apply yolov6n/s/m/l_finetune.py when training on your custom dataset.
  • data: prepare dataset and specify dataset paths in data.yaml ( COCO, YOLO format coco labels )
  • make sure your dataset structure as follows:
├── coco
│   ├── annotations
│   │   ├── instances_train2017.json
│   │   └── instances_val2017.json
│   ├── images
│   │   ├── train2017
│   │   └── val2017
│   ├── labels
│   │   ├── train2017
│   │   ├── val2017
│   ├── LICENSE
│   ├── README.txt

YOLOv6 supports different input resolution modes. For details, see How to Set the Input Size.

Resume training

If your training process is corrupted, you can resume training by

# single GPU training.
python tools/train.py --resume

# multi GPU training.
python -m torch.distributed.launch --nproc_per_node 8 tools/train.py --resume

Above command will automatically find the latest checkpoint in YOLOv6 directory, then resume the training process.

Your can also specify a checkpoint path to --resume parameter by

# remember to replace /path/to/your/checkpoint/path to the checkpoint path which you want to resume training.
--resume /path/to/your/checkpoint/path

This will resume from the specific checkpoint you provide.

Evaluation

Reproduce mAP on COCO val2017 dataset with 640×640 or 1280x1280 resolution

# P5 models
python tools/eval.py --data data/coco.yaml --batch 32 --weights yolov6s.pt --task val --reproduce_640_eval
# P6 models
python tools/eval.py --data data/coco.yaml --batch 32 --weights yolov6s6.pt --task val --reproduce_640_eval --img 1280
  • verbose: set True to print mAP of each classes.
  • do_coco_metric: set True / False to enable / disable pycocotools evaluation method.
  • do_pr_metric: set True / False to print or not to print the precision and recall metrics.
  • config-file: specify a config file to define all the eval params, for example: yolov6n_with_eval_params.py
Inference

First, download a pretrained model from the YOLOv6 release or use your trained model to do inference.

Second, run inference with tools/infer.py

# P5 models
python tools/infer.py --weights yolov6s.pt --source img.jpg / imgdir / video.mp4
# P6 models
python tools/infer.py --weights yolov6s6.pt --img 1280 1280 --source img.jpg / imgdir / video.mp4

If you want to inference on local camera or web camera, you can run:

# P5 models
python tools/infer.py --weights yolov6s.pt --webcam --webcam-addr 0
# P6 models
python tools/infer.py --weights yolov6s6.pt --img 1280 1280 --webcam --webcam-addr 0

webcam-addr can be local camera number id or rtsp address.

Deployment
Tutorials
Third-party resources

If you have any questions, welcome to join our WeChat group to discuss and exchange.

yolov6's People

Contributors

1chimarugin avatar amrzv avatar chilicyy avatar czla avatar deftruth avatar hasibzunair avatar housanduo123 avatar idonov8 avatar khwengxu avatar kku77 avatar knoppmyth avatar linaom1214 avatar mahdilamb avatar meituan-gengyifei avatar mt-zlchen avatar mtchengmeng avatar mtjhl avatar nateraw avatar qinhao14 avatar sangbumchoi avatar sauravgarg540 avatar shensheng272 avatar shisuiuzumaki avatar skalskip avatar sovit-123 avatar triple-mu avatar xingyueye avatar xizi avatar zhiqwang avatar zju-lyf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yolov6's Issues

Quantization is all you need.

We are glad to introduce you the most powerful network quantizaton framework:
https://github.com/openppl-public/ppq/tree/master/ppq

PPQ is designed for post training quantization and network deployment. We are currently working together with developers from Sensetime, AXERA, Oneflow, Metax, helping them producing highly-efficient and fully-quantized model running on TRT, Openvino, ncnn, PPL, Tengine ...

We are looking forward to work with you in the future.

TensorRT

希望能出一个转tensorRT的export,导出能在infer直接用最好了

Exception happened when i pythoned infer.py

After typing in terminal: python tools/infer.py --weights yolov6s.pt --source [/home/lijiahang/Desktop/yolov6/data/images/image1.jpg],issue happened.
i gave the right location where i stored my testing images, is it because i misunderstand the README file? shouldn't i gave the image directory location in []?

coco preparation

How to prepare coco data ? What is the tree structure of the coco folder?

测试精度比YOLOv5低8个百分点

对于单类目标的训练测试,YOLOv6最高只能上86%,但是YOLOv5却可以轻松上90%。数据集使用的同样的数据集,但精度却差这么多,这是怎么一回事呢?

Results do not correspond to current coco set

I use the following code for training
python tools/train.py --batch 16 --conf configs/yolov6s.py --data ./data/coco.yaml --device 0
But this mistake happened
AssertionError: Results do not correspond to current coco set
image

[Code Quality] Add black format and flake8 lint

Code quality is also an important part of a project, and the earlier we add the format tool, the earlier we could control the quality of the code. python also has good tools to assist and automatically handle format, for example the pre-commit.

One of the simplest use cases can be found in #21 , pre-commit can help to auto remove the trailing whitespace.

Further we can also add black and flake plugins to pre-commit, see https://pre-commit.com/#plugins for more details.

BTW, pre-commit has been widely used in many python projects , see https://github.com/pytorch/vision/blob/main/.pre-commit-config.yaml and https://github.com/google/jax/blob/main/.pre-commit-config.yaml as examples.

how to use tensorboard to monitor the training process?

i ran the training process successfully,but i met two issues, first is that my mAP and losses are all 0:
Screenshot from 2022-06-25 21-28-34
second is that i don't know how to monitor my training process in tensorboard, what command should i type in terminal ? i tried typing: tensorboard --logdir=runs but it didn't work, and i don't have document in my runs file:
Screenshot from 2022-06-25 21-42-18
just args, is that normal?

mAP

截屏2022-06-26 下午9 57 37

截屏2022-06-26 下午10 06 23

MAP 都是零

infer and export problem

AttributeError: Can't get attribute 'Detect' on <module 'yolov6.models.yolo' from '/home/xuejun/PycharmProjects/Test/ONNX/Myonnx/yolov6/YOLOv6/yolov6/models/yolo.py'>

Is there any script to run ONNX?

I want to deploy model to TDA4( SoC from Ti), need to convert ONNX to Ti format, but I can not get correct result. can you share me the script to load ONNX?

strange loss

when i was training, i found that my loss is like this:
Screenshot from 2022-06-26 16-13-16
only obj_loss is that normal,or it is because my datasets is not organized rightly?
this is my coco datasets organization:
Screenshot from 2022-06-26 16-16-59
Screenshot from 2022-06-26 16-17-09
Screenshot from 2022-06-26 16-17-19

mAP Exception

为什么我的AP都是0,已经训练了240个epoch了,在我自己的数据集上,且用了预训练权重
45/5000
Why is it that my AP is all 0 and I have trained 240 epochs on my own dataset and used pre-training weights.!!!
image

ModuleNotFoundError

I am a beginner, I would like to ask the code running on the Linux server, training will always report module error. ModuleNotFoundError: No module named 'tools.eval'

Do you have plans for PYPI?

Any plans for pip install yolov6? I want to test 3rd party applications on Yolov6 model. Popular repos require pip for installation.

mAP一直是0

image

`Epoch iou_loss l1_loss obj_loss cls_loss
1/399 0 0 0.0009047 0: 100%|██████████| 369/369 [01:09<00:00, 5.35it/s]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
 2/399         0         0  0.000713         0: 100%|██████████| 369/369 [01:04<00:00,  5.69it/s]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
 3/399         0         0 0.0005463         0: 100%|██████████| 369/369 [00:58<00:00,  6.35it/s]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
 4/399         0         0 0.0004098         0: 100%|██████████| 369/369 [00:57<00:00,  6.43it/s]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
 5/399         0         0 0.0003198         0: 100%|██████████| 369/369 [01:02<00:00,  5.92it/s]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
 6/399         0         0 0.0002474         0: 100%|██████████| 369/369 [01:02<00:00,  5.92it/s]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
 7/399         0         0 0.0002138         0: 100%|██████████| 369/369 [01:01<00:00,  6.02it/s]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
 8/399         0         0  0.000196         0: 100%|██████████| 369/369 [01:01<00:00,  6.02it/s]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
 9/399         0         0 0.0001817         0: 100%|██████████| 369/369 [01:04<00:00,  5.72it/s]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
10/399         0         0 0.0001668         0: 100%|██████████| 369/369 [01:00<00:00,  6.13it/s]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
11/399         0         0 0.0001494         0: 100%|██████████| 369/369 [01:00<00:00,  6.12it/s]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
12/399         0         0 0.0001287         0: 100%|██████████| 369/369 [01:00<00:00,  6.07it/s]

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
13/399         0         0 0.0001141         0:  65%|██████▌   | 240/369 [00:40<00:20,  6.31it/s]

`

AttributeError: 'NoneType' object has no attribute '_free_weak_ref'

`Training start...

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss

0%| | 0/82 [00:00<?, ?it/s] /home/jack/anaconda3/lib/python3.9/site-packages/torch/functional.py:568: 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:2228.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
0/99 1.868 1.227 5.353 2.089: 100%|██████████| 82/82 [00:4
Inferencing model in val datasets.: 100%|███████| 18/18 [00:16<00:00, 1.08it/s]

Evaluating speed.

Evaluating mAP by pycocotools.
Saving ./runs/train/exp/predictions.json...
loading annotations into memory...
Done (t=0.03s)
creating index...
index created!
Loading and preparing results...
ERROR in evaluate and save model.
ERROR in training loop or eval/save model.

Training completed in 0.017 hours.
Traceback (most recent call last):
File "/home/jack/data1/project/yolov6_0625/tools/train.py", line 87, in
main(args)
File "/home/jack/data1/project/yolov6_0625/tools/train.py", line 77, in main
trainer.train()
File "/home/jack/data1/project/yolov6_0625/yolov6/core/engine.py", line 62, in train
self.train_in_loop()
File "/home/jack/data1/project/yolov6_0625/yolov6/core/engine.py", line 81, in train_in_loop
self.eval_and_save()
File "/home/jack/data1/project/yolov6_0625/yolov6/core/engine.py", line 107, in eval_and_save
self.eval_model()
File "/home/jack/data1/project/yolov6_0625/yolov6/core/engine.py", line 126, in eval_model
results = eval.run(self.data_dict,
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/jack/data1/project/yolov6_0625/tools/eval.py", line 76, in run
eval_result = val.eval_model(pred_result, model, dataloader, task)
File "/home/jack/data1/project/yolov6_0625/yolov6/core/evaler.py", line 129, in eval_model
pred = anno.loadRes(pred_json)
File "/home/jack/anaconda3/lib/python3.9/site-packages/pycocotools/coco.py", line 327, in loadRes
assert set(annsImgIds) == (set(annsImgIds) & set(self.getImgIds())),
AssertionError: Results do not correspond to current coco set
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
Exception ignored in: <function StorageWeakRef.del at 0x7fc22ad3d790>
Traceback (most recent call last):
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/multiprocessing/reductions.py", line 36, in del
File "/home/jack/anaconda3/lib/python3.9/site-packages/torch/storage.py", line 520, in _free_weak_ref
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
`

训练时报目录问题

Traceback (most recent call last):
File "/home/jack/data1/project/yolov6_0625/tools/train.py", line 14, in
from yolov6.core.engine import Trainer
File "/home/jack/data1/project/yolov6_0625/yolov6/core/engine.py", line 16, in
import tools.eval as eval
ModuleNotFoundError: No module named 'tools.eval'
Traceback (most recent call last):
File "/home/jack/data1/project/yolov6_0625/tools/train.py", line 14, in
from yolov6.core.engine import Trainer
File "/home/jack/data1/project/yolov6_0625/yolov6/core/engine.py", line 16, in
import tools.eval as eval
ModuleNotFoundError: No module named 'tools.eval'
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 18950) of binary: /home/jack/anaconda3/bin/python

Low precision & recall in WIDER FACE Dataset

When I run train.py to training a face detector by WIDER FACE dataset.
the loss value is too large in epoch = 40, and Average recall & Precision also not good. (see Training Log. )

this dataset is the same format as Yolov5, and Yolov5 seems to work.
Am I missing something?

Training Log :
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.002
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.002
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.002
Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.000
Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.003
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.009
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.002
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.005
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.006
Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.003
Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.030
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.076
Epoch: 40 | [email protected]: 0.0018804609699471495 | [email protected]:0.95: 0.0016776553250671712

 Epoch  iou_loss   l1_loss  obj_loss  cls_loss
41/399     1.309    0.3974    0.8519    0.5262: 100%|██████████| 402/402 [02

AssertionError: Results do not correspond to current coco set

I use the following code for training
python tools/train.py --batch 4 --conf configs/yolov6s.py --data ./data/coco.yaml --device 0 --workers 0
But this mistake happened during the val
AssertionError: Results do not correspond to current coco set
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.