Skip to content

Commit

Permalink
Updated SAHI inference for custom trained models
Browse files Browse the repository at this point in the history
  • Loading branch information
sovit-123 committed Aug 28, 2024
1 parent 2a26ce6 commit f35a78f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sahi_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ def main(args):
model_type='torchvision',
model=model,
confidence_threshold=args['threshold'],
device=args['device']
device=args['device'],
category_mapping={str(i): CLASSES[i] for i in range(1, len(CLASSES))},
# category_remapping={CLASSES[i]: i for i in range(1, len(CLASSES))}
)

COLORS = np.random.uniform(0, 255, size=(len(CLASSES), 3))
Expand Down

0 comments on commit f35a78f

Please sign in to comment.