Implement mosaic image augmentation with YOLO format

This is an implementation for mosaic image augmention with YOLO format Run code to perform mosaic augmentation: python main.py –width 800 –height 800 –scale_x 0.4 –scale_y 0.6 –min_area 500 –min_vi 0.3 You can change parameters to fit with your dataset. To know details about arguments in the command above, run –width: width of mosaic-augmented image –height: height of mosaic-augmented image –scale_x: scale_x – scale by width => define width of the top left image –scale_y: scale_y – scale by height […]

Read more

A drowsiness detection based on YOLOv5 implementation

This repository consists of a drowsiness detection based on YOLOv5 implementation. You can reach the base repo here 1. Prepared Custom Data Set A custom data set was prepared for this project. Videos were taken from 21 different people in scenarios that could happen while driving. Three different categories were discussed in these videos: normal, yawning and head position. Various light conditions and the use of glasses were taken into account. A total of 63 videos were obtained and labeling […]

Read more

The backbone CSPDarkNet of YOLOX

The backbone CSPDarkNet of YOLOX. In this project, you can enjoy: CSPDarkNet-S CSPDarkNet-M CSPDarkNet-L CSPDarkNet-X CSPDarkNet-Tiny CSPDarkNet-Nano As far as I know, it is difficult for many researchers to train YOLOv5 or YOLOX from scratch because they, including me, do not have sufficient computing resources. Therefore, a pre-trained backbone is still important. In addition, since YOLOv5 and YOLOX are excellent object detectors, their backbones theoretically perform better than imagenet pretrained weights. Therefore, based on the above two reasons, I deliberately […]

Read more

Yolo object detection with python

download required files make build_image make download Docker version install dockerhttps://docs.docker.com/desktop/mac/install/ build image to run object detection run with docker image # make run.simple {target-file} {output-file-name} make run.simple FILENAME=data/kite.jpg OUTPUTFILENAME=kite_observed.jpg conda version install conda https://ikaros79.tistory.com/entry/Mac%EC%97%90%EC%84%9C-%EC%95%84%EB%82%98%EC%BD%98%EB%8B%A4-%EC%84%A4%EC%B9%98%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95 build conda env make conda.build.env run virtual environment conda activate yolo_python run following commands image #python detect_simple.py {image dir} {output-file-name} python detect_simple.py ./data/kite.jpg kite_observed.jpg video

Read more

A reproduction of YOLOX by PaddlePaddle

A reproduction of YOLOX by PaddlePaddle 数据集准备 下载COCO数据集,准备为如下路径 /home/aistudio |– COCO | |– annotions | |– train2017 | |– val2017 除了常用的图像处理库,需要安装额外的包 pip install gputil==1.4.0 loguru pycocotools 进入仓库根目录,编译安装(推荐使用AIStudio) cd YOLOX-Paddle pip install -v -e . 如果使用本地机器出现编译失败,需要修改YOLOX-Paddle/yolox/layers/csrc/cocoeval/cocoeval.h中导入pybind11的include文件为本机目录,使用如下命令获取pybind11的include目录 #include #include #include #include 成功后使用pip list可看到安装模块

Read more

Plugin adapted from Ultralytics to bring YOLOv5 into Napari

Plugin adapted from Ultralytics to bring YOLOv5 into Napari. Training and detection can be done using the GUI. Training dataset must be prepared prior to using this plugin. Further development will allow users to use Napari to prepare the dataset. Follow instructions stated on Ultralytics Github to prepare the dataset. The plugin includes 3 pre-trained networks that are able to identify mitosis stages or apoptosis on soSPIM images. More details can be found on the pre-print. This napari plugin was […]

Read more

YOLOX RMPOLY For Python

本算法为适应robomaster比赛,而改动自矩形识别的yolox算法。 基于旷视科技YOLOX,实现对不规则四边形的目标检测 TODO 修改onnx推理模型 更改/添加标注: 1.yolox/models/yolox_polyhead.py: 1.1继承yolox/models/yolo_head.py YOLOXHead类,修改代码使其输出变为四点。 1.1.1修改构造函数 1.1.2修改get_output_and_grid函数,使其grid变为4对xy坐标的形式 1.1.3修改forward函数 1.1.4修改get_loses 1.1.5把自带的l1损失函数改成smoothl1,注意它自带的是算的xywh,要改成xyxyxyxy 正样本匹配策略还是依靠dynamic-k,用的是不规则四边形的最小外接矩形的iou 2.yolox/models/losses.py:(弃用) 新增PolyIOULoss类,iou是四边形的最小外接矩形iou,并新增四个坐标点的smoothl1_loss(弃用) 3.yolox/utils/boxes.py: 3.1增加order_corners函数,用于给不规则四边形的四个点排序 3.2增加minimum_outer_rect函数,用于求解四边形的最小外接矩形 3.3增加poly_adjust_box_anns函数 4.新增exps/yolox_s_rmpoly.py配置文件 5.新增yolox/exp/yolox_poly_base.py配置文件基类 6.新增yolox/data/datasets/rmpoly.py 6.1新增RMPOLYDataset类 6.1.1修改数据集读取方式,读取八点 6.1.2修改pull_item 6.1.3修改load_anno 7.yolox/data/data_augment.py 7.1新增PolyTrainTransform类,对四点数据进行数据增强(未完待续) 7.2poly_random_affine 7.2poly_apply_affine_to_bboxes 8.yolox/data/datasets/mosaicdetection.py 8.1新增PolyMosaicDetection(未完待续) 8.2_polymirror 9.yolox/models/yolox.py 9.1 YOLOX类: 为了适应yolox/models/yolox_polyhead.py中YOLOXPolyHead类的get_losses函数返回字典,修改forward函数中训练时返回值。(弃用) 可以试着把求解回归损失的smoothl1_loss改成归一化后的坐标再求损失。 Introduction YOLOX is an anchor-free version of YOLO, with a simpler design but better performance! It aims to bridge the gap between research and industrial communities.For more details, please    

Read more

Yolo algorithm for detection + centroid tracker to track vehicles

Algorithm used : Yolo algorithm for detection + centroid tracker to track vehicles Backend : opencv and python Library required: opencv = ‘4.5.4-dev’ scipy = ‘1.4.1’ IMPORTANT: I hadn’t uploaded model weights and configuration files (which were used for object detection) here because those were already available in yolo_detection repo download yolo tiny weights , config file and coco.names file from here : [https://github.com/hasit73/yolo_detection] For detection i was using same code which was available in yolo_detection repo. 1) main.py Loading […]

Read more

YOLOv5 Series Multi-backbone(TPH-YOLOv5, Ghostnet), Pruning and quantization Compression Tool Box

Update News 2021.10.30 复现TPH-YOLOv5 2021.10.31 完成替换backbone为Ghostnet Requirements 环境安装 pip install -r requirements.txt Evaluation metric Visdrone DataSet (1-5 size is 608,6-8 size is 640) Model mAP [email protected] Parameters(M) GFLOPs [email protected] YOLOv5n 13 26.2 1.78 4.2 YOLOv5s 18.4 34 7.05 15.9 YOLOv5m 21.6 37.8 20.91 48.2 YOLOv5l 23.2 39.7 46.19 108.1 YOLOv5x 24.3 40.8 86.28 204.4 YOLOv5xP2 30.00 49.29 90.96 314.2 YOLOv5xP2 CBAM 30.13 49.40 91.31 315.1 YOLOv5xP2 CBAM TPH 86.08 238.9 训练脚本实例:

Read more

Lighter and Faster YOLO is used to detect defect of X-ray weld image

This project is based on ultralytics/yolov3. LF-YOLO (Lighter and Faster YOLO) is used to detect defect of X-ray weld image. Download $ git clone https://github.com/lmomoy/LF-YOLO Train We provide multiple versions of LF-YOLO with different depths. $ python train.py –data coco.yaml –cfg LF-YOLO.yaml –weights ” –batch-size 1 LF-YOLO-1.25.yaml 1 LF-YOLO-0.75.yaml 1 LF-YOLO-0.5.yaml 1 Results We test our model on public dataset MS COCO, and it also achieves competitive results. Model size(pixels) mAPval0.5:0.95 mAPtest0.5:0.95    

Read more
1 2