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

guomoucode/FCOS-Traffic-Object-Detection

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 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.

Time: 2022.1.1 - 2022.4.30

1 任务简述

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

完成进度:

  • 数据集 ./data

    • kitti.py

    • bdd100k.py

    • 数据变换 transform.py

    • 数据打包 collate.py

  • 模型 ./models

    • ./backbones

    • ./necks

    • ./layers

    • head.py

    • fcos.py

    • 训练目标 target.py

    • 损失函数 loss.py

    • 检测后处理 detect.py

  • 工具 ./tools

    • 评估 eval.py

    • 训练 train.py

    • 测试 test.py

    • 推理 inference.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

  • 回归损失:GIoU 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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%