Skip to content

Training FCOS on KITTI and BDD100K datasets for real-time traffic object detection with PyTorch.

Notifications You must be signed in to change notification settings

chenzpstar/FCOS-Traffic-Object-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Traffic Object Detection with FCOS

This project is for personal study and under development, please click 'watch' or 'star' my repo and check back later if you are interested in it.

1 任务简述

主要任务:在交通场景下,实现对道路目标(车辆和行人)的实时检测。

目录结构:

FCOS
├── configs 配置
|   ├── kitti_config.py
|   └── bdd100k_config.py
├── data 数据
|   ├── kitti.py
|   ├── bdd100k.py
|   ├── transform.py 数据变换
|   └── collate.py 数据打包
├── models 模型
|   ├── backbones 特征提取网络
|   |   ├── vgg.py
|   |   ├── resnet.py
|   |   ├── darknet.py
|   |   ├── mobilenet.py
|   |   ├── shufflenet.py
|   |   └── efficientnet.py
|   ├── necks 特征融合网络
|   |   ├── fpn.py
|   |   ├── pan.py
|   |   └── bifpn.py
|   ├── layers 网络模块
|   |   ├── conv.py
|   |   ├── spp.py
|   |   ├── aspp.py
|   |   ├── se.py
|   |   └── cbam.py
|   ├── head.py 检测网络
|   ├── target.py 训练目标
|   ├── loss.py 损失函数
|   ├── detect.py 检测后处理
|   └── fcos.py 完整网络
└── tools 工具
    ├── train.py 训练
    ├── test.py 测试
    ├── eval.py 评估
    ├── infer.py 推理
    └── demo.py 演示

2 模型

本项目基于Anchor-Free的FCOS算法构建模型。

论文:https://arxiv.org/pdf/2006.09214.pdf

代码:https://github.com/tianzhi0549/FCOS

2.1 网络架构

FCOS

2.2 训练目标

  • 分类目标

    正样本:

    负样本:

  • 回归目标

  • 中心度目标

2.3 损失函数

  • 总损失

  • 分类损失:Focal Loss

  • 回归损失:IoU Loss

  • 中心度损失:BCE Loss

3 数据集

本项目基于公开的KITTI和BDD100K数据集训练模型。

3.1 KITTI数据集

官网:http://www.cvlibs.net/datasets/kitti/index.php

论文:http://www.cvlibs.net/publications/Geiger2013IJRR.pdf

目录结构:

kitti
├── training
|   ├── image_2
|   |   ├── 000000.png
|   |   └── ...
|   └── label_2
|       ├── 000000.txt
|       └── ...
└── testing
    └── image_2
        └── ...

统计信息:

  • 类别数:8

  • 类别名称:Car, Van, Truck, Pedestrian, Person_sitting, Cyclist, Tram, Misc

  • 场景:City, Residential, Road, Campus, Person

  • 训练集图片数:7481

  • 测试集图片数:7518

  • 图片分辨率:1224x370、1238x374、1242x375、1241x376

  • 图片宽高比:3.3:1

3.2 BDD100K数据集

官网:https://bdd-data.berkeley.edu/

文档:https://doc.bdd100k.com/

论文:https://arxiv.org/pdf/1805.04687.pdf

目录结构:

bdd100k
├── images
|   └── 100k
|       ├── train
|       |   ├── 0000f77c-6257be58.jpg
|       |   └── ...
|       ├── val
|       |   └── ...
|       └── test
|           └── ...
└── labels
    └── 100k
        ├── train
        |   ├── 0000f77c-6257be58.json
        |   └── ...
        └── val
            └── ...

统计信息:

statistics

  • 类别数:10

  • 类别名称:Bus, Light, Sign, Person, Bike, Truck, Motor, Car, Train, Rider

  • 时间:Dawn/Dusk, Daytime, Night

  • 天气:Clear, Partly Cloudy, Overcast, Rainy, Snowy, Foggy

  • 场景:Residential, Highway, City Street, Parking Lot, Gas Stations, Tunnel

  • 训练集图片数:70k (137张缺少标注)

  • 验证集图片数:10k

  • 测试集图片数:20k

  • 图片分辨率:1280x720

  • 图片宽高比:1.78:1

4 评价指标

本项目基于准确性和实时性指标评价算法性能。

4.1 准确性指标

  • 交并比

  • 混淆矩阵

    pred \ label P N
    P TP FP
    N FN TN
  • 精度

  • 召回率

  • F1分数

  • 平均精度

  • 平均精度均值

4.2 实时性指标

  • 帧率

  • 推理时间

About

Training FCOS on KITTI and BDD100K datasets for real-time traffic object detection with PyTorch.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages