Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

PyTorch implementation of soft-nms

License

NotificationsYou must be signed in to change notification settings

MrParosk/soft_nms

Repository files navigation

mastercodecov

Implementation of the soft-nms algorithm described in the paper:Soft-NMS -- Improving Object Detection With One Line of Code

The algorithm is implemented in PyTorch's C++ frontend for better performance.

Install

Make sure that you have installed PyTorch, version 1.7 or higher. Install the package by

pip install git+https://github.com/MrParosk/soft_nms.git

Note that if you are using Windows, you need MSVC installed.

Example usage

importtorchfrompt_soft_nmsimportbatched_soft_nms,soft_nmssigma=0.5score_threshold=0.1boxes=torch.tensor([[20,20,40,40], [10,10,20,20], [20,20,35,35]],device="cpu",dtype=torch.float)scores=torch.tensor([0.5,0.9,0.11],device="cpu",dtype=torch.float)updated_scores,keep=soft_nms(boxes,scores,sigma,score_threshold)# updated_scores=tensor([0.9000, 0.5000]), keep=tensor([1, 0])# With batched_soft_nms, the soft-nms will be applied per batch, which is specified with indiciesindicies=torch.tensor([0,0,1],device="cpu")keep_batch=batched_soft_nms(boxes,scores,indicies,sigma,score_threshold)# keep_batch=tensor([1, 0, 2])

About

PyTorch implementation of soft-nms

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp