1. How
- 参考这篇博客
- launch.json内容如下
-
{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "region", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/darknet", "args": ["detector", "train", "${workspaceFolder}/data/candle.data", "${workspaceFolder}/cfg/candle11-tr.cfg", "${workspaceFolder}/yolov2-tiny.conv.11"], "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], "externalConsole": false, "MIMode": "gdb", "preLaunchTask": "make", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ] } ]}
-
- 修改Makefile,在CFLAGS最后加-g
2. 训练流程
darknet.c调用detector.c的run_detector- run_detector调用train_detector
- train_detector调用
parser.c的parse_network_cfg,实际调用parse_network_cfg_custom- parse_network_cfg_custom调用解析网络层的函数,以region层为例,调用parse_region
- parse_region调用
region_layer.c的make_region_layer,并设置anchor
- train_detector调用
data.c的load_data - train_detector调用
network.c的train_network_waitkey(只用1个GPU时)- train_network_waitkey调用train_network_datum
- train_network_datum调用forward_network和backward_network
- train_detector调用validate_detector_map(需要的时候)
本文详细介绍使用Darknet进行目标检测训练的配置方法与具体流程,包括launch.json文件的设置,Makefile中CFLAGS参数的调整,以及从darknet.c到train_network_datum的完整调用过程。
3061

被折叠的 条评论
为什么被折叠?



