Deci-AI / super-gradients

Easily train or fine-tune SOTA computer vision models with one open source training library. The home of Yolo-NAS.
https://www.supergradients.com
Apache License 2.0
4.59k stars 510 forks source link

How to change batch_size for model.predict for YOLO-NAS? #1272

Closed Allison2324 closed 1 year ago

Allison2324 commented 1 year ago

How to change batch_size for model.predict for YOLO-NAS?

As I can see it's 32 by default. I need to change it.

Louis-Dupont commented 1 year ago

Hi @Allison2324 I opened a PR to add this as an option to the model.predict method. Until this is merged/released, you can go for one of the two workarounds:


pipeline = model._get_pipeline()  # Same API as `model.predict()`
predictions = pipeline(IMAGES, batch_size=8)
...
Louis-Dupont commented 1 year ago

@Allison2324 The parameter batch_size was added in this PR which was merged. The feature is available on the master branch and will be part of the next release 3.1.3.

harpreetsahota204 commented 1 year ago

Hi @Allison2324 -

Thanks for opening an issue for SG. I'm gathering some feedback on SuperGradients and YOLO-NAS.

Would you be down for a quick call to chat about your experience?

If a call doesn't work for you, no worries. I've got a short survey you could fill out: https://bit.ly/sgyn-feedback.

I know you’re super busy, but your input will help us shape the direction of SuperGradients and make it as useful as possible for you.

I appreciate your time and feedback. Let me know what works for you.

Cheers,

Harpreet