avanetten / simrdwn

Rapid satellite imagery object detection
216 stars 153 forks source link

Error: for YOLT3, boxes_per_grid must be divisble by 3! #96

Closed annalisasheehan closed 4 years ago

annalisasheehan commented 4 years ago

I keep on running into the same error when attempting to run YOLT3 on both the COWC dataset and my own dataset. For the COWC dataset I followed the: /simrdwn/core/prep_data_cowc.py script, sticking to all of the default variables to create 544x544 pixel subset images and corresponding labels files.

The model i'm running where I get the error is (using weights 608 downloaded from Darknet):

python /simrdwn/simrdwn/core/simrdwn.py \
    --framework yolt3 \
    --mode train \
    --outname dense_cowc \
    --yolt_object_labels_str car \
    --yolt_cfg_file yolov3.cfg  \
    --weight_file /simrdwn/yolt3/input_weights/yolov3_608.weights \
    --yolt_train_images_list_file /simrdwn/simrdwn/data/train_data/cowc_yolt_train_list.txt \
    --label_map_path /simrdwn/simrdwn/data/train_data/class_labels_car.pbtxt \
    --max_batches 30000 \
    --batch_size 64 \
    --subdivisions 16 \
    --gpu 0

The error I get is:

Permit me to introduce myself...

for YOLT3, boxes_per_grid must be divisble by 3!
RETURNING!

SIMRDWN now...

Traceback (most recent call last):
  File "/simrdwn/simrdwn/core/simrdwn.py", line 1949, in <module>
    main()
  File "/simrdwn/simrdwn/core/simrdwn.py", line 1940, in main
    train_cmd1, test_cmd_tot, test_cmd_tot2 = prep(args)
  File "/simrdwn/simrdwn/core/simrdwn.py", line 1167, in prep
    os.chdir(args.simrdwn_dir)
AttributeError: 'NoneType' object has no attribute 'simrdwn_dir'
avanetten commented 4 years ago

See https://github.com/avanetten/simrdwn/blob/master/simrdwn/core/simrdwn.py#L264, where it states that if you're using yolov3 you need args.boxes_per_grid to be divisible by 3, so try:

python /simrdwn/simrdwn/core/simrdwn.py \ --framework yolt3 \ --mode train \ --outname dense_cowc \ --yolt_object_labels_str car \ --yolt_cfg_file yolov3.cfg \ --weight_file /simrdwn/yolt3/input_weights/yolov3_608.weights \ --yolt_train_images_list_file /simrdwn/simrdwn/data/train_data/cowc_yolt_train_list.txt \ --label_map_path /simrdwn/simrdwn/data/train_data/class_labels_car.pbtxt \ --max_batches 30000 \ --batch_size 64 \ --subdivisions 16 \ --boxes_per_grid 9 \ --gpu 0