Coder Social home page Coder Social logo

wangtao2668129173 / yolo3_keras_flag_detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zzzzzzxxxx/yolo3_keras_flag_detection

0.0 0.0 0.0 2.74 MB

【目标识别】yolo3_keras旗帜识别&&训练自己数据

License: MIT License

Python 100.00%

yolo3_keras_flag_detection's Introduction

部分实验效果(图片来着百度图片爬取)

Image text Image text Image text Image text

本项目里有40类旗帜

Image text

快速开始

1. 下载本项目预训练 权重

  • 权重1
https://pan.baidu.com/s/1X08Mj2owTcOJQfsBEpf0YA
  • 权重2
https://pan.baidu.com/s/1MIBU41gW1x7aqgQhwglAcw

2. 修改yolo.py中第24行权重路径

3. 将需要检测旗帜图片放入sample文件夹中

4. 运行检测

python yolo_images.py

训练

训练自己的数据 无需使用 预训练的权重 (此方法适用于各类数据)

step 1

  • 使用labelImg对数据进行标记
  • 得到xml文件,放置于./model_data/label_train/将图片数据放在于./model_data/train/ (建议图片宽高大于416,不然影响训练)
  • 将数据类别写入my_classes.txt中(本项目中name_classes.txt为自定义文件,因为数据标记时,标记的为类别id,为了方便检测时直接输出类别,自己数据预测时将yolo.py中的classes_path修改为自己的)

step 2

  • 执行xml_to_data.py 生成 kitti_simple_label.txt
python xml_to_data.py

step 3

  • k-means 聚类算法生成对应自己样本的 anchor box 尺寸 生成 my_anchors.txt
python kmeans.py

step 4

  • 开始训练(建议epochs大于500,如果内存溢出可减小batch_size。其他参数,按照自己数据,自行修改。)
python train.py

数据集提供

  • 旗帜(包含40个种类旗帜),数据来着于网络,数据标注是个苦力活,本数据包含1600多张图片,花费接近一个星期标注完成,且用且珍惜!!!
链接:https://pan.baidu.com/s/1sgDehVpMUrXb3AHceTimfA  密码:pgmn
  • 直接将两个文件夹放置于model_data下

项目环境依赖

tensorflow                         1.13.1    
Keras                              2.2.4  
h5py                               2.8.0 
opencv-python                      4.0.0.21  
numpy                              1.16.2  
Anaconda3

yolo3_keras_flag_detection's People

Contributors

zzzzzzxxxx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.