load .txt to train YOLOX, same as Yolo others

Overview

YOLOX train your data

you need generate data.txt like follow format (per line-> one image).

prepare one data.txt like this:


img_path1 x1,y1,x2,y2,class_id x1,y1,x2,y2,class_id2

img_path2 x1,y1,x2,y2,class_id

img_path3 ..........

note:


x1,y1,x2,y2 is int type and it belong to 0-img_w ,0-img_h, not 0~1 !!!

img_path is abs path ;must be careful the sign " " and "," in data.txt, there was an example:

/home/sal/images/000010.jpg 0,190,466,516,1

/home/sal/images/000011.jpg 284,548,458,851,7 256,393,369,608,1

Train

i.step1 , before train,you need change yolox/exp/yolox_base.py follow you need, i add some explain in it. such as change data.txt path in it.
ii.step2 , change train.py params, just as https://github.com/Megvii-BaseDetection/YOLOX.git ,when you have changed , just run : python train.py

iii. star

You might also like...
YOLOX + ROS(1, 2) object detection package
YOLOX + ROS(1, 2) object detection package

YOLOX + ROS(1, 2) object detection package

yolox_backbone is a deep-learning library and is a collection of YOLOX Backbone models.
yolox_backbone is a deep-learning library and is a collection of YOLOX Backbone models.

YOLOX-Backbone yolox-backbone is a deep-learning library and is a collection of YOLOX backbone models. Install pip install yolox-backbone Load a Pret

A set of tools for converting a darknet dataset to COCO format working with YOLOX

darknet格式数据→COCO darknet训练数据目录结构(详情参见dataset/darknet): darknet ├── class.names ├── gen_config.data ├── gen_train.txt ├── gen_valid.txt └── images

FairMOT for Multi-Class MOT using YOLOX as Detector

FairMOT-X Project Overview FairMOT-X is a multi-class multi object tracker, which has been tailored for training on the BDD100K MOT Dataset. It makes

YOLOX Win10 Project
YOLOX Win10 Project

Introduction 这是一个用于Windows训练YOLOX的项目,相比于官方项目,做了一些适配和修改: 1、解决了Windows下import yolox失败,No such file or directory: 'xxx.xml'等路径问题 2、CUDA out of memory等显存不

YOLOX-RMPOLY
YOLOX-RMPOLY

本算法为适应robomaster比赛,而改动自矩形识别的yolox算法。 基于旷视科技YOLOX,实现对不规则四边形的目标检测 TODO 修改onnx推理模型 更改/添加标注: 1.yolox/models/yolox_polyhead.py: 1.1继承yolox/models/yolo_

The backbone CSPDarkNet of YOLOX.

YOLOX-Backbone The backbone CSPDarkNet of YOLOX. In this project, you can enjoy: CSPDarkNet-S CSPDarkNet-M CSPDarkNet-L CSPDarkNet-X CSPDarkNet-Tiny C

Deep learning operations reinvented (for pytorch, tensorflow, jax and others)
Deep learning operations reinvented (for pytorch, tensorflow, jax and others)

This video in better quality. einops Flexible and powerful tensor operations for readable and reliable code. Supports numpy, pytorch, tensorflow, and

Unofficial pytorch implementation for Self-critical Sequence Training for Image Captioning. and others.

An Image Captioning codebase This is a codebase for image captioning research. It supports: Self critical training from Self-critical Sequence Trainin

Comments
  • Couldn't open shared file mapping. 训练可以跑起来,但是训练到某个epoch后就会报错?

    Couldn't open shared file mapping. 训练可以跑起来,但是训练到某个epoch后就会报错?

    2021-09-01 12:38:19 | INFO | yolox.core.trainer:238 - epoch: 195/1000, iter: 30/39, mem: 8765Mb, iter_time: 0.850s, data_time: 0.002s, total_loss: 3.8, iou_loss: 1.9, l1_loss: 0.0, conf_loss: 1.3, cls_loss: 0.6, lr: 1.143e-03, size: 544, ETA: 6:15:26 2021-09-01 12:38:26 | INFO | yolox.core.trainer:308 - Save weights to ./YOLOX_outputs\yolox_base 50%|##### | 5/10 [00:06<00:06, 1.31s/it] 2021-09-01 12:38:34 | INFO | yolox.core.trainer:184 - Training of experiment is done and the best AP is 26.95 2021-09-01 12:38:34 | ERROR | yolox.core.launch:68 - An error has been caught in function 'launch', process 'MainProcess' (5316), thread 'MainThread' (21196): Traceback (most recent call last):

    File "F:/projection/YOLOX-train-your-data\train.py", line 114, in launch( └ <function launch at 0x0000014EDE632D30>

    File "F:\projection\YOLOX-train-your-data\yolox\core\launch.py", line 68, in launch main_func(*args) │ └ (╒══════════════════╤════════════════════════════════════════════════════════════════════════════════════════════════════════... └ <function main at 0x0000014EDEE7D9D0>

    File "F:/projection/YOLOX-train-your-data\train.py", line 102, in main trainer.train() │ └ <function Trainer.train at 0x0000014EDCE4E820> └ <yolox.core.trainer.Trainer object at 0x0000014EDEE82E50>

    File "F:\projection\YOLOX-train-your-data\yolox\core\trainer.py", line 70, in train self.train_in_epoch() │ └ <function Trainer.train_in_epoch at 0x0000014EDCE615E0> └ <yolox.core.trainer.Trainer object at 0x0000014EDEE82E50>

    File "F:\projection\YOLOX-train-your-data\yolox\core\trainer.py", line 80, in train_in_epoch self.after_epoch() │ └ <function Trainer.after_epoch at 0x0000014EDCE6A1F0> └ <yolox.core.trainer.Trainer object at 0x0000014EDEE82E50>

    File "F:\projection\YOLOX-train-your-data\yolox\core\trainer.py", line 211, in after_epoch self.evaluate_and_save_model() │ └ <function Trainer.evaluate_and_save_model at 0x0000014EDCE6A4C0> └ <yolox.core.trainer.Trainer object at 0x0000014EDEE82E50>

    File "F:\projection\YOLOX-train-your-data\yolox\core\trainer.py", line 294, in evaluate_and_save_model ap50_95, ap50, summary = self.exp.eval(evalmodel, self.evaluator, self.is_distributed) │ │ │ │ │ │ │ └ False │ │ │ │ │ │ └ <yolox.core.trainer.Trainer object at 0x0000014EDEE82E50> │ │ │ │ │ └ <yolox.evaluators.voc_evaluator.VOCEvaluator object at 0x0000014EFEB8FE20> │ │ │ │ └ <yolox.core.trainer.Trainer object at 0x0000014EDEE82E50> │ │ │ └ YOLOX( │ │ │ (backbone): YOLOPAFPN( │ │ │ (backbone): CSPDarknet( │ │ │ (stem): Focus( │ │ │ (conv): BaseConv( │ │ │ (conv): ... │ │ └ <function Exp.eval at 0x0000014EDEE81D30> │ └ ╒══════════════════╤═════════════════════════════════════════════════════════════════════════════════════════════════════════... └ <yolox.core.trainer.Trainer object at 0x0000014EDEE82E50>

    File "F:\projection\YOLOX-train-your-data\yolox\exp\yolox_base.py", line 242, in eval return evaluator.evaluate(model, is_distributed, half) │ │ │ │ └ False │ │ │ └ False │ │ └ YOLOX( │ │ (backbone): YOLOPAFPN( │ │ (backbone): CSPDarknet( │ │ (stem): Focus( │ │ (conv): BaseConv( │ │ (conv): ... │ └ <function VOCEvaluator.evaluate at 0x0000014EDCE568B0> └ <yolox.evaluators.voc_evaluator.VOCEvaluator object at 0x0000014EFEB8FE20>

    File "F:\projection\YOLOX-train-your-data\yolox\evaluators\voc_evaluator.py", line 82, in evaluate for cur_iter, (imgs, _, info_imgs, ids) in enumerate(progress_bar(self.dataloader)): │ │ │ │ │ │ │ └ <torch.utils.data.dataloader.DataLoader object at 0x0000014EFEB8FBE0> │ │ │ │ │ │ └ <yolox.evaluators.voc_evaluator.VOCEvaluator object at 0x0000014EFEB8FE20> │ │ │ │ │ └ <class 'tqdm.std.tqdm'> │ │ │ │ └ tensor([32, 33, 34, 35, 36, 37, 38, 39]) │ │ │ └ [tensor([393, 207, 301, 252, 349, 369, 389, 293]), tensor([482, 195, 547, 320, 471, 627, 577, 421])] │ │ └ tensor([[[0., 0., 0., 0., 0.]], │ │
    │ │ [[0., 0., 0., 0., 0.]], │ │
    │ │ [[0., 0., 0., 0., 0.]], │ │
    │ │ [[0., 0., 0., 0., ... │ └ tensor([[[[-1.0048, -0.9877, -0.9705, ..., -0.1657, -0.1657, -0.1657], │ [-1.0048, -0.9877, -0.9705, ..., -0.1657, ... └ 4

    File "E:\Anaconda3\envs\pytorch_gpu\lib\site-packages\tqdm\std.py", line 1185, in iter for obj in iterable: │ └ <torch.utils.data.dataloader.DataLoader object at 0x0000014EFEB8FBE0> └ [tensor([[[[-1.0048, -0.9877, -0.9705, ..., -0.1657, -0.1657, -0.1657], [-1.0048, -0.9877, -0.9705, ..., -0.1657,...

    File "E:\Anaconda3\envs\pytorch_gpu\lib\site-packages\torch\utils\data\dataloader.py", line 521, in next data = self._next_data() │ └ <function _MultiProcessingDataLoaderIter._next_data at 0x0000014EDE23E310> └ <torch.utils.data.dataloader._MultiProcessingDataLoaderIter object at 0x0000014EFB738D30>

    File "E:\Anaconda3\envs\pytorch_gpu\lib\site-packages\torch\utils\data\dataloader.py", line 1183, in _next_data return self._process_data(data) │ │ └ <torch._utils.ExceptionWrapper object at 0x0000014EF348CC40> │ └ <function _MultiProcessingDataLoaderIter._process_data at 0x0000014EDE23E430> └ <torch.utils.data.dataloader._MultiProcessingDataLoaderIter object at 0x0000014EFB738D30>

    File "E:\Anaconda3\envs\pytorch_gpu\lib\site-packages\torch\utils\data\dataloader.py", line 1229, in _process_data data.reraise() │ └ <function ExceptionWrapper.reraise at 0x0000014ED88BA8B0> └ <torch._utils.ExceptionWrapper object at 0x0000014EF348CC40>

    File "E:\Anaconda3\envs\pytorch_gpu\lib\site-packages\torch_utils.py", line 425, in reraise raise self.exc_type(msg) │ │ └ 'Caught RuntimeError in DataLoader worker process 1.\nOriginal Traceback (most recent call last):\n File "E:\Anaconda3\env... │ └ <class 'RuntimeError'> └ <torch._utils.ExceptionWrapper object at 0x0000014EF348CC40>

    RuntimeError: Caught RuntimeError in DataLoader worker process 1. Original Traceback (most recent call last): File "E:\Anaconda3\envs\pytorch_gpu\lib\site-packages\torch\utils\data_utils\worker.py", line 287, in _worker_loop data = fetcher.fetch(index) File "E:\Anaconda3\envs\pytorch_gpu\lib\site-packages\torch\utils\data_utils\fetch.py", line 47, in fetch return self.collate_fn(data) File "E:\Anaconda3\envs\pytorch_gpu\lib\site-packages\torch\utils\data_utils\collate.py", line 84, in default_collate return [default_collate(samples) for samples in transposed] File "E:\Anaconda3\envs\pytorch_gpu\lib\site-packages\torch\utils\data_utils\collate.py", line 84, in return [default_collate(samples) for samples in transposed] File "E:\Anaconda3\envs\pytorch_gpu\lib\site-packages\torch\utils\data_utils\collate.py", line 54, in default_collate storage = elem.storage()._new_shared(numel) File "E:\Anaconda3\envs\pytorch_gpu\lib\site-packages\torch\storage.py", line 155, in _new_shared return cls._new_using_filename(size) RuntimeError: Couldn't open shared file mapping: <0000016B6A0EC302>, error code: <1455>

    opened by fpan98 1
Owner
LiMingf
Poor research
LiMingf
YOLOX-CondInst - Implement CondInst which is a instances segmentation method on YOLOX

YOLOX CondInst -- YOLOX 实例分割 前言 本项目是自己学习实例分割时,复现的代码. 通过自己编程,让自己对实例分割有更进一步的了解。 若想

DDGRCF 16 Nov 18, 2022
Yolox-bytetrack-sample - Python sample of MOT (Multiple Object Tracking) using YOLOX and ByteTrack

yolox-bytetrack-sample YOLOXとByteTrackを用いたMOT(Multiple Object Tracking)のPythonサン

KazuhitoTakahashi 12 Nov 9, 2022
YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with ONNX, TensorRT, ncnn, and OpenVINO supported.

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 ind

null 7.7k Jan 3, 2023
a Pytorch easy re-implement of "YOLOX: Exceeding YOLO Series in 2021"

A pytorch easy re-implement of "YOLOX: Exceeding YOLO Series in 2021" 1. Notes This is a pytorch easy re-implement of "YOLOX: Exceeding YOLO Series in

null 91 Dec 26, 2022
LF-YOLO (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 http

null 26 Dec 13, 2022
Yolo ros - YOLO-ROS for HUAWEI ATLAS200

YOLO-ROS YOLO-ROS for NVIDIA YOLO-ROS for HUAWEI ATLAS200, please checkout for b

ChrisLiu 5 Oct 18, 2022
Yolo object detection - Yolo object detection with python

How to run download required files make build_image make download Docker versio

null 3 Jan 26, 2022
using yolox+deepsort for object-tracker

YOLOX_deepsort_tracker yolox+deepsort实现目标跟踪 最新的yolox尝尝鲜~~(yolox正处在频繁更新阶段,因此直接链接yolox仓库作为子模块) Install Clone the repository recursively: git clone --rec

null 245 Dec 26, 2022
MegEngine implementation of YOLOX

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 ind

旷视天元 MegEngine 77 Nov 22, 2022