Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Pillow
PyYAML>=5.3.1
scipy>=1.4.1
tensorboard>=1.5
torch==1.7.0
torchvision==0.8.1
torch>=1.7.0
torchvision>=0.8.1
tqdm>=4.41.0

# logging -------------------------------------
Expand All @@ -27,4 +27,4 @@ pandas

# extras --------------------------------------
thop # FLOPS computation
pycocotools==2.0 # COCO mAP
pycocotools==2.0.2 # COCO mAP
3 changes: 1 addition & 2 deletions utils/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ def output_to_target(output, width, height):
# Convert model output to target format [batch_id, class_id, x, y, w, h, conf]
if isinstance(output, torch.Tensor):
output = output.cpu().numpy()

targets = []
for i, o in enumerate(output):
if o is not None:
for pred in o:
pred = pred.cpu()
box = pred[:4]
w = (box[2] - box[0]) / width
h = (box[3] - box[1]) / height
Expand All @@ -104,7 +104,6 @@ def output_to_target(output, width, height):
cls = int(pred[5])

targets.append([i, cls, x, y, w, h, conf])

return np.array(targets)


Expand Down