updates
This commit is contained in:
parent
8b6f1595e0
commit
c99cb43c55
3
test.py
3
test.py
|
@ -30,7 +30,6 @@ if platform == 'darwin': # MacOS (local)
|
||||||
else: # linux (cloud, i.e. gcp)
|
else: # linux (cloud, i.e. gcp)
|
||||||
test_path = '../coco/trainvalno5k.part'
|
test_path = '../coco/trainvalno5k.part'
|
||||||
|
|
||||||
|
|
||||||
# Initiate model
|
# Initiate model
|
||||||
model = Darknet(opt.cfg, opt.img_size)
|
model = Darknet(opt.cfg, opt.img_size)
|
||||||
|
|
||||||
|
@ -87,7 +86,7 @@ for batch_i, (imgs, targets) in enumerate(dataloader):
|
||||||
correct.extend([0 for _ in range(len(detections))])
|
correct.extend([0 for _ in range(len(detections))])
|
||||||
else:
|
else:
|
||||||
# Extract target boxes as (x1, y1, x2, y2)
|
# Extract target boxes as (x1, y1, x2, y2)
|
||||||
target_boxes = xywh2xyxy(annotations[:,1:5])
|
target_boxes = xywh2xyxy(annotations[:, 1:5])
|
||||||
target_boxes *= opt.img_size
|
target_boxes *= opt.img_size
|
||||||
|
|
||||||
detected = []
|
detected = []
|
||||||
|
|
Loading…
Reference in New Issue