Comments (4)
The doc contains details about how to do QAT and PQT, but it doesn't mention the procedure to load the then-trained model for inference.
Specifically, I want to know how to load and use the quantized YOLO-NAS FP16 and INT8 models listed in the README documentation.
The following line loads the model in FP32 precision.
yolo_nas_s = super_gradients.training.models.get("yolo_nas_s", pretrained_weights="coco")
What are the next steps I need to perform to load and use the quantized version (FP16 and INT8) as mentioned in the docs?
Edit: Removed question about QSP and QCI blocks
from super-gradients.
Join the discussion on DagsHub!
from super-gradients.
Hello, @veb-101 , I refer you to this document. Let me know if this helps!
from super-gradients.
To load the model for inference you should compile it to TensorRT. The INT8 QAT model is convertible to an ONNX with Q/DQ layers which are then compiled into actual INT8 quantization.
You can follow the code of QATTrainer
to see how the FP32 model is being quantized and calibrated, then exported to ONNX.
To get INT8 model, as I mentioned, you need to compile it to TensorRT, which can be achieved using trtexec
. Here's a snippet:
/usr/src/tensorrt/bin/trtexec --onnx=$1.onnx --workspace=2048 --avgRuns=100 --duration=15 --int8 --fp16 --saveEngine=$1.engine
Read more about TensorRT in the NVIDIA's docs.
from super-gradients.
Related Issues (20)
- yolo nas pose F.conv2d(input, weight, bias, self.stride, RuntimeError: expected scalar type Byte but found Float HOT 3
- "DetectionMosaic": {"input_dim": [640, 640], "prob": 0.5} messing up the image size in trainloader HOT 1
- How to define a search space
- `super_gradients.training.utils.predict.prediction_pose_estimation_results.ImagePoseEstimationPrediction.save()` not correctly handling optional parameters and saving image incorrectly
- Fine tuning HyperParameters HOT 2
- Warning: Could not set preprocessing pipeline from the validation dataset: 'AlbumentationsAdaptor' object HOT 5
- quadrangular polygon object detection HOT 2
- WANDB logging not showing HOT 1
- Enable class agnostic NMS HOT 1
- Recipe should be saved to additional_configs_to_log before instantiating it
- RuntimeError: Given groups=1, weight of size [48, 3, 3, 3], expected input[2, 640, 640, 640] to have 3 channels, but got 640 channels instead
- Change Quantization Precision HOT 1
- knowledge distillation to object detection(YOLONAS) HOT 1
- Clarification on license for modifications to Yolo-NAS with pre-trained weights HOT 6
- Speed inference Time HOT 6
- Error training yolo_nas_l HOT 4
- Issues with Bounding Box Coordinates Exceeding Image Dimensions After ONNX Export
- DiceLoss is unknown object type HOT 2
- SSD MobileNet V2 recipe HOT 1
- Any model for instance segmentation?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from super-gradients.