Skip to content

[BUG] not correct condition for minInputWidth #93

Description

@CharaVerKys
int32_t minInputWidth = std::max(m_options.minInputWidth, inputW);
// this options.minInputWidth (at least from within this function) can be bigger than inputW, if user set it big and dont use
// so in result you have
/*
kMIN	m_options.minInputWidth
kOPT	inputW
kMAX	inputW
*/
       if (doesSupportDynamicBatch) {
           optProfile->setDimensions(inputName, nvinfer1::OptProfileSelector::kMIN, nvinfer1::Dims4(1, inputC, inputH, minInputWidth));
       } else {
           optProfile->setDimensions(inputName, nvinfer1::OptProfileSelector::kMIN,
                                     nvinfer1::Dims4(m_options.optBatchSize, inputC, inputH, minInputWidth));
       }

fix:

int32_t minInputWidth = std::max(m_options.minInputWidth, inputW);
if (not doesSupportDynamicWidth) {minInputWidth = inputW;}

also engine is build on assumption that it will be used with rgb image
but it is not
we (now) have different input/output model
i not made code by myself, i just changed yours
so, ill either create my repo based on your code, or fork-pull_request to make different api(basically rewrite) in different folder in your repository
now i plan to make different layers and get rid of exceptions (use tl::expected instead), and for this github repo instead of directly using logger replace with re-entering

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions