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

Added info overlay part #898

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JoeSiu
Copy link
Contributor

@JoeSiu JoeSiu commented Jul 13, 2021

a simple Info overlay that adds texts overlay to the camera images, might be useful for debugging. It can show the current fps if enabled (#897) as well as the current throttle and angle, or any other info by adding the inputs or by calling the 'add' function in InfoOverlayLogger.

@DocGarbanzo
Copy link
Contributor

@JoeSiu - thanks for your PR. Why would you want to put this data into the images, as they are used for training. This would distort the ability to learn. You have another PR where the car frequency data gets logged. This is more useful I think.

@JoeSiu
Copy link
Contributor Author

JoeSiu commented Jul 23, 2021

@DocGarbanzo This part is mainly used for easier debugging. For example, when testing the stop sign detection, It's easier to see the current pilot's throttle as well as the bounding box for the stop sign directly on the camera image while using the mobile app or web controller, instead of checking the output from the shell in a separate window which I think is less convenient. It will indeed affect the training through which I didn't consider at first, sorry about that!

Copy link
Contributor

@DocGarbanzo DocGarbanzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do this, pls have a look at the comments.

donkeycar/parts/info_overlay.py Outdated Show resolved Hide resolved
donkeycar/parts/info_overlay.py Outdated Show resolved Hide resolved
donkeycar/parts/info_overlay.py Outdated Show resolved Hide resolved
donkeycar/parts/info_overlay.py Outdated Show resolved Hide resolved
donkeycar/templates/complete.py Outdated Show resolved Hide resolved
@DocGarbanzo
Copy link
Contributor

@JoeSiu - thanks for addressing / solving all change requests. This looks very good to me now. Can you please do one last step and that is rebasing your branch on dev (this will require resolving some conflicts as complete.py got updated in the meantime), squashing your 3 commits into 1 and then force pushing your branch? This will create a single commit into the repo that keeps the history linear & I can merge this.

@JoeSiu
Copy link
Contributor Author

JoeSiu commented Aug 6, 2021

@DocGarbanzo I have rebased the branch, thank you!

Copy link
Contributor

@DocGarbanzo DocGarbanzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I have a couple of only minor comments, can you have a look at them?

"""

# Store the infos which will be write to image
info_list = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for this member to be a class member and not an instance member?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DocGarbanzo It is used so that info can be written directly from other parts like this and have a shared info_list

from donkeycar.parts.info_overlay import InfoOverlayer
InfoOverlayer().add("hello")

"hello" can then be written onto the image along with other info like throttle or angle. However, it is supposed to be used as a temporary method in this case for easier debugging.

donkeycar/parts/info_overlay.py Outdated Show resolved Hide resolved
donkeycar/templates/complete.py Outdated Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

2 participants