NVIDIA / NVIDIA/TensorRT

Polygraphy: How to write the data_loader.py to send the calibration data?

Open
#4,196 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Module:Polygraphy triaged
Dominant language
C++
Stars
13.4k
Forks
2.4k
Avg merge
5d 3h
Merged PRs (30d)
2

Description

The example data_loader.py file used the fake data.
I want to know how to write the file to send image files data to Polygraphy to calibrate the model and improve the accuracy.

Such as the axis, the data range, and so on.
The axis is image_num, image_channel, height, width or the other?
The data range is [0, 1] or [0, 255]? It should be the same as the pth model input or be stricted to a fixed range?

Thank you for any suggestions or help.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tools/Polygraphy/examples/cli/convert/01_int8_calibration_in_tensorrt/data_loader.py and inspect how its fake calibration data is passed to Polygraphy. Document how image files should be supplied, including the expected axis order and data range relative to the model input; done means the example answers those questions for real image calibration data.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.