Skip to content

Commit

Permalink
Add parse_shapefile, uptate yolt2/3 Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Van Etten authored and Adam Van Etten committed Mar 31, 2020
1 parent 38dea74 commit 9294669
Show file tree
Hide file tree
Showing 7 changed files with 966 additions and 108 deletions.
10 changes: 7 additions & 3 deletions simrdwn/core/simrdwn.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ def update_args(args):
args.test_add_geo_coords = bool(args.test_add_geo_coords)

# set cuda values
if args.gpu >= 0:
# if args.gpu >= 0:
if args.gpu != "-1":
args.use_GPU, args.use_CUDNN = 1, 1
else:
args.use_GPU, args.use_CUDNN = 0, 0
Expand Down Expand Up @@ -661,6 +662,7 @@ def yolt_command(framework='yolt2',
else:
gpu_cmd = '-i ' + str(gpu)
# gpu_cmd = '-i ' + str(3-args.gpu) # originally, numbers were reversed
ngpus = len(gpu.split(','))

##########################
# SET VARIABLES ACCORDING TO MODE (SET UNNECCESSARY VALUES TO 0 OR NULL)
Expand Down Expand Up @@ -713,6 +715,7 @@ def yolt_command(framework='yolt2',
str(nbands),
yolt_loss_file,
str(min_retain_prob),
str(ngpus),
suffix
]

Expand Down Expand Up @@ -1732,8 +1735,9 @@ def main():
help="object detection framework [yolt2, 'yolt3', ssd, faster_rcnn]")
parser.add_argument('--mode', type=str, default='test',
help="[compile, test, train, test]")
parser.add_argument('--gpu', type=int, default=0,
help="GPU number, set < 0 to turn off GPU support")
parser.add_argument('--gpu', type=str, default="0",
help="GPU number, set < 0 to turn off GPU support " \
"to use multiple, use '0,1'")
parser.add_argument('--single_gpu_machine', type=int, default=0,
help="Switch to use a machine with just one gpu")
parser.add_argument('--nbands', type=int, default=3,
Expand Down
Loading

0 comments on commit 9294669

Please sign in to comment.