Skip to content

Commit ce49401

Browse files
Make a detection directory if there isn't one with the name
1 parent abb35fd commit ce49401

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

det_messi.jpg

1.21 KB
Loading

detect.py

+4
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ def arg_parse():
113113
print ("No file or directory with the name {}".format(images))
114114
exit()
115115

116+
if not os.path.exists(args.det):
117+
os.makedirs(args.det)
118+
116119
load_batch = time.time()
117120

118121
batches = list(map(prep_image, imlist, [inp_dim for x in range(len(imlist))]))
@@ -122,6 +125,7 @@ def arg_parse():
122125
im_dim_list = torch.FloatTensor(im_dim_list).repeat(1,2)
123126

124127

128+
125129
if CUDA:
126130
im_dim_list = im_dim_list.cuda()
127131

0 commit comments

Comments
 (0)