-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Installing imgaug on Jetson Nano breaks CSIC camera #970
Comments
See this related issue #749 |
when installing imgaug on the nano, I see a series of these errors while it is trying to install
I apperas to be looking for geos_c.so. running this fixes those errors
However, it does not fix the camera issue, it still won't startup. |
This is a simple way to reproduce the but that does not include all the donkeycar code.
|
Here's a twist; I can reproduce the bug without installing imgaug. Just install opencv-python:
So it seems the issue is with the camera driver, since it is the one that needs opencv. It might even by one of it's dependencies (like argus_camera or V4L). |
I've been able to repeat this bug with the base Jetpack 4.6 python which is python3.6.9, and with python3.7.5 and python3.8.0 |
It works 'out-of-the-box' with no virtual environment, so this is what it is using for opencv:
|
this works in the virtual environment is we don't try to install opencv-python
|
Thanks @TCIII for finding this issue in the imgaug github, aleju/imgaug#737 and aleju/imgaug#473 That indicated that the pip wheel install of imgaug will install opencv-python. My own testing above shows this will conflict with the Jetpack opencv and will cause the camera error. So I'm going to trying installing from source as indicated in that imgaug issue.
That did not work either; it still installed opencv-python-headless |
The maintainer of the imgaug library has said they will not fix their installer. So we should implement our augmentations another way. There is an alternative library that used to use imgaug but has removed it because of this bug. It may be a good replacement for us https://github.com/albumentations-team/albumentations#list-of-augmentations |
- this is a workaround for issue 970 - #970 - it is meant to be temporary until we refactor the image augmentations to not use imgaug
* Mock ImageAugmentation if imgaug not installed - this is a workaround for issue 970 - #970 - it is meant to be temporary until we refactor the image augmentations to not use imgaug * Cleanup linting issues * version="4.3.4"
PR #978 is a temporary workaround (read HACK) that mocks out the augmentations if imgaug dependency is not installed. It is not installed by default on the Nano. So this will prevent the camera issue. It warns the user at runtime if they use a configuration that utilized augmentations. This temporary hack should be removed when we replace the imaug library with another implemenation. |
EDIT: 2022/06/14 Corrected a wrong option. @Ezward In my Dockerfile:
|
see PR #1111 |
Replace imgaug with augmentations. PR #1111 |
This has been found using Jetpack 4.6. In order to use the 'CROP' transformation with an autopilot the imgaug dependency needs to be installed into the environment. It installs without issue. however, once installed the CSIC camera will no longer return frames. This is not an issue in RaspberryPi. I'm not sure if it is an issue in earlier versions of Jetpack.
Using 'CROP' is a best practice when training an autopilot. So it is a problem that one of our supported platforms cannot use it. Worse, the error that is produced provides no help in understanding the underlying issue. We should try to find a fix or work-around for this issue.
It has also been determined that this breaks training on the nano, since the training code always tries to import imgaug. If it cannot import then it fails. If we do the pip install then it gets an runtime illegal instruction error. So a fix for that, if we don't get the imgaug replaced, is to fix the training code to only import imgaug if it is used. That may require some mock stub of the imgaug api we use; so if imgaug fails to import then use a mock that warns the user that augmentations are disabled.
The text was updated successfully, but these errors were encountered: