Commit Graph

528 Commits

Author SHA1 Message Date
Harijs Grinbergs e449d344c0 Enabled cuda pre-process via opencv_contrib 2021-11-04 20:39:37 +02:00
Harijs Grinbergs 18303c06c5 Performance improvements on NX
- CUDNN_ACTIVATION_CLIPPED_RELU is now done with ActivationType::kCLIP instead of custom layer. This improved MobildenetSSD network performance in FP16 from 57FPS to 66FPS - that's about 15%.
- ACTIVATION_LOGISTIC was implemented the same as CUDNN_ACTIVATION_SIGMOID - so instead of using custom layers I use the ActivationType::kSIGMOID. This also gave small speed boost.
- ACTIVATION_MISH is now implemented using combination of 3 layers instead of the custom one. In FP32 this doesn't do anything (and in some cases could be slower, because the MISH custom layer is quite optimized), but in FP16 and especially in YOLO networks this is much faster. YOLO4x went from 7FPS to 10FPS. YOLO4-416 went from 23FPS to 33FPS - that's 50% performance boost.

The reason why I wanted to move to TRT layers if possible is that because they are very optimized and all layer fusing operations only happens on NVidia's TRT layers. Custom layers cannot be combined (fused). So even though the MISH change initially added 300 more layers than custom MISH layer, after optimization it had 40 layers less than an optimized network with custom MISH.
An additional place where performance comes from is the fact that none of the custom layers currently support FP16. That can of course be added, but if we use TRT layers then almost all of them support FP16. Not only that gives performance, but that also removed cast layers before and after that do FP32->FP16 and FP16->FP32 conversions.
And lastly, the custom layers didn't support STRIDE operations, so TRT made extra layers that copied input from different layers (especially route concat layers). As the built-in operations support stride, then these copies were almost totally elimitated.
2021-11-02 00:09:40 +02:00
Harijs Grinbergs d411af52fa Small MISH optimization
- Small MISH optimization from darknet repo.
2021-11-01 22:29:32 +02:00
Harijs Grinbergs 646c5aa4d1 Fixed FP16 crashing
- None of the custom layers support anything than FP32 with default format, so I changed the support function to reflect that.

Many of the layers could be optimized if F16 was actually supported. Especially for big ones like MISH activation.
2021-11-01 22:28:12 +02:00
Harijs Grinbergs 76c978a200 Added TensorRT8 support
- Migrated to TRT8 API, but I didn't really try maintaining old compatiblity. Lowest support now could be TRT6.
- Refractored some stuff that are bad C++ practices and made coding really hard, like including headers in namespaces or not using an include guard.
- Needed to move the yolo container outside tkdnn object, which means we now only have one and global. Deserialization in TRT8 doesn't happen in your object, but in the plugin itself so it couldn't access the yolo objects. I think the need to hold onto yolo layers itself is flawed and shouldn't be nessesarry.
2021-10-28 01:02:26 +03:00
Micaela Verucchi eca10ac0a8 Update weights
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
2021-09-19 00:16:31 +02:00
Micaela Verucchi a992c9feb5 Update README.md 2021-07-23 16:50:15 +02:00
Micaela Verucchi 09080709a9 Remove Issues.md
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
2021-07-23 15:23:47 +02:00
Micaela Verucchi 7521d10ba7 Update README with gifs
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
2021-07-23 15:07:52 +02:00
Micaela Verucchi ab349083bf Merge with cnet works, all tests passed.
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
v0.6
2021-07-23 14:37:04 +02:00
Micaela Verucchi 4f9f27152a Update READMEs
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
2021-07-23 10:31:34 +02:00
Davide Sapienza 0292e21c33 Merge remote-tracking branch 'origin/master' into cnet 2021-07-22 17:03:23 +02:00
Davide Sapienza 2bb70859da Add FPS results for CenterTrack 2D/3D
Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
2021-07-22 16:54:25 +02:00
Davide Sapienza b9f82510d3 Add demo_utils.
This commit splits the utils file into two different files:
utils and demo_utils, to overcome some opencv problems caused
by demo_utils includes.

Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
2021-07-22 10:45:18 +02:00
Davide Sapienza 1216e8bb74 Add camera calibration file reading for demo3d and demoTracker.
Some minor fixes.

Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
2021-07-21 16:14:53 +02:00
Davide Sapienza be2d361ac6 Update 3d detection
This commit updates the CenternetDetection3d class and fixes
some bugs.

It also removes the resnet101 network for CenterNet 3D.
This network doesn't exist.

Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
2021-07-21 15:51:13 +02:00
Davide Sapienza f78f7bfddc Fix link in readme files
Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
2021-07-21 15:35:17 +02:00
Micaela Verucchi f4e71a5a28 Add yolo4_berkeley_f1
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
2021-07-21 12:56:00 +02:00
Micaela Verucchi 89b1bb7bee Add missing files
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
2021-07-20 18:39:25 +02:00
Micaela Verucchi 318dfe4b55 merge with master
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
2021-07-20 18:38:46 +02:00
Micaela Verucchi 946b1fe5f5 Update READMEs
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
2021-07-20 17:30:32 +02:00
Micaela Verucchi 69256992a3 Add colormap for each segmentation dataset
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
2021-07-20 15:29:26 +02:00
Micaela Verucchi 84ff978ccb Merge with master, all tests passed
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
2021-07-20 12:48:41 +02:00
Micaela Verucchi 4ca69836e9 Update README_seg
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
2021-07-20 11:39:16 +02:00
Micaela Verucchi b3c44a86a8 Fix shelfnet berkeley, update readme, minors
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
2021-07-20 10:57:53 +02:00
Francesco Gatti c306b36860 Update CMakeLists.txt 2021-06-17 15:31:25 +02:00
Francesco Gatti 9b78f143cb Update CMakeLists.txt 2021-06-16 14:53:46 +02:00
Francesco Gatti d847a4b852 Update CMakeLists.txt 2021-06-15 20:33:41 +02:00
Francesco Gatti 8df7d5fd1b Update CMakeLists.txt 2021-06-15 20:31:58 +02:00
Francesco Gatti 6d7c456f72 cmake version fix 2021-06-15 19:39:34 +02:00
Francesco Gatti b0fdeb4127 install targets 2021-06-15 19:38:13 +02:00
Francesco Gatti ba8199a030 fix compile error on old tensorrt and remove useless prints 2021-05-16 22:33:45 +02:00
Francesco Gatti 6b8ae1e27c remove wrong cuda arch that cause big performance gap
fix #226
2021-05-16 22:16:21 +02:00
Davide Sapienza 25d02ef3ea Update exporting weights README
Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
2021-05-11 17:30:24 +02:00
Davide Sapienza fd56e64938 Update the README and split it into several files.
Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
2021-05-11 17:02:43 +02:00
Davide Sapienza 34c1c3d577 Update cnet branch.
This commit splits the demo3D in two demo: one for the 3D object
detection and one for the tracking.

It renames the files related to CenterTrack.

It adds a new parameter to select the tracker mode (2D or 3D).

Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
2021-05-11 16:17:23 +02:00
Davide Sapienza 0dc96d2a9e Improve CenterTrack.
Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
2021-05-04 17:59:20 +02:00
Fabio Bagni f8327e2dac Merge with cnet 2021-05-04 11:50:08 +02:00
Fabio Bagni 10f39d1055 Fix tracker for batch size > 1 2021-05-04 11:21:05 +02:00
Davide Sapienza d1ae1791d9 Fix a bug in the draw function of CenterTrack.
Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
2021-05-03 18:56:07 +02:00
Davide Sapienza ff6e0e010a Fix a bug with batch > 1
Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
2021-04-30 22:26:33 +02:00
Davide Sapienza 2367519799 Add the calibration matrix reading for CenterTrack
Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
2021-04-30 17:10:51 +02:00
Davide Sapienza be6ad27c11 Batch size > 1 for the 3D demo.
This commit lets to use differtent batch size for 3D CenterNet
and CenterTrack.

Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
2021-04-29 11:13:24 +02:00
Davide Sapienza 28fab9c3e1 Merge remote-tracking branch 'origin/master' into cnet 2021-04-27 14:43:39 +02:00
Francesco Gatti a638592fc7 Merge pull request #199 from rickymedrano/rickymedrano-patch-1
Minor Readme Changes
2021-04-24 19:00:58 +02:00
Francesco Gatti a473a02a44 Merge branch 'perseusdg-master' 2021-04-24 18:55:44 +02:00
Francesco Gatti 6611a91201 merge perseusdg windows10 support 2021-04-24 18:55:26 +02:00
Harshvardhan Chandirasekar 39323ca8d3 Update README.md 2021-04-14 17:22:26 +05:30
Harshvardhan Chandirasekar f90ee8ab7d Update CMakeLists.txt 2021-04-09 13:20:44 +05:30
perseusdg 1de804f98d Code cleanup and readme fixes 2021-04-09 13:17:41 +05:30