日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

【camera】YOLOV7实现实例分割+目标检测任务(训练、测试、量化、部署)

發布時間:2023/11/27 生活经验 22 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【camera】YOLOV7实现实例分割+目标检测任务(训练、测试、量化、部署) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

【camera】YOLOV7實現實例分割+目標檢測任務


代碼下載地址

訓練、測試、量化、部署代碼

訓練

For training, quite simple, same as detectron2:

python train_net.py --config-file configs/coco/darknet53.yaml --num-gpus 8

If you want train YOLOX, you can using config file configs/coco/yolox_s.yaml. All support arch are:

  • YOLOX: anchor free yolo;
  • YOLOv7: traditional yolo with some explorations, mainly focus on loss experiments;
  • YOLOv7P: traditional yolo merged with decent arch from YOLOX;
  • YOLOMask: arch do detection and segmentation at the same time (tbd);
  • YOLOInsSeg: instance segmentation based on YOLO detection (tbd);

Demo

Run a quick demo would be like:

python3 demo.py --config-file configs/wearmask/darknet53.yaml --input ./datasets/wearmask/images/val2017 --opts MODEL.WEIGHTS output/model_0009999.pth

Run SparseInst:

python demo.py --config-file configs/coco/sparseinst/sparse_inst_r50vd_giam_aug.yaml --video-input ~/Movies/Videos/86277963_nb2-1-80.flv -c 0.4 --opts MODEL.WEIGHTS weights/sparse_inst_r50vd_giam_aug_8bc5b3.pth

an update based on detectron2 newly introduced LazyConfig system, run with a LazyConfig model using:

python3 demo_lazyconfig.py --config-file configs/new_baselines/panoptic_fpn_regnetx_0.4g.py --opts train.init_checkpoint=output/model_0004999.pth

預訓練模型

modelbackboneinputaugAPvalAPFPSweights
SparseInstR-50640?32.8-44.3model
SparseInstR-50-vd640?34.1-42.6model
SparseInst (G-IAM)R-50608?33.4-44.6model
SparseInst (G-IAM)R-50608?34.234.744.6model
SparseInst (G-IAM)R-50-DCN608?36.436.841.6model
SparseInst (G-IAM)R-50-vd608?35.636.142.8model
SparseInst (G-IAM)R-50-vd-DCN608?37.437.940.0model
SparseInst (G-IAM)R-50-vd-DCN640?37.738.139.3model

部署

  1. detr:
python export_onnx.py --config-file detr/config/file

this works has been done, inference script included inside tools.

  1. AnchorDETR:

anchorDETR also supported training and exporting to ONNX.

效果

Here is a dedicated performance compare with other packages.

tbd.

支持的任務列表

  • YOLOv4 contained with CSP-Darknet53;
  • YOLOv7 arch with resnets backbone;
  • YOLOv7 arch with resnet-vd backbone (likely as PP-YOLO), deformable conv, Mish etc;
  • GridMask augmentation from PP-YOLO included;
  • Mosiac transform supported with a custom datasetmapper;
  • YOLOv7 arch Swin-Transformer support (higher accuracy but lower speed);
  • YOLOv7 arch Efficientnet + BiFPN;
  • YOLOv5 style positive samples selection, new coordinates coding style;
  • RandomColorDistortion, RandomExpand, RandomCrop, RandomFlip;
  • CIoU loss (DIoU, GIoU) and label smoothing (from YOLOv5 & YOLOv4);
  • YOLOF also included;
  • YOLOv7 Res2net + FPN supported;
  • Pyramid Vision Transformer v2 (PVTv2) supported;
  • WBF (Weighted Box Fusion), this works better than NMS, link;
  • YOLOX like head design and anchor design, also training support;
  • YOLOX s,m,l backbone and PAFPN added, we have a new combination of YOLOX backbone and pafpn;
  • YOLOv7 with Res2Net-v1d backbone, we found res2net-v1d have a better accuracy then darknet53;
  • Added PPYOLOv2 PAN neck with SPP and dropblock;
  • YOLOX arch added, now you can train YOLOX model (anchor free yolo) as well;
  • DETR: transformer based detection model and onnx export supported, as well as TensorRT acceleration;
  • AnchorDETR: Faster converge version of detr, now supported!

what’s more, there are some features awesome inside repo:

  • Almost all models can export to onnx;
  • Supports TensorRT deployment for DETR and other transformer models;
  • It will integrate with wanwu, a torch-free deploy framework run fastest on your target platform.

Help wanted! If you have spare time or if you have GPU card, then help YOLOv7 become more stronger! Here is the guidance of contribute:

  1. Claim task: I have some ideas but do not have enough time to do it, if you want implement it, claim the task, I will give u fully advise on how to do, and you can learn a lot from it;
  2. Test mAP: When you finished new idea implementation, create a thread to report experiment mAP, if it work, then merge into our main master branch;
  3. Pull request: YOLOv7 is open and always tracking on SOTA and light models, if a model is useful, we will merge it and deploy it, distribute to all users want to try.

Here are some tasks need to be claimed:

  • VAN: Visual Attention Network, paper, VAN-Segmentation, it was better than Swin and PVT and DeiT:
    • D2 VAN backbone integration;
    • Test with YOLOv7 arch;
  • ViDet: code, this provides a realtime detector based on transformer, Swin-Nano mAP: 40, while 20 FPS, it can be integrated into YOLOv7;
    • Integrate into D2 backbone, remove MSAtten deps;
    • Test with YOLOv7 or DETR arch;
  • DINO: 63.3mAP highest in 2022 on coco. https://github.com/IDEACVR/DINO
    • waiting for DINO opensource code.
  • ConvNext: https://github.com/facebookresearch/ConvNeXt, combined convolution and transformer.

總結

以上是生活随笔為你收集整理的【camera】YOLOV7实现实例分割+目标检测任务(训练、测试、量化、部署)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。