This commit is contained in:
we0091234
2022-12-04 22:25:41 +08:00
parent 4742610b03
commit 600f8dd14e
3 changed files with 97 additions and 1 deletions

3
.gitignore vendored
View File

@@ -27,4 +27,5 @@ mytest/
!*.png
!*.yaml
!*.ttf
!*.txt
!*.txt
!*.md

68
README.md Normal file
View File

@@ -0,0 +1,68 @@
## 车辆识别系统
**目前支持车辆检测+车牌检测识别**
环境要求: python >=3.6 pytorch >=1.7
#### **图片测试demo:**
```
python Car_recognition.py --detect_model weights/detect.pt --rec_model weights/plate_rec.pth --image_path imgs --output result
```
测试文件夹imgs结果保存再 result 文件夹中
![Image text](image/single_blue.jpg)
## **检测训练**
1. **下载数据集:** [datasets](https://pan.baidu.com/s/1xa6zvOGjU02j8_lqHGVf0A) 提取码pi6c 数据从CCPD和CRPD数据集中选取并转换的
数据集格式为yolo格式
```
label x y w h pt1x pt1y pt2x pt2y pt3x pt3y pt4x pt4y
```
关键点依次是(左上,右上,右下,左下)
坐标都是经过归一化x,y是中心点除以图片宽高w,h是框的宽高除以图片宽高ptxpty是关键点坐标除以宽高
车辆标注不需要关键点 关键点全部置为-1即可
2. **修改 data/widerface.yaml train和val路径,换成你的数据路径**
```
train: /your/train/path #修改成你的路径
val: /your/val/path #修改成你的路径
# number of classes
nc: 3 #这里用的是3分类0 单层车牌 1 双层车牌 2 车辆
# class names
names: [ 'single_plate','double_plate','Car']
```
3. **训练**
```
python3 train.py --data data/plateAndCar.yaml --cfg models/yolov5n-0.5.yaml --weights weights/detect.pt --epoch 250
```
结果存在run文件夹中
## **车牌识别训练**
车牌识别训练链接如下:
[车牌识别训练](https://github.com/we0091234/crnn_plate_recognition)
## References
* [https://github.com/we0091234/Chinese_license_plate_detection_recognition](https://github.com/we0091234/Chinese_license_plate_detection_recognition)
* [https://github.com/deepcam-cn/yolov5-face](https://github.com/deepcam-cn/yolov5-face)
* [https://github.com/meijieru/crnn.pytorch](https://github.com/meijieru/crnn.pytorch)
## TODO
车型,车辆颜色,品牌等。
## 联系
**有问题可以提issues 或者加qq群:871797331 询问**

View File

@@ -0,0 +1,27 @@
# WiderFace-Evaluation
Python Evaluation Code for [Wider Face Dataset](http://mmlab.ie.cuhk.edu.hk/projects/WIDERFace/)
## Usage
##### before evaluating ....
````
python3 setup.py build_ext --inplace
````
##### evaluating
**GroungTruth:** `wider_face_val.mat`, `wider_easy_val.mat`, `wider_medium_val.mat`,`wider_hard_val.mat`
````
python3 evaluation.py -p <your prediction dir> -g <groud truth dir>
````
## Bugs & Problems
please issue
## Acknowledgements
some code borrowed from Sergey Karayev