Skip to content

Commit dee89d0

Browse files
committed
📝 更新文档
1 parent 855cc90 commit dee89d0

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ data/
22
.DS_Store
33

44
env/annotations/*.record
5-
env/pre-trained-models
5+
env/pre-trained-models
6+
env/exported-models

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# object-deteation-train
22
对象检测模型训练,此仓库已经集成了cocoAPI,Object deteationAPI等环境,让您开箱即用。
33

4-
>  建议在服务器上使用此镜像,因为模型训练将耗费大量时间。(It is recommended to use this mirror on the server, because the model training will consume a lot of time.)
4+
>  建议在本地使用此镜像,因为模型训练将耗费大量内存,会出现资源耗尽。(It is recommended to use this mirror on the server, because the model training will consume a lot of time.)
55
66
## dircetory
77
- .
@@ -23,7 +23,7 @@
2323

2424
### 标记对象 (Tag object)
2525
使用[labelImg](https://github.com/tzutalin/labelImg), 标注对象,并保存xml.类似于:
26-
![labelImg](https://xdtnyimg.waterbang.top/object-deteation.png)
26+
![labelImg](http://qiniu-waterbang.waterbang.top/object-deteation.png)
2727

2828
### 准备映射训练集 (Prepare the mapping training set)
2929
收集完,将其放在任意目录下,训练集和测试集都放。比例自己决定。此项目提供了两种构建方法,推荐docker hub,因为它可以让您在服务器上训练,解放您的本地资源。
@@ -47,10 +47,10 @@ docker pull waterbang/object-deteation
4747
>/Users/waterbang/Desktop/tensorflow/dog/data/images
4848
4949
```
50-
docker run -it --name object-deteation -v /Users/waterbang/Desktop/tensorflow/dog/data/images:/env/images waterbang/object-deteation:latest bash
50+
docker run -it --name object-deteation -v /root/tensorflow/images:/env/images waterbang/object-deteation:latest bash
5151
```
5252
显示如下:
53-
![tensorflow](https://xdtnyimg.waterbang.top/tensorflow-cmd.png)
53+
![tensorflow](http://qiniu-waterbang.waterbang.top/tensorflow-cmd.png)
5454

5555
> 如果您第二次进入运行:
5656
>docker exec -it object-deteation bash
@@ -163,7 +163,7 @@ eval_input_reader {
163163
`model_main_tf2.py`同级目录下运行(/env):
164164

165165
```
166-
python model_main_tf2.py --model_dir=./model/ssd_resnet50_v1_fpn --pipeline_config_path=./model/my_ssd_resnet50_v1_fpn/pipeline.config
166+
python model_main_tf2.py --model_dir=./pre-trained-models/ssd_resnet50_v1_fpn --pipeline_config_path=./model/my_ssd_resnet50_v1_fpn/pipeline.config
167167
168168
```
169169

@@ -180,6 +180,12 @@ python model_main_tf2.py --model_dir=./model/ssd_resnet50_v1_fpn --pipeline_conf
180180
## 如果遇到了错误
181181
1. 请检查脚本文件路径。
182182

183+
### 2.如果出现 Illegal instruction (core dumped)
184+
那么可能您的cpu较老,不支持AVX指令。您可以运行以下命令确认,是否有输出` -mavx -mavx2` ,如果缺少则可以确认缺少AVX支持。
185+
```
186+
grep flags -m1 /proc/cpuinfo | cut -d ":" -f 2 | tr '[:upper:]' '[:lower:]' | { read FLAGS; OPT="-march=native"; for flag in $FLAGS; do case "$flag" in "sse4_1" | "sse4_2" | "ssse3" | "fma" | "cx16" | "popcnt" | "avx" | "avx2") OPT+=" -m$flag";; esac; done; MODOPT=${OPT//_/\.}; echo "$MODOPT"; }
187+
```
188+
183189
3. 使用python3。
184190

185191

env/Python/delete_xml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ def del_files(path):
2121

2222
# test
2323
if __name__ == "__main__":
24-
path = '/Users/waterbang/Desktop/tensorflow/dog/images/test/campus'
24+
path = '/Users/waterbang/Desktop/tensorflow/dog/data/images/train/campus'
2525
del_files(path)

env/node/xml_template.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,5 @@ const xml_template = function (file){
6060
}
6161
}
6262
}
63-
module.exports = xml_template
63+
module.exports = xml_template
64+
// pre-trained-models/ssd_resnet50_v1_fpn

0 commit comments

Comments
 (0)