New MegaAI user.
Default model working fine but getting errors when running some of the listed alternative models.
eg. python3 test.py -dd -cnn landmarks-regression-retail-0009

result:
python3 depthai.py '-dd' '-cnn' 'emotions-recognition-retail-0003'
Traceback (most recent call last):
File "test.py", line 37, in <module>
p = subprocess.Popen(cmd, shell=True, preexec_fn=os.setsid)
AttributeError: module 'os' has no attribute 'setsid'

if I bypass test.py and run python3 depthai.py -dd -cnn landmarks-regression-retail-0009

previewout launches but its heavily pixelated and model doesn't work properly

    Hi MylesT ,

    Thanks for buying/supporting megaAI and sorry for the trouble here. Sharing this w/ the team now, and also going to try something out on a looming branch which supports multi-stage inference.

    Why is multi-stage inference relevant? So landmarks-regression-retail-0009 is only actually supposed to be used as a second stage after a face-detector. So the reason it's so pixelated is the network is used to having a low-resolution crop output from a face detector.

    So when used as a first-stage, the DepthAI library scales the full image sensor resolution down to some tiny resolution (like 60x80 or something like that).

    See this PR here for our work on multi-stage inference for supporting this better.

    I haven't tried this PR on megaAI yet (just hadn't thought to do it). Going to try it now and circle back.

    Oh and WRT the no attributesetid`` error, which OS are you running?

    Hi again MylesT ,

    So I tried the multi-stage branch w/ the landmarks-regression-retail-0009 branch, but it looks like we are missing triggering auto-focus (as far as I can tell) in that branch (it heavily refactored a lot of the camera interfacing/etc.), so it's a bit blurry as it stands now.

    It does seem to still find my face and also the facial landmarks despite the blurriness:

    Video: https://photos.app.goo.gl/eQhVEZYfKKkdYQpaA

    If it is indeed the case that we simply missed the auto-focus enable (and it's not something more complex), we'll likely have this fixed up by tomorrow.

    Thoughts?

    Thanks,
    Brandon

    Thanks Brandon.

    I was getting it on both Ubuntu 18.04 on RPi4 as well as on Windows. That latest example is on Windows.

    Noted on the multi-stage inference. When I run it per the same commands you've listed, I get an unrecognized argument error on -cnn2

    A few separate notes (happy to address in separate thread if necessary)

    1. Are there currently any config overrides for previewout resolution (framesize) etc
    2. Similarly, any config access for rotation of the camera stream?

      Thanks @MylesT ,

      Good to know, thanks! So it's necessary to run this branch (for now) for multi-stage inference:
      https://github.com/luxonis/depthai/pull/94

      And note that it it currently only has the post processing for parsing the landmarks-regression-retail-0009 as the second stage.

      Other networks are -probably- running behind the scene, but we haven't written the host-side processing of the metadata for display yet - so they won't work/display properly.

      I'll check into what is required to get the processing working for running other second-stage networks parsing/displaying properly (like emotions-recognition-retail-0003).

      So speaking longer-term, we have been refactoring our build system and our pipeline builder for significant improvements, including a visual editor where one can drag/drop the networks which are desired to be run in series/parallel and/or in a loop.

      This will improve the UX for doing multi-network systems like this (including CV functions/rules in-between). This is part of the reason the current flow isn't what it should be - as we've been focused on a longer-term more capable pipeline builder, which requires a re-architecting, instead of focusing as much on extending the current pipeline builder.

      From the fact that you are running on Windows, I think you are using the refactor branch, which lays the initial groundwork for this new build system (which will include PyPi.org support - so pip3 install depthai instead of having to clone a Github repo) and sets the stage for the v2 pipeline builder (which is in progress now and we expect to have initially released mid-July).

      So the branch w/ the current multi-stage pipeline support is actually in the old build system (and I don't think it's been brought over to the new build system, so I'm actually thinking it will not be supported on Windows yet).

      So the latest Windows-supporting branch is develop (here) which actually has in-progress documentation (here) corresponding to how the build system will change.

      I haven't yet tried develop on Windows (although I did try it on Mac and it worked).

      Thoughts?

      Thanks,
      Brandon

        MylesT

        1. We don't support other output resolutions with metadata overlay currently. We do however support 1080p h.264/h.265 (1920x1080) encoded video output. (And 4K h.265 in this branch, here... we're currently implementing the capability for the user to specify running at 1080p or 4K resolution.)


          So then the metadata could be overlaid on these streams on the host if of interest (or recorded separately, and overlaid later upon playback).

        We also took a stab at OpenDataCam support, which now does this overlaying for you (here). It's relatively experimental currently.

        The reason we didn't pursue larger preview windows for the unencoded color stream is because the bandwidth adds up fast for unencoded color streams.

        Is the encoded video sufficient? We could likely later implement labeling the encoded video directly (pre-encoding) on DepthAI so that the labels are actually part of the encoded video (after upgrading here), but we're not sure if this would have value.

        Thoughts on this?

        1. We don't have support for rotating the camera stream yet. We figured this would be a quick feature request though. So we've been discussing internally but haven't started implementation yet.


          Is this a must-have for your application? If so we can prioritize getting it out ASAP. Otherwise I just formally added it to the roadmap so I'd expect it to be released in 2 months along w/ the v2 pipeline builder.

        Thoughts overall?

        Thanks again!
        -Brandon

        Hi @MylesT, @Brandon

        Brandon And note that it it currently only has the post processing for parsing the landmarks-regression-retail-0009 as the second stage.
        I'll check into what is required to get the processing working for running other second-stage networks parsing/displaying properly (like emotions-recognition-retail-0003).

        Quick update: now it supports running emotions-recognition-retails-0003 as second-stage network with this command:
        ./depthai.py -cam left_right -cnn face-detection-retail-emotion-0004 -cnn2 emotions-recognition-retail-0003 -dd

        Demo shown as below:

        Video: https://photos.app.goo.gl/Q3qCVYkXPtV2D4L47

        Thanks,
        Steven

        19 days later

        I meant to circle back long ago that the blurriness issue is solved on the RGB camera as well:

        7 days later

        Thanks for the update guys. Appreciate the follow up.

        Separate note, saw the OAK launch, don't know if I missed it mentioned anywhere, but is that a "rebrand" of the current solution? or is it a separate project "inspired" by DepthAI and MegaAI

        Hi @MylesT ,

        Great question! So we've been working with OpenCV for now quite a while on this... we had been waiting to announce it as an OpenCV product to have all-at-once sort of impact. So the effort is one-and-the-same. So the platform will just continue to get better as we get more and more use-cases together with OpenCV.

        Thanks and sorry about the delay!

        -Brandon