-
Notifications
You must be signed in to change notification settings - Fork 95
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
Real time Object detection in agricultural applications #488
Conversation
…t_plus_fast model
fix optimization procedure and add dynamic and channel last implementations for faster inference
fix optimization procedure and add dynamic and channel last implementations for faster inference
…to Real-Time-OD-In-AGRICULTURAL
From what i can tell, tests fail due to the new dependency At this stage i would suggest to investigate whether it is crucial to include the new dependencies as a first step to fix this. @passalis |
The thing is, for real time applications in embedded devices it is essential to use TensorRT and must initialize pycude for TensorRT. Is it better to use a try: except: to informe the user to manually install pycuda and TensorRT? |
Even better, if this is crucial only for embedded devices maybe we can only include it in the installation of the toolkit designed for the embedded devices. I suggest to investigate whether we can have a workaround where these options become available only when running on appropriate devices. @passalis any thoughts? |
Can't we have a standalone script in |
I think I can manage that but, because it is an important implementation that can be used, I think it would be beneficial to be in the main Learner so it is easier to find from pip installations. The main reason that pycuda it is not installed it is because it can not find the nvcc compiler. Don't we install in during tool installation? I would write a script in projects for now but I think would be better to fix this installation problem. |
We cannot assume that nvcc will be available, since we also support CPU-only installations. The simplest options are either to check if nvcc/pycuda and tensorrt are available in the learner before importing anything related to these or moving the optimization into a separate script. Both sounds ok to me, so we could go with the easiest to implement option. |
If we go with the first one though, it is more complicated to handle the dependencies issues, which is the main issue right now as far as I understand. |
fix nanodet_RepVGG_A0_416.yml and nanodet_g.yml, simplify vgg backbone transfer tensorRT dependencies into gpu installation small fixes into prints - docks
I have tested all tools in my machine with fresh installation as it is noted in: https://github.com/opendr-eu/opendr/blob/master/docs/reference/installation.md#installing-for-gpu If it passes the Tests in CI I think we can continue with the review |
I tested the gpu installation of this branch on a local machine and it works fine. Before moving on with the review, @ManosMpampis there are a lot of changes in the |
Some scripts are from the original repo of Nanodet that the tool was already taken from. |
Ok then you can add what relevant information you think is valid here. I was mainly asking this because when we use code from other repositories as-is, we don't review it as part of OpenDR, but since you modified these files, i think we should. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @ManosMpampis for the new features, i've left some comments below.
src/opendr/perception/object_detection_2d/nanodet/nanodet_learner.py
Outdated
Show resolved
Hide resolved
src/opendr/perception/object_detection_2d/nanodet/nanodet_learner.py
Outdated
Show resolved
Hide resolved
src/opendr/perception/object_detection_2d/nanodet/nanodet_learner.py
Outdated
Show resolved
Hide resolved
src/opendr/perception/object_detection_2d/nanodet/nanodet_learner.py
Outdated
Show resolved
Hide resolved
src/opendr/perception/object_detection_2d/nanodet/nanodet_learner.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>
update model heads to have unified initializations and update config_file_detail.md . delete unused parameter of yml files.
As I resolve this comment: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Thank you! |
* add new augmentation strategies * add VGG backbone * easier code readability to add custom losses * better code readability * better code readability and small bug fixes * better and more stable training implementation and logging * add cache in dataset * add faster post processing in nanodet_plus_head.py and add new nanodet_plus_fast model * add TensorRT optimizations and fix embedded device inference, fix optimization procedure and add dynamic and channel last implementations for faster inference * add TensorRT optimizations and fix embedded device inference, fix optimization procedure and add dynamic and channel last implementations for faster inference * update docks and add warning ignores in test_nanodet * delete unused code, fix nanodet_RepVGG_A0_416.yml and nanodet_g.yml, simplify vgg backbone transfer tensorRT dependencies into gpu installation small fixes into prints - docks * fix a bug that still uses gpu nodes even self.device was set to "cpu" * update tool dock as noted in PR suggestions * Apply suggestions from code review Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com> * update dynamic input explanation accross optimization and inference. update model heads to have unified initializations and update config_file_detail.md . delete unused parameter of yml files. * fix TensorRT loading message and docs as suggested --------- Co-authored-by: ManosMpampis <gmp.manos@gmail.com> Co-authored-by: Nikolaos Passalis <passalis@users.noreply.github.com> Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>
This PR aims to enhance the speed capabilities of Nanodet Object detection pipeline.
Add features in inference and training,
Add optimization options for TensorRT,
Ensure JIT script capabilities for embedded devices.
Add a new model nanodet-plus-fast with pretrained weights for object detection crops in RoboWeedMap dataset