Add a python demo #44

Open
ioir123ju wants to merge 5 commits from ioir123ju/master into master
ioir123ju commented 2020-06-17 05:49:09 +02:00 (Migrated from github.com)
No description provided.
thancaocuong commented 2020-07-01 09:13:33 +02:00 (Migrated from github.com)

@ioir123ju could you update Readme.md to make your work more clear?

@ioir123ju could you update Readme.md to make your work more clear?
ioir123ju commented 2020-07-01 09:16:11 +02:00 (Migrated from github.com)

@thancaocuong
I have updated readme.md.

@thancaocuong I have updated readme.md.
thancaocuong commented 2020-07-01 09:19:46 +02:00 (Migrated from github.com)

@ioir123ju currently is this correct if I say that we only can run with batchsize 1 with python binding?

@ioir123ju currently is this correct if I say that we only can run with batchsize 1 with python binding?
ioir123ju commented 2020-07-01 09:23:50 +02:00 (Migrated from github.com)

@thancaocuong
Yes, I did not complete the batch processing,but It's not difficult.You can try.

@thancaocuong Yes, I did not complete the batch processing,but It's not difficult.You can try.
charlielito commented 2020-09-14 22:23:47 +02:00 (Migrated from github.com)

@ioir123ju did you get same speed with this python wrapper? I know python can add overhead, I don't know how much this could be. With python I'm getting 36 FPS with yolov4 FP16 and input size of 416x416 on a XAvier AGX, whilst with the ./demo implementation I get 41 FPS. Did you get similar downgrade of performance?

@ioir123ju did you get same speed with this python wrapper? I know python can add overhead, I don't know how much this could be. With python I'm getting 36 FPS with yolov4 FP16 and input size of 416x416 on a XAvier AGX, whilst with the `./demo` implementation I get 41 FPS. Did you get similar downgrade of performance?
ioir123ju commented 2020-09-21 04:42:14 +02:00 (Migrated from github.com)

@ ioir123ju使用此python包装器获得了相同的速度吗?我知道python可能会增加开销,但我不知道这可能会增加多少。使用python,我在yolov4 FP16上获得36 FPS,在XAvier AGX上输入大小为416x416,而在./demo实现上,我获得41 FPS。您是否得到了类似的性能降级?

At almost the same speed

> @ ioir123ju使用此python包装器获得了相同的速度吗?我知道python可能会增加开销,但我不知道这可能会增加多少。使用python,我在yolov4 FP16上获得36 FPS,在XAvier AGX上输入大小为416x416,而在`./demo`实现上,我获得41 FPS。您是否得到了类似的性能降级? At almost the same speed
bobbilichandu commented 2021-04-23 13:05:12 +02:00 (Migrated from github.com)

@ioir123ju can you please add yolov4-csp plugins too

@ioir123ju can you please add yolov4-csp plugins too
eric-eric-eric commented 2021-10-20 23:31:32 +02:00 (Migrated from github.com)

@ioir123ju am I right in thinking that to avoid memory leaks, a similar function to https://github.com/AlexeyAB/darknet/blob/master/src/network.c#L971 would be needed?

@ioir123ju am I right in thinking that to avoid memory leaks, a similar function to https://github.com/AlexeyAB/darknet/blob/master/src/network.c#L971 would be needed?
yotamraz commented 2022-01-14 08:18:01 +01:00 (Migrated from github.com)

Hi! can you please add support for tensorrt8?

Hi! can you please add support for tensorrt8?
perseusdg commented 2022-01-14 08:21:31 +01:00 (Migrated from github.com)

there is support for tensorrt8 ,checkout the tensorrt8 branch https://github.com/ceccocats/tkDNN/tree/tensorrt8..if you are asking for python support for tensorrt8 in tkDNNi am not sure about it

there is support for tensorrt8 ,checkout the tensorrt8 branch https://github.com/ceccocats/tkDNN/tree/tensorrt8..if you are asking for python support for tensorrt8 in tkDNNi am not sure about it
yotamraz commented 2022-01-14 13:17:32 +01:00 (Migrated from github.com)

@perseusdg
Thank you, I have already checked out to the 'tensorrt8' branch and now facing some compatability issues with the python binding.
I have modified load_network function in darknetTR.cpp according to new tk::dnn::Yolo3Detection interface:

tk::dnn::Yolo3Detection* load_network(char* net_cfg, char* cfg_path, char* name_path, int n_classes, int n_batch, float conf_thresh)
{
    std::string net;
    net = net_cfg;
    tk::dnn::Yolo3Detection *detNN = new tk::dnn::Yolo3Detection;
    detNN->init(net, cfg_path, name_path, n_classes, n_batch, conf_thresh);

    return detNN;
}

also modified header file and input argtypes on python side accordingly:
load_network.argtypes = [c_char_p, c_char_p, c_char_p, c_int, c_int, c_float]

In the meantime I'm reaching segfault while running the demo python script:

$ python darknetTR.py build/yolo4_fp16.rt --video=./demo/stabilized.mp4
build/yolo4_fp16.rt
New NetworkRT (TensorRT v8.01)
Float16 support: 1
Int8 support: 1
DLAs: 2
Segmentation fault (core dumped)

Any suggestions how to go on from here?

@perseusdg Thank you, I have already checked out to the 'tensorrt8' branch and now facing some compatability issues with the python binding. I have modified `load_network` function in darknetTR.cpp according to new `tk::dnn::Yolo3Detection` interface: ``` tk::dnn::Yolo3Detection* load_network(char* net_cfg, char* cfg_path, char* name_path, int n_classes, int n_batch, float conf_thresh) { std::string net; net = net_cfg; tk::dnn::Yolo3Detection *detNN = new tk::dnn::Yolo3Detection; detNN->init(net, cfg_path, name_path, n_classes, n_batch, conf_thresh); return detNN; } ``` also modified header file and input argtypes on python side accordingly: `load_network.argtypes = [c_char_p, c_char_p, c_char_p, c_int, c_int, c_float]` In the meantime I'm reaching segfault while running the demo python script: ``` $ python darknetTR.py build/yolo4_fp16.rt --video=./demo/stabilized.mp4 build/yolo4_fp16.rt New NetworkRT (TensorRT v8.01) Float16 support: 1 Int8 support: 1 DLAs: 2 Segmentation fault (core dumped) ``` Any suggestions how to go on from here?
gewenpulan commented 2022-06-21 04:20:38 +02:00 (Migrated from github.com)

any update here? I face the same problem.
on jetpack4.5.1, ioir123jupython interface can not run correctly

any update here? I face the same problem. on jetpack4.5.1, [ioir123ju](https://github.com/ioir123ju)python interface can not run correctly
This repo is archived. You cannot comment on pull requests.
No Reviewers
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mmr/tkDNN#44