Skip to content

Commit 3b8141b

Browse files
YunYang1994YunYang1994
authored andcommitted
train
1 parent ec8011a commit 3b8141b

File tree

4 files changed

+11
-117273
lines changed

4 files changed

+11
-117273
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,29 +32,33 @@ $ python video_demo.py # if use camera, set video_path = 0
3232
### 3.1 quick train
3333
The purpose of this demo is to give you a glimpse of yolov3 training process. `python core/convert_tfrecord.py` to convert your imageset into tfrecords
3434
```
35-
$ python core/convert_tfrecord.py --dataset ./data/train_data/quick_train_data.txt --tfrecord_path_prefix ./data/train_data/tfrecords/quick_train_data
35+
$ python core/convert_tfrecord.py --dataset /data/train_data/quick_train_data/quick_train_data.txt --tfrecord_path_prefix /data/train_data/quick_train_data/tfrecords/quick_train_data
3636
$ python quick_train.py # start training
3737
```
38-
### 3.2 train coco dataset (continue to work)
39-
Firstly, you need to download the COCO2017 dataset from the [website](http://cocodataset.org/) and put them in the `./data/`
38+
### 3.2 train coco dataset
39+
Firstly, you need to download the COCO2017 dataset from the [website](http://cocodataset.org/) and put them in the `./data/train_data/COCO`
4040
```bashrc
41-
$ cd data/train_data
41+
$ cd data/train_data/COCO
4242
$ wget http://images.cocodataset.org/zips/train2017.zip
4343
$ unzip train2017.zip
4444
$ wget http://images.cocodataset.org/annotations/annotations_trainval2017.zip
4545
$ unzip annotations_trainval2017.zip
4646
```
4747
Then you are supposed to extract some useful information such as bounding box, category id .etc from COCO dataset and generate your own `.txt` file.
4848
```
49-
$ python core/extract_coco.py --dataset_info_path ./data/train_data/train2017.txt
49+
$ python core/extract_coco.py --dataset_info_path ./data/train_data/COCO/train2017.txt
5050
```
51-
As a result, you will get `./data/train_data/train2017.txt`. Here is an example row for one image:<br>
51+
As a result, you will get `./data/train_data/COCO/train2017.txt`. Here is an example row for one image:<br>
5252
```
5353
/home/yang/test/tensorflow-yolov3/data/train_data/train2017/000000458533.jpg 20 18.19 6.32 424.13 421.83 20 323.86 2.65 640.0 421.94
5454
/home/yang/test/tensorflow-yolov3/data/train_data/train2017/000000514915.jpg 16 55.38 132.63 519.84 380.4
5555
# image_path, category_id, x_min, y_min, x_max, y_max, category_id, x_min, y_min, ...
5656
```
57-
57+
In this step, you will convert image dataset into some `.tfrecord` which are a kind of recommended file format for Tensorflow to store your data as binary file. Then train it
58+
```
59+
$ python core/convert_tfrecord.py --dataset ./data/train_data/COCO/train2017.txt --tfrecord_path_prefix ./data/train_data/COCO/tfrecords/coco --num_tfrecords 100
60+
$ python train.py
61+
```
5862

5963
## part 4. Why it is so magical ?
6064
YOLO stands for You Only Look Once. It's an object detector that uses features learned by a deep convolutional neural network to detect an object. Although we has successfully run these codes, we must understand how YOLO works.

core/__pycache__/utils.cpython-35.pyc

0 Bytes
Binary file not shown.

data/train_data/COCO/tfrecords/put_tfrecords_here.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)