Skip to content

Instantly share code, notes, and snippets.

@damanm24
Created November 28, 2021 22:16
Show Gist options
  • Save damanm24/b2ddc11a3e0fa0d6f6880b334f60fb44 to your computer and use it in GitHub Desktop.
Save damanm24/b2ddc11a3e0fa0d6f6880b334f60fb44 to your computer and use it in GitHub Desktop.
cluster_boxes_data = get_cluster_box_info(frame, box_info)
task_batches = []
cluster_boxes_data.sort(key=lambda x : (x[2] - x[0]) * (x[3] - x[1]))
# student's code here
for i in range(len(cluster_boxes_data)):
task = TaskEntity(image_path=frame.path, coord=cluster_boxes_data[i][:4], depth=cluster_boxes_data[i][4])
task_batch = TaskBatch([task], task.img_width, task.img_height, priority=i)
task_batches.append(task_batch)
return task_batches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment