Skip to content

Commit 559428f

Browse files
committed
Reorg and error checks
1 parent ede627d commit 559428f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+3895
-6283
lines changed

README.md

+26-35
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ ____
2323

2424
### 0. Installation
2525

26-
SIMRDWN is built to execute within a docker container on a GPU-enabled machine. We use an Ubuntu 16.04 image with CUDA 9.0, python 3.6, and tensorflow-gpu version 1.13.1.
26+
SIMRDWN is built to execute within a docker container on a GPU-enabled machine. The docker command creates an Ubuntu 16.04 image with CUDA 9.0, python 3.6, and tensorflow-gpu version 1.13.1.
2727

2828
1. Clone this repository (e.g. to _/simrdwn_)
2929

3030
2. Install [nvidia-docker](https://github.com/NVIDIA/nvidia-docker)
3131

32-
3. Build docker file
32+
3. Build docker file.
3333

3434
cd /simrdwn/docker
3535
nvidia-docker build --no-cache -t simrdwn .
3636

3737
4. Spin up the docker container (see the [docker docs](https://docs.docker.com/engine/reference/commandline/run/) for options)
3838

39-
nvidia-docker run -it -v /simrdwn:/simrdwn --name simrdwn_container0 simrdwn
39+
nvidia-docker run -it -v /simrdwn://simrdwn --name simrdwn_container0 simrdwn
4040

4141
5. Compile the Darknet C program for both YOLT2 and YOLT3.
4242

@@ -58,9 +58,7 @@ Training data needs to be transformed to the YOLO format of training images in a
5858

5959
<object-class> <x> <y> <width> <height>
6060

61-
Where x, y, width, and height are relative to the image's width and height. Running a script such as _/simrdwn/core/parse\_cowc.py_ extracts training windows of reasonable size (usually 416 or 544 pixels in extent) from large labeleled images of the [COWC](https://gdo152.llnl.gov/cowc/) dataset. The script then transforms the labels corresponding to these windows into the correct format and creates a list of all training input images in _/simdwn/data/training\_list.txt_. Class integers are 0-indexex in YOLT, though they are 1-indexed in tensorflow; this can cause some confusion...
62-
63-
We also need to define the object classes with a .pbtxt file, such as _/simrdwn/data/class\_labels\_car.pbtxt_
61+
Where x, y, width, and height are relative to the image's width and height. Running a script such as _/simrdwn/data\_prep_/parse\_cowc.py_ extracts training windows of reasonable size (usually 416 or 544 pixels in extent) from large labeleled images of the [COWC](https://gdo152.llnl.gov/cowc/) dataset. The script then transforms the labels corresponding to these windows into the correct format and creates a list of all training input images in _/data/train\_data/training\_list.txt_. We also need to define the object classes with a .pbtxt file, such as _/data/training\_data/class\_labels\_car.pbtxt_. Class integers should be 1-indexed in the .pbtxt file.
6462

6563
#### 1B. Create .tfrecord (optional)
6664
If the tensorflow object detection API models are being run, we must transform the training data into the .tfrecord format. This is accomplished via the _simrdwn/core/preprocess\_tfrecords.py_ script.
@@ -83,32 +81,26 @@ Training can be run with commands such as:
8381
python /simrdwn/core/simrdwn.py \
8482
--framework ssd \
8583
--mode train \
86-
--outname inception_v2_3class_vehicles \
87-
--label_map_path /simrdwn/data/class_labels_airplane_boat_car.pbtxt \
88-
--tf_cfg_train_file /simrdwn/configs/_altered_v0/ssd_inception_v2_simrdwn.config \
89-
--train_tf_record /simrdwn/data/labels_airplane_boat_car_train.tfrecord \
84+
--outname inception_v2_cowc \
85+
--label_map_path /simrdwn/data/class_labels_car.pbtxt \
86+
--tf_cfg_train_file _altered_v0/ssd_inception_v2_simrdwn.config \
87+
--train_tf_record cowc/cowc_train.tfrecord \
9088
--max_batches 30000 \
91-
--batch_size 16 \
92-
--gpu 0
93-
89+
--batch_size 16
90+
9491
# YOLT vechicle search
9592
python /simrdwn/core/simrdwn.py \
9693
--framework yolt2 \
9794
--mode train \
98-
--outname dense_3class_vehicles \
95+
--outname dense_cars \
9996
--yolt_cfg_file ave_dense.cfg \
100-
--weight_dir /simrdwn/yolt2/input_weights \
10197
--weight_file yolo.weights \
102-
--yolt_train_images_list_file labels_airplane_boat_car_list.txt \
103-
--label_map_path /simrdwn/data/class_labels_airplane_boat_car.pbtxt \
104-
--nbands 3 \
98+
--yolt_train_images_list_file cowc_yolt_train_list.txt \
99+
--label_map_path class_labels_car.pbtxt \
105100
--max_batches 30000 \
106101
--batch_size 64 \
107-
--subdivisions 16 \
108-
--gpu 0
102+
--subdivisions 16
109103

110-
The training script will create a results directory in _/simrdwn/results_ with the filename [framework] + [outname] + [date]. Since one cannot run TensorBoard with YOLT, we include scripts _/simrdwn/core/yolt_plot_loss.py_ and _/simrdwn/core/tf_plot_loss.py_ thatcan be called during training to inspect model convergence. An example convergence plot is shown below.
111-
![Alt text](/results/__examples/tf_loss_plot.png?raw=true "Figure 1")
112104
____
113105

114106
### 3. Test
@@ -124,15 +116,15 @@ During the test phase, input images of arbitrary size are processed.
124116

125117

126118
# SSD vehicle search
127-
python /simrdwn/src/simrdwn.py \
119+
python /raid/local/src/simrdwn/src/simrdwn.py \
128120
--framework ssd \
129121
--mode test \
130-
--outname inception_v2_3class_vehicles \
131-
--label_map_path '/simrdwn/train_data/class_labels_car.pbtxt' \
132-
--train_model_path '/simrdwn/results/ssd_train_path' \
133-
--tf_cfg_train_file ssd_inception_v2_simrdwn_orig.config \
122+
--outname inception_v2_cowc \
123+
--label_map_path class_labels_car.pbtxt \
124+
--train_model_path [ssd_train_path] \
125+
--tf_cfg_train_file ssd_inception_v2_simrdwn.config \
134126
--use_tfrecords=1 \
135-
--testims_dir 'vechicle_test' \
127+
--testims_dir cowc/Utah_AGRC \
136128
--keep_test_slices 0 \
137129
--test_slice_sep __ \
138130
--test_make_legend_and_title 0 \
@@ -143,18 +135,17 @@ During the test phase, input images of arbitrary size are processed.
143135
--slice_overlap 0.2 \
144136
--alpha_scaling 1 \
145137
--show_labels 0
146-
147-
138+
148139
# YOLT vehicle search
149-
python /simrdwn/core/simrdwn.py \
140+
python /raid/local/src/simrdwn/core/simrdwn.py \
150141
--framework yolt \
151142
--mode test \
152-
--outname dense_3class_vehicles \
153-
--label_map_path '/simrdwn/train_data/class_labels_car.pbtxt' \
154-
--train_model_path '/simrdwn/results/yolt2_train_path' \
143+
--outname dense_cowc \
144+
--label_map_path class_labels_car.pbtxt \
145+
--train_model_path [yolt2_train_path] \
155146
--weight_file ave_dense_final.weights \
156147
--yolt_cfg_file ave_dense.cfg \
157-
--testims_dir 'vechicle_test' \
148+
--testims_dir cowc/Utah_AGRC \
158149
--keep_test_slices 0 \
159150
--test_slice_sep __ \
160151
--test_make_legend_and_title 0 \

0 commit comments

Comments
 (0)