Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't change model_b1_gpu0_fp32.engine file name? #598

Open
lida2003 opened this issue Dec 5, 2024 · 0 comments
Open

Can't change model_b1_gpu0_fp32.engine file name? #598

lida2003 opened this issue Dec 5, 2024 · 0 comments

Comments

@lida2003
Copy link

lida2003 commented Dec 5, 2024

As all configuration uses engine file name model_b1_gpu0_fp32.engine.

And if I switched from yolov8s to yolov4, then I need to delete the engine file. So I made a different name for yolov8 and yolov4. But it didn't work.

How to make this work?

Tested on below latest version:

$ git log -n 1
commit e5d994e2d73966d059978de7315c3f2964025581 (HEAD -> master, origin/master, origin/HEAD)
Author: Marcos Luciano <marcoslucianops@gmail.com>
Date:   Wed Nov 27 23:16:57 2024 -0300

    Add support CO-DETR (MMDetection)

EDIT: If the file name is controller by those params, then why we need this option for engine file naming?

* model-engine-file
* Example for `batch-size=1` and `network-mode=2`
```
model-engine-file=model_b1_gpu0_fp16.engine
```
* Example for `batch-size=1` and `network-mode=1`
```
model-engine-file=model_b1_gpu0_int8.engine
```
* Example for `batch-size=1` and `network-mode=0`
```
model-engine-file=model_b1_gpu0_fp32.engine
```
* Example for `batch-size=2` and `network-mode=0`
```
model-engine-file=model_b2_gpu0_fp32.engine
```
**NOTE**: To change the generated engine filename (Darknet YOLO), you need to edit and rebuild the `nvdsinfer_model_builder.cpp` file (`/opt/nvidia/deepstream/deepstream/sources/libs/nvdsinfer/nvdsinfer_model_builder.cpp`, lines 825-827)
```
suggestedPathName =
modelPath + "_b" + std::to_string(initParams.maxBatchSize) + "_" +
devId + "_" + networkMode2Str(networkMode) + ".engine";
```
* batch-size
```
batch-size=1
```
* network-mode
```
# 0=FP32, 1=INT8, 2=FP16
network-mode=0
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant