Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

frames overlaying each other #93

Open
zain-altaf opened this issue Nov 14, 2022 · 5 comments
Open

frames overlaying each other #93

zain-altaf opened this issue Nov 14, 2022 · 5 comments
Assignees
Labels
comp:model Model related isssues comp:thirdparty Thirdparty related issues Hardware:Dev Board Mini Coral Dev Board Mini Issues subtype:Mendel Linux Mendel Linux Build/installation issues type:bug Bug type:feature Feature requests

Comments

@zain-altaf
Copy link

zain-altaf commented Nov 14, 2022

Description

Hi there, I wanted to save multiple frames from the anonymizer.py file for training a model. Was there a way to completely get rid of overlaying poses and only capture current frames in real time? I did try the --mirror, it did in fact reduce the number of frames but it never got rid of all of them and allowing to only capture one wire frame of the individual.

Click to expand!

Issue Type

Bug, Feature Request

Operating System

Mendel Linux

Coral Device

Dev Board Mini

Other Devices

Raspberry Pi 3

Programming Language

Python 3.7

Relevant Log Output

No response

@google-coral-bot google-coral-bot bot added comp:model Model related isssues comp:thirdparty Thirdparty related issues Hardware:Dev Board Mini Coral Dev Board Mini Issues subtype:Mendel Linux Mendel Linux Build/installation issues type:bug Bug type:feature Feature requests labels Nov 14, 2022
@hjonnala
Copy link

Feel free to replace the identity with other methods mentioned at: https://gstreamer.freedesktop.org/documentation/video/gstvideo.html?gi-language=c#GstVideoOrientationMethod.
I think, 180 would work.

@zain-altaf
Copy link
Author

Hi @hjonnala I replaced identity with 180 in the statement you mentioned. I then went on to run python3 anonymizer.py --mirror and the images were still overlaying, I'm guessing since the if statement makes it horizontal. I decided to then try and run python3 anonymizer.py without the mirror flag and the dev board mini is only able to detect my head. It can't detect my body, arms or legs. FYI since it is set at 180 my images were upside down but that's okay they were still viewable. However, although it was only able to pick up on my head, the number of overlaps reduced slightly showing signs of improvement. I'm wondering if there's anything that can be done so that the OD model also detects my arms, legs, torso, etc? Alternatively, is there a section in the code where I could perhaps, run a loop that ends with the picture being taken of the individual and all lines are erased from the frame before capturing the next iteration? Thanks again for all your help!

@hjonnala
Copy link

@zain-altaf
Copy link
Author

Hi again, today I spent some time going through most of the other methods mentioned on the documentation. Most of the other methods did not give me a good overall image of what was happening, sometimes the key points weren't being displayed while sometimes they were. When I entered the "auto" method it seemed to be okay but it still had a lot of overlaying frames from previous frames. When I entered "custom" it did a bit of a nicer job but I'm still getting a lot of overlaying of the frames. I was wondering if there are some sub settings maybe that are available to help curate these methods further? If not, is there a way to override a previously saved frame and only capture the current one? I've been looking on gstreamers documentations and haven't had much luck yet.

Thanks again for all your help I really appreciate it!

@hjonnala
Copy link

hjonnala commented Nov 22, 2022

Hmm..does just changing the pose detections without persons form pose camera works for you?

  1. mkdir images
  2. Initializei=1at: https://github.com/google-coral/project-posenet/blob/master/pose_camera.py#L132
  3. https://github.com/hjonnala/snippets/blob/main/posenet/pose_camera.py#L145
  4. and add the below lines after the for loop at: https://github.com/google-coral/project-posenet/blob/master/pose_camera.py#L160
        if len(outputs):
            svg_canvas.saveas(f'images/image_{i}.jpg')
            i=i+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
comp:model Model related isssues comp:thirdparty Thirdparty related issues Hardware:Dev Board Mini Coral Dev Board Mini Issues subtype:Mendel Linux Mendel Linux Build/installation issues type:bug Bug type:feature Feature requests
Projects
None yet
Development

No branches or pull requests

2 participants