bowenc0221 / boundary-iou-api

Boundary IoU API (Beta version)
Other
216 stars 24 forks source link

Explicit method for adding boundaries #13

Open JohannesTheo opened 5 months ago

JohannesTheo commented 5 months ago

This PR adds an additional method to add boundaries without changing current behavior.

It's very similar to the existing methods but can be invoked manually. Also, it allows to explicitly specify the number of cpus in the multiprocessing step. In our case, we get 4x faster conversion times by using cpu_num << multiprocessing.cpu_count() since IPC is very expensive and our system has many cores. Note that we also untangle the conversion of cocoGt and cocoDt by adding get_boundary as an argument to loadRes instead of following what was done in cocoGt. This actually does change the current behavior slightly but should be of no concern since COCOeval will run any missing conversion anyway. On the other hand, the user gains more flexibility and control of when to run the conversion!

The PR also includes as small fix for the deprecation warning np.float -> float

Let me know what you think :) Best, Johannes