Bug: react-scripts 4.0.1 : EBUSY: resource busy or locked, open 'C:...\project.eslintcache

Describe the bug
An error is emit after a yarn start (same with yarn build)
EBUSY: resource busy or locked, open C:\...\project\.eslintcache
Seems there is a concurential read/write on this file
Did you try recovering your dependencies?
Yes
$ npm --version
6.14.8
$ yarn --version
1.22.10

Which terms did you search for in User Guide?

eslintcache lock
windows lock

Environment
$ npx create-react-app --info
npx: installed 67 in 4.664s

Environment Info:

  current version of create-react-app: 4.0.1
  running from C:\Users\myuser\AppData\Roaming\npm-cache\_npx\15308\node_modules\create-react-app

  System:
    OS: Windows 10 10.0.19042
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
  Binaries:
    Node: 14.15.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.14.8 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 87.0.4280.66
    Edge: Spartan (44.19041.423.0), Chromium (87.0.664.47)
    Internet Explorer: 11.0.19041.1
  npmPackages:
    react: Not Found
    react-dom: Not Found
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

Create a project in typescript with eslint
Seems that the problem occurs only when there are a lot of files to build
Use react-scripts 4.0.1 (The version 4.0.0 works)
On "yarn start", an error occurs (90% of time but not always)

Expected behavior
yarn start works :)
Actual behavior

Reproducible demo
It's the difficult part.
The issue happen only on Windows (Due to a windows file locking) and when the project contains a lot of files
So, create a minimal project is hard and I cannot give you the project of my company

You may want to file this in the eslint repo? We're not doing anything special on our end AFAIK other than enabling the webpack plugin.

Thanks for your answer
Seems environmental because it works on some machines but not on some others. Very complex to identify.
So let's close this ticket

same problem

I reopened because it happen less often when I disable my Antivirus (Sophos) but it still have the issue sometimes

No way to reproduce the issue with "eslint --cache ."
Happen only when launched from react-script

Facing the same issue, and my colleagues the same. This happened after the upgrade to version 4.0.1
npm run start and npm run build both fail with the same error

Facing the same issue, and my colleagues the same. This happened after the upgrade to version 4.0.1
npm run start and npm run build both fail with the same error

Any updates on this? Same issue here.

No, I never solved the issue


cannot inline bytecode built with JVM target 11

Hi ,
I am using this library on my Compose ios multiplatform app. Everything works fine on the ios app but when I compile and run Android app it throws this error.
Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
And the error it throws on this line when I try to make asyncPainterResource:
val painterResource = asyncPainterResource(data = "https://image.tmdb.org/t/p/original${item.imageUrl}")
I have my common build.gradle file here : https://pastebin.com/WcbmF812
version Used : media.kamel:kamel-image:0.5.1

@jakepurple13  thanks for the workaround.
@contributers : do we have a proper fix for that?

You could just set your project's target to be JVM 11, or do you have a reason to not do that?

@luca992 I created this kmm project through the android studio and did not set any jvm target manually. Why should i change that?

@youranshul android studio uses 11 by default. Try setting target and source compatibility to 11 like in the sample here: https://github.com/Kamel-Media/Kamel/blob/e3b58c0768c3993c13489a7f9cfceb640aa2e3a2/kamel-samples/build.gradle.kts#L28

@luca992 I have tried setting it on Android's build.gradle.kts but the issue is the same.

I'm going to close this. If you want make a sample and I'll take another look. But here's some relevant info.
https://stackoverflow.com/questions/48988778/cannot-inline-bytecode-built-with-jvm-target-1-8-into-bytecode-that-is-being-bui
https://youtrack.jetbrains.com/issue/KTIJ-20816/Bogus-error-Cannot-inline-bytecode-built-with-JVM-target-11-into-bytecode-that-is-being-built-with-JVM-target-1.8.

try 0.7.2-SNAPSHOT I think it should not have that issue anymore. I'll publish a new version if that works


Making properties and methods protected

I've been working with fate a little lately and I really love the extendability of this module as you can customize most stuff with a personalised service.
The problem I encountered though is when I wanted to make the FateInputComponent do some specific stuff it wasn't meant to do because our project does some pretty non standard stuff from time to time.
In Angular you can easily take component A and extend it in B and have B just re-implement the @component decorator as well as override any properties/methods you want and you get your custom case specific second component without having to duplicate code.
For example, in our project I tired adding some custom event listeners on keypresses. Using el in my child class was impossible since it was private and not protected, so I had to save el as a second property elem in my child class and then get the query selector again basically duplicating some code because I didn't have the access to private properties of the base class.
Same with restoreSelection(), as it's a private property it's impossible to use it the child class even though it can be pretty useful.
Those are just some quick example of the top of my head but the more I look at the code the more I'd really appreciate it if most if not everything in that component was at least protected instead private. This would also enable us to make custom getters and setters for stuff we want to expose to some parent components trough viewChild.
So, are there any reasons why those properties must stay private instead of protected ?

You're right, I'll have a thorough look at all the properties and make them protected where it makes sense!


[Merged by Bors] - Fix void elements having closing tags

HTML defines certain elements as "void elements"

A void element is an element whose content model never allows it to have contents under any circumstances. Void elements can have attributes.
The following is a complete list of the void elements in HTML:
area, base, br, col, command, embed, hr, img, input, keygen, link, meta, param, source, track, wbr

And further it states:

Void elements only have a start tag; end tags must not be specified for void elements.

But the current implementation of the HTML serialisation does not follow this rule. Test / Example:
#[test]
fn self_closing_tags() {
    const HTML_INPUT: &str = r#"

"#;
    let vdom = tl::parse(HTML_INPUT, tl::ParserOptions::default()).unwrap();
    assert_eq!(
        r#"

"#,
        vdom.outer_html()
    );
}

Result:
---- self_closing_tags stdout ----
thread 'self_closing_tags' panicked at 'assertion failed: `(left == right)`
  left: `"<html><head></head><body><img src=\"\"><br><hr></body></html>"`,
 right: `"<html><head></head><body><img src=\"\"></img><br></br><hr></hr></body></html>"`'

This PR adds a check to see if the element is a void element and thus skips content & end tag serialization

Hmm did @bors-ng break? Just gonna merge it manually for now

Wtf?

Might have been my bad. I saw the automated "You’re all set — the [source]branch can be safely deleted" message here and so I hit "Delete branch". Could be it was too quick for other processes?

Not sure what happened exactly, but my guess is that I didn't give @bors enough time to react before merging manually so it tried to merge it again..? 🤷

Weird that it took 2 hours for the build to trigger/finish though, maybe its a GitHub thing.
Anyway, I'm doing some changes that I've been meaning to do for a while, then I'll publish a new version with this fix


Add Hook theme

Thanks! It looks like it's missing the min_version field

Thanks! It looks like it's missing the min_version field

Ah yes, for some reason I thought it wasn't required. Should be fixed now!

thanks!


Use platform-independent temporary directory

Fixes #511

It looks like we would have to import tempfile for this fix to work

Hi @npapernot, thanks for the review - tempfile is imported in this diff in utils_mnist.py here and was already imported in dataset.py here

Indeed, thanks!


resolve putStringProfileStringValue should give Response code as 400 if input string value is  other than enumeration values

Fixes #282

Reviewer is @PrathibaJee


Watson - Error Domain=com.ibm.watson.developer-cloud.TextToSpeechV1

If anyone knows what I am doing wrong feel free to post an answer.
So I am using watson from IBM and I want to use the Text To Speech funtion.
I am testing this on a simulator
I am using this code:

let textToSpeech = TextToSpeech(username: Credentials.TextToSpeechUsername, password: Credentials.TextToSpeechPassword)
    textToSpeech.serviceURL = Credentials.TextToSpeechUrl
    // The AVAudioPlayer object will stop playing if it falls out-of-scope.
    // Therefore, to prevent it from falling out-of-scope we declare it as
    // a property outside the completion handler where it will be played.
    var audioPlayer = AVAudioPlayer()

    let text = "hello john"
    let accept = "audio/wav"
    let voice = "en-US_LisaVoice"
    let failure = { (error: Error) in print(error) }
    textToSpeech.synthesize(text: text, accept: accept, voice: voice, failure: failure) { data in
        audioPlayer = try! AVAudioPlayer(data: data)
        audioPlayer.prepareToPlay()
        audioPlayer.play()
    }

The credencials and the Url are correct.
The error I get is:
Error Domain=com.ibm.watson.developer-cloud.TextToSpeechV1 Code=403 "Forbidden" UserInfo={NSLocalizedDescription=Forbidden}
this is my .plist

I post this problem on stackOverflow so I you want to answer me there its ok.
https://stackoverflow.com/questions/51783848/watson-error-domain-com-ibm-watson-developer-cloud-texttospeechv1

The 403 Forbidden error comes from the service, and basically means that your credentials are incorrect. Try issuing the same command with Curl using these credentials. That should confirm that your credentials are incorrect. If you can demonstrate that your credentials work with Curl but not with the Swift SDK, please reopen this issue.


fix #334 Compilation failed if method has @Nonnull annotations

@mkristian
Hi, when you have time, could you review this PR?
Thanks


Deployment of the projet

Prepared to deploy

Needd to change for deploy part with redis
Adding 5 more hours


Configurable regions

This tool is fantastic.  Working for a company who deploys a lot of services on ECS, this is a great dashboarding tool.
The only drawback is the region is hard-coded.  I've actually tried to make it passable via the environment but while it gets set on the server side, it doesn't get set on the client for some reason.  If the region could be passed in (say via AWS_REGION), that would be handy!

Hi @dnorth98, thanks for raising this. Before we open sourced this project it was only used in house and only in a single aws region, this (along with similar configurations) is definitely something to address - So good shout!
It's a pretty big blocker so we'll get right on it, unless you have put some work in to this already? If so feel free to put in a pull request.

Thanks Marc!  Yeah I played around this morning in a fork and got the
region settable for the dev "mode" and added an endpoint to the server to
pass the region to the client.  I can't for the life of me see how to get
the client to call the sever though (I'm a DevOps guy so python is my
thing, JavaScript is all new :) ).
Anyway, I will keep on it and hopefully send you a PR.  The setting in dev
is in my fork so I at least have that to work with :)
Again, fantastic tool!
On Feb 9, 2018 1:37 PM, "Marc Costello"<EMAIL_ADDRESS>wrote:

Hi @dnorth98 https://github.com/dnorth98, thanks for raising this.
Before we open sourced this project it was only used in house and only in a
single aws region, this (along with similar configurations) is definitely
something to address - So good shout!
It's a pretty big blocker so we'll get right on it, unless you have put
some work in to this already? If so feel free to put in a pull request.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tombolaltd/ecs-monitor/issues/27#issuecomment-364519747,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGT2f6L83jM5mlHxhi0z3h8lecY646iXks5tTJBRgaJpZM4SAFq4
.

https://github.com/tombolaltd/ecs-monitor/commit/c78dacc91d8781ead00aebb113a48de3c848abb9
It was getting the better of me, so I've added what you need. The region is now configurable by settings an AWS_REGION property in the devCredentials.json for development, and setting an AWS_REGION environment variable for production. i.e.
$ docker run -p 1337:1337 --rm \
    -e AWS_REGION=... \
    -e AWS_ACCESS_KEY_ID=... \
    -e AWS_SECRET_ACCESS_KEY=... \
    ecs-monitor

The server knows which aws region to use by looking for the process.env.AWS_REGION we pass in at runtime. And passes it down to the client in the /authenticate request.
Hope this helps @dnorth98! Let me know if you have any other issues.

  Thanks so much.  This is along the lines I was going
but being a JS noob, your solution is 1000x cleaner than what I had so
far.  Thanks again, I'll be putting this on our main dashboard display next
week.
On Fri, Feb 9, 2018 at 3:01 PM, Marc Costello<EMAIL_ADDRESS>wrote:

Closed #27 https://github.com/tombolaltd/ecs-monitor/issues/27.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tombolaltd/ecs-monitor/issues/27#event-1467406892,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGT2f6r5Wm0XjbhYJprYReZ7NcFnkmglks5tTKQVgaJpZM4SAFq4
.

--
Dave North
Nerd at large


Fix the --serial and --fail-fast flags.

Also fixes the test that was supposed to cover --serial.
Fixes #499

I am not really sure why the last commit is more performant. It would obviously be more performant to extend the prototype if we were creating many Runner instances, but we only create one per process.
Two comparisons before the last commit:

after the last commit:

:+1: Generally looks good :)

@sindresorhus - made all the recommended changes except the global.Promise =  one.

You missed https://github.com/sindresorhus/ava/pull/503/files#r51689060 ;)

OK. Done now.

Thanks for fixing so quickly :)


Windows 10 License requirements

In reference to the article: https://azure.microsoft.com/en-in/offers/ms-azr-0148p/
For deploying Azure VM with Windows 10 client OS in an Azure Dev/Test subscription, is a Windows 10 license required. Also, are there any discounts while deploying a Windows 10 VM in an Azure Dev/Test subscription.

Thank you for your detailed feedback.  We are looking into the issue, and we will respond when we have more information.

As mentioned in the article,

"All Windows and Windows Server Virtual Machines, Cloud Services, App Service (basic, standard, Pv2, Pv3), Logic Apps and HDInsight are discounted off your normal Enterprise Agreement rates. The Dev/Test rate on these services is equal to the rate for a Linux virtual machine of the same size and type."

You can also find the current list of licences included in your Visual Studio licensing on this page: https://visualstudio.microsoft.com/vs/pricing/

For an Azure Dev/Test subscription, on selecting Windows client image from
the Azure marketplace, I am able to see the below confirmation instead of
say "I confirm I have a Visual Studio subscription". It is a bit confusing,
since multitenant hosting rights is for Production workloads.
[image: image.png]
On Tue, Apr 6, 2021 at 10:37 PM Samara Soucy @.***>
wrote:

Closed #73221 https://github.com/MicrosoftDocs/azure-docs/issues/73221.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/azure-docs/issues/73221#event-4558033005,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AD6FCKANXLQAVEXEFLA7QFLTHM5WRANCNFSM42KBWKMQ
.

@devikamv Can you repost the image? I didn't post through the email reply.


Buttons misbehavior

1- On startup settings button is missing and doesn't appear until u press the themes switch button or entering then existing Fullscreen mode (disappear again after restarting the app)
2- After pressing the themes switch only half of the button is visible and stay like that until the app is restarted or entering then existing Fullscreen mode

This is unfortunately a problem with 3rd party tooling MaterialDesignInXaml and have been issued since 2017 (#767) without response.
I'll keep this up in case i found a manual fix.

Won't forcing a redraw fix this?, or simply just resizing at startup the app width +1 then -1 again is enough and it won't be visible.


unnest.js: improve unnestLinks()

While https://github.com/AmerMathSoc/texml/issues/198 could help a lot, we could still do a better job here -- either more like HTML parsing or by stripping inner links.

I guess this relates to #430

Following the F2F for https://github.com/AmerMathSoc/texml/issues/198, it's more consistent to "flatten" nested links and emit a warning (since we can assume that texml will prevent them, too).

This will formally be a breaking change.

I'm leaning towards removing unnest.js entirely and taking the reverse approach, i.e., check the output for .closest('a') and respond.
That will simplify xref (which has a special case for toc-entry//xref from the earliest days because toc-entry generates a link).


datepicker custom-class not rendering with function that uses $resource data

The datepicker module seems to not 'render' correctly if supplying a customClass that takes data from an async $resource. Going through the sourcecode i realized that selecting a new date forces the directive to renderView() which in turn triggers the customClass. However even though the function gets called and assings the correct custom class it is still not visible on the HTML. I am not sure whether this is an issue with the a-ui or DOM itself since the customClass gets called and attaches the style to the DOM element - at least that's what chrome debug tells me.
To correctly display the custom class on the date i have to switch to another month and then go back to the previous.
I modified the tutorial plunker to reflect this problem by adding one of the two custom classes after a 10ms timeout (line 50-ish). In addition I added a small counter that increases every time the customClass function (getDayClass) gets called due to renderView() calls in the bootstrap.datepicker directive. This shows that the renderView gets called, the classes even get attached to the DOM but they are not rendered.
http://plnkr.co/edit/h8PxWfxSEtZuVCct00mD?p=preview
Reproduce:

load the plunker > you should see one green day (tomorrow)
click on a random day > the counter on the bottom should increase, indicating that the customClass was called (click on a day triggers renderView())
still only one day with a special class
switch to next month and back
see day after tomorrow also highlighted with special class

I tried investigating the issue in the sourcecode but i couldn't find any trails to pursue..so it would be great if you can point me in the right direction!
bower.json / versions used
  "dependencies": {
    "angular": "~1.3.0", =>  @license AngularJS v1.3.17
    "angular-bootstrap": "0.13.x", => * Version: 0.13.2 - 2015-08-02
    "angular-route": "latest",
    "angular-resource": "latest",
    "bootstrap": "3.3.x",
    "requirejs-text": "2.0.x",
    "requirejs": "2.1.x"
  },
  "devDependencies": {
    "angular-mocks": "~1.3.0"
  }
}

Closing as this is essentially a duplicate of #4626

I note this is closed but if you then click on another date the one previously selected will likely show up (at least it does in my rig)
Since I'm using a custom build anyway, I am going to find a way to expose the function and call in manually when you change the input data

super hacky but this seems to work for me. Replace the function in datepicker. I tried using $timeout but it didn't like it.
Step 1. Change the signature to include a retry variable. Its just a placeholder to kill the infinite loop.
this.refreshView = function(retry) {

Step 2. Add this to the end of the function
if(!retry){
      setTimeout(function () {
        console.log("Refreshing view timeout");
        _this.refreshView(true);
        $scope.$apply();
      }, 1);
    }

Full Code:
this.refreshView = function(retry) {
    console.log("Refresh view");
    if (this.element) {
      $scope.selectedDt = null;
      this._refreshView();
      if ($scope.activeDt) {
        $scope.activeDateId = $scope.activeDt.uid;
      }

      var date = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null;
      date = dateParser.fromTimezone(date, ngModelOptions.timezone);
      ngModelCtrl.$setValidity('dateDisabled', !date ||
        this.element && !this.isDisabled(date));
    }
    var _this = this;

    if(!retry){
      setTimeout(function () {
        console.log("Refreshing view timeout");
        _this.refreshView(true);
        $scope.$apply();
      }, 1);
    }

  };


How to render different face effect

In face effect module I can 3d data as
glasses.pbtxt
facepaint.pngblob
glasses.pngblob.
I am trying to add few more models to experiment but i couldnt find any documenation or information of pngblob data.
It seems like that using glasses.pbtxt 3d model is generated at runtime and glasses.pngblob is getting used as texture. Can you please clear that is it right and how is it happening
Ques 1-
Can you please provide any documentation of pngblob datatype.
How  can i create new 3d model (pngblob / binarypb ) to render on face.
Most common format of 3d model data are OBJ, FBX, etc. Is there any way to convert these format of 3d data to binarypb / pngblob?
Ques 2-
it is mentioned in gl_animation_overlay_calculator.cc that .obj.uuu can be created using the mentioned SimpleObjEncryptor but I couldn't find that. can you please specify where to find that ?
ANIMATION_ASSET (String, required):
//     Path of animation file to load and render. Should be generated by
//     //java/com/google/android/apps/motionstills/SimpleObjEncryptor with
//     --compressed_mode=true.  See comments and documentation there for more
//     information on custom .obj.uuu file format.

Hey @ashrvstv,
Thanks for your interest!
PNGblob
In fact, it is a regular PNG format; .pngblob is used instead of .png to prevent iOS build from preprocessing the image. OpenCV is unable to read a PNG file preprocessed by the iOS build. So you can use any filename.png for your effect, just rename it filename.pngblob
3D Model
Ultimately, the model .pbbinary file must follow the mediapipe.face_geometry.Mesh3d binary protobuf format in order to be rendered. Here's a path for turning an OBJ 3D model into that format step-by-step:

Convert an OBJ model into mediapipe.face_geometry.Mesh3d text protobuf format. We do not provide an official OBJ -> Mesh3d pbtxt converter, but I can share a non-official one that I wrote to convert the glasses OBJ asset: link
Use encode_binary_proto Bazel rule to convert model.pbtxt into model.pbbinary: link

If you have your 3D models in a format other than OBJ, then please try to convert those into OBJ first. Please note, that your model must not have more than 65535 (2 ^ 16 - 1) vertices due to the effect renderer limitations.
The gl_animation_overlay_calculator.cc question
I believe that converter is not available in this repository, sorry about that! You can understand what format is expected by reading its parsing logic: link. Then, you might implement your own converter. I believe, there's nothing we can easily share with you right now to ease your workload :/

Thankyou so much @kostyaby for your detailed response.
your response about PNGblob and 3D Model is perfectly clear to me.
The gl_animation_overlay_calculator.cc question
I read the parsing logic : link. I understand the logic. I just have a single doubt that how the model is getting divided into frames. robot.obj.uuu has data in form
vertices    text_coord    indices
................................
................................
................................
vertices    text_coord    indices
................................
................................
................................
.
.
40 times.

so what is the criteria to divide the obj data into frames.
how to decide the values of vertices    text_coord     indices
link
when i printed the values for vertices    text_coord    indices for each frame
it  showed
6453 4302 4446
6453 4302 4446
6453 4302 4446
6453 4302 4446
6453 4302 4446
6453 4302 4446
.
.
.
.
40 times

According to my understanding it should be according to connected triangular meshes so that normal of each vertices can be normalized at one frame of data. But i am not sure, actually really confused.
It would be really helpful if you provide a hint for the same.

Hello. @kostyaby
I have a question. Usually 3d softwares often export OBJ file with MTL file. How can I create a PNG file of glasses like in the demo Faceeffect?

Hey @at-duymai,
One of the reasons I decided against supporting OBJ format directly was exactly the fact that we'd have to support MTL material shading and it felt too complex for a basic example. Therefore, we do support OBJ topology format via converting into mediapipe.face_geometry.Mesh3d via the non-official converter; however, we only support the simplest color texture shading model, so there's no need for MTL file as all those diffuse / reflectivity / other parameters don't make sense for the color texture shading model.
To create an asset for our face effect renderer, you first need to model it in some 3D asset authoring tool (Blender / Maya / Cinema 4D). After the asset is modeled, you need to export its topology as OBJ and then convert it into mediapipe.face_geometry.Mesh3d using the tool; as for the asset material part, you just need to export its color texture (remember, our shading model only support that component) as PNG and hook it up into the renderer

@kostyaby how to load the images like facepaint.pngblob dynamically from a file storage(google drive) ?
or is there any provision to change the color of the texture dynamically  which is marked in the .pngblob file.

Hey @breathim,
I believe that dynamic asset management is an orthogonal functionality which is well beyond our face effect example, as it lies in the realm of general mobile/desktop/web platform app development. At this point, MediaPipe doesn't provide any built-in solution for that and is instead strictly about running image / video processing pipelines
As long as you are able to download an asset and pass the correct path to the renderer, it'll have no problem reading / interpreting those instead of app-bundled assets.

@kostyaby what do I need to modify in case I want to add more complex 3D models with lighting (e.g. diamond). In that case color texture won't be enough. So how can I add support for mtl files?

Hey @ashrvstv,
This is an example renderer, that showcases some basic techniques of face AR. At the current moment, we do not intend to make it as comprehensive as what you might expect from other production-quality AR renderers like Snapchat / Facebook has in their user-facing products
If you are interested in mobile platforms, I'd recommend you to take a lot at https://github.com/google/filament. It shouldn't be hard to drive the Filament renderer using mediapipe.face_geometry.FaceGeometry to create effects of a much better visual quality.

Hey @ashrvstv, is there any example or documentation for using face effects with the tensorflowJS model?

@ashrvstv You must create your own file-calculator which implement filament as a renderer. I work at this, but it's a little bit complicated)

@GamerWael, there is none; I'm not even sure MediaPipe has a TensorflowJS inference calculator as TensorflowJS itself is not a native library
You could theoretically make a calculator like that only for Web platform and use Emscripten bindings to pass data between native WASM binary and TensorflowJS. At this point, I'm not sure it worth it as Tensorflow Lite inference calculator is being beautifully compiled into WASM and has Web-specific accelerations via XNNPACK
@konovalov-k, I've been looking into that a few months ago; if you are interested, I'll share my progress notes here:

There are 2 ways Filament can be integrated with MediaPipe: 1) as a calculator and 2) as a separate mobile app component, that passes signals from MediaPipe graph into the Filament renderer
The challenging part about completing 1) is that MediaPipe and Filament have pretty different ways to get GPU initialized; Filament needs a native surface, MediaPipe doesn't provide that explicitly.
In the end, I was able to only make the OpenGL backend work by providing my own backend::OpenGLPlatform implementation, which is essentially no-op and thus allows Mediapipe to handle GPU initialization (PlatformWebGL is what I used as a basis for my custom platform). Other backends (Metal on iOS, Vulkan on modern Android) wasn't possible to hook up with the way Filament is currently implemented; I chatted with the framework team a bit and generally they were not super happy that I was meddling with custom GPU initialization and warned me that there might be potential future issues as they do not expect to provide support at such low-level of the API.
TLDR on 1): it is possible to integrate Filament as calculator, but it's challenging, fragile and only gives you access to the old OpenGL ES 3.0 graphics backend.
This brings me to the 2) solution. You set up MediaPipe graph & Filament renderer separately in your app; then, set up a mechanism for passing face tracking results from the MP graph into the renderer (if you have apps for Android + iOS, then you'd have to write this logic twice OR extract common pieces into a native C++ library of your own). I haven't tried it myself, but it sounds way easier as it mostly about plumbing code that doesn't meddle with GPU

Hopefully this was helpful!

Hi @kostyaby, i followed your suggestions with steps to convert another 3D glass OBJ into mediapipe.face_geometry.Mesh3d text protobuf format, but somehow when load it in Android, the glass was partially seen (half of the glass) and it does not attach to the the eye area, that makes me wonder maybe i am missing some critical configuration to define the boundary or using landmarks to define where the glass should go to?

Hey jianinz@,
It sounds to me like your 3D glasses model wasn't aligned with the canonical face mesh 3D model (mentioned here under the Bridges static and runtime spaces point; model OBJ)
Can you please confirm, that when both the new glasses model & the canonical face model are imported into the same 3D scene, the glasses are "aligned" with the face? You can check that by, for example, importing both models into some 3D software tool (Blender, Maya etc)

Hi @kostyaby, you are correct, they are not aligned, the new glass model is way too small compare to the canonical face 3D model. Thanks!

 I wonder that is it possible to mux different face effects (glass, earrings, necklace etc) at the same time? I have tried to use multiple FaceGeometryEffectRendererCalculator within each having its own effect texture and mesh_3d, in the end using ImmediateMuxCalculator to mux them, unfortunately it does not work as expected. Do you know if i missed something important here? Thanks

Hey @jianinz,
Currently in the example, there are 2 effects guarded by a single is_facepaint_effect_selected flag. If it's true, then the Facepaint effect will be rendered; if it's false, then the Glasses effect will be rendered. When you switch from 2 effects to 3+ effects, this single boolean flag approach no longer works
For N effects, I'd introduce N graph input streams with boolean flags. Ex: is_facepaint_effect_selected, is_glasses_effect_selected, is_necklace_effect_selected etc. With every input frame, you must then sent all these N boolean flags into the graph and exactly one of them must be true
Alternatively, you can implement a new calculator in C++ that picks the effect based on the index - this way, you'll be able to keep the number of additional graph input streams to zero by essentially replacing the is_facepaint_effect_selected boolean flag packet with selected_effect_idx integer packet.

Thanks @kostyaby for your suggestions. Will look into that!

Hey @kostyaby i followed your below reply and generated model.pbtxt
basically i used this by converting glb to obj

Hey @at-duymai,
One of the reasons I decided against supporting OBJ format directly was exactly the fact that we'd have to support MTL material shading and it felt too complex for a basic example. Therefore, we do support OBJ topology format via converting into mediapipe.face_geometry.Mesh3d via the non-official converter; however, we only support the simplest color texture shading model, so there's no need for MTL file as all those diffuse / reflectivity / other parameters don't make sense for the color texture shading model.
To create an asset for our face effect renderer, you first need to model it in some 3D asset authoring tool (Blender / Maya / Cinema 4D). After the asset is modeled, you need to export its topology as OBJ and then convert it into mediapipe.face_geometry.Mesh3d using the tool; as for the asset material part, you just need to export its color texture (remember, our shading model only support that component) as PNG and hook it up into the renderer

Now, how to export color texture as PNG.
Need your guidance

Hi @Nvelu048,
Given that Glb is a format provided alongside with glTF, I'd be looking for a corresponding texture converter somewhere around tooling provided by Khronos.
For that Deep Cowboy Medical Face Mask model in particular, you can alternatively choose to download it as Original / Updated glTF from the Poly website and use the provided JPG texture as-is (our renderer should supports both PNG & JPG)

Hi @kostyaby
as per your guidance, i did as follows:

Downloaded Deep Cowboy Medical Face Mask and used it's jpg texture
For pbtxt file, i have imported glTF file in Blender and aligned it in accordance with canonical_face_mesh and exported it as obj file
Then, used the provided script to generate pbtxt file.
Then updated the graph and started the app.
In log i could find assets were successfully loaded.

But still effect doesn't gets rendered
I don't know where i am going wrong

HI @kostyaby i want to export the color texture in png format using blender but enable to figure out how to get from blender. Could anyone please help me. I am able to get .mtl file from blender while exporting .obj from blender.

Hey @Ravipuniya,
Have you tried googling? Something along these lines seems relevant: link.
There's of course a possibility, that there are no underlying textures for a given material, but it's rather represented through parameters. In this case, you are looking for a way to "bake" that material into a texture. Something like this seems relevant for this case: link 1, link 2

Hey @Nvelu048,
I think the alignment step might be incorrect. I imported both the mask_aligned.obj and canonical_face_mesh.obj into Blender (v 2.79) and they are not aligned. Please check out the following screenshots:

Can you please confirm that importing both *.obj models into your Blender environment produces the same result? If so, then you might want to re-align the 3D model and then re-export.

I'm also trying to figure out how to add new face paint effects to the example app.

It seems to that facepaint.pngblob is aligned with canonical_face_model_uv_visualization.png. For new face paint designs, do we need to manually perform this process? I guess the flow is like:

manually label some key points like eyes, mouth, nose and edge of the mask
scale and warp the mask to align with the canonical face uv map

Do I miss anything or is there better way to do this? Thanks.

Hi @kostyaby
When i imported mask_aligned.obj file in blender-2.91.0
It was aligned as below in layout mode

I used canonical_face_mesh.fbx, which i got from ARCore Project.
Am i referring the wrong canonical_face_mesh.  If so, Kindly share the obj format

Hey @brucechou1983,
You are right that the face paint texture should be aligned with UV coords of the canonical face mesh (visualization of which is available in canonical_face_model_uv_visualization.png).
The procedure for generating new face paint texture described by you looks fine to me. Maybe it will simplify the first step if I share this psd file from AR Core repo. AR Core runs a similar backbone for its Augmented Faces API as MediaPipe Face Geometry API; that texture in particular is perfectly aligned with our UVs

Hey @Nvelu048,
You are right that AR Core canonical face model is likely positioned differently. According to this, they 1) use 0.01 scale along all axis - which explains why on my screenshots the face mask is so tiny - and 2) use left-handed 3D space (the one with +Z axis instead of -Z axis) - which explains why the face mask is rotated along Y axis.
Besides that psd file that I shared in my response to @brucechou1983, please avoid mixing and matching assets between MediaPipe Face Geometry and AR Core Augmented Faces libraries as they do not necessarily match; You can find assets for the Face Geometry API here

Hi @kostyaby
Thanks a lot. Able to render 3d effects as expected.

@kostyaby Can you please share some details how you correctly align mask to canonical face model. Or Can you share your *.obj and *.pngblob file so that I can check it in Blender. Will be thankful

@kostyaby Can you please share some details how you correctly align mask to canonical face model. Or Can you share your *.obj and *.pngblob file so that I can check it in Blender. Will be thankful

Hi @kostyaby
It's possible to render another 3d effect, and i wonder if it's possible to render multiple 3d effect at the same time with each of them having different color texture? for instance, i'd like to have a pair of glass together with a horn (i know it's odd combination :)) with both of them having different color texture

Hi @kostyaby
It's possible to render another 3d effect, and i wonder if it's possible to render multiple 3d effect at the same time with each of them having different color texture? for instance, i'd like to have a pair of glass together with a horn (i know it's odd combination :)) with both of them having different color texture

Hi @afsaredrisy,
I'm not an expert in 3d modeling, but the goal is to make sure the 3d asset you have "fits" the canonical face 3d model; This can achieved by scaling / rotation / translating the 3d asset until it meets the goal criteria. If you are looking for a 3d modeling tool, then I'd recommend starting with Blender as it's free, has reasonable docs and can get you there
There's an example OBJ asset available here; if I remember correctly, it's the red glasses asset that you see in the example app, so you can use this texture. Alternatively, many 3d editors allow you to work with a 3d model without a texture, so you might not need a texture at all

Hi @jianinz,
The way it's currently implemented, your only option is to stack multiple FaceGeometryEffectRendererCalculators one after another to first render a pair of glasses and then a horn. However, if you could "merge" color textures, UV coordinate space and XYZ positions for those two 3d models into one model, then you could get by a single FaceGeometryEffectRendererCalculator.
I'm sorry about the inconvenience! This renderer was built as an simple example, so it support the bare minimum of functionality :/

Hi @afsaredrisy,
I'm not an expert in 3d modeling, but the goal is to make sure the 3d asset you have "fits" the canonical face 3d model; This can achieved by scaling / rotation / translating the 3d asset until it meets the goal criteria. If you are looking for a 3d modeling tool, then I'd recommend starting with Blender as it's free, has reasonable docs and can get you there
There's an example OBJ asset available here; if I remember correctly, it's the red glasses asset that you see in the example app, so you can use this texture. Alternatively, many 3d editors allow you to work with a 3d model without a texture, so you might not need a texture at all

Hi @jianinz,
The way it's currently implemented, your only option is to stack multiple FaceGeometryEffectRendererCalculators one after another to first render a pair of glasses and then a horn. However, if you could "merge" color textures, UV coordinate space and XYZ positions for those two 3d models into one model, then you could get by a single FaceGeometryEffectRendererCalculator.
I'm sorry about the inconvenience! This renderer was built as an simple example, so it support the bare minimum of functionality :/

Hi @kostyaby thanks for your suggestion! I have tried to stack multiple FaceGeometryEffectRendererCalculators, although ImmediateMuxCalculator seems do not mux those effects at all, it seems just select one or another effect like in the face effect example app. Am i missing something?

Hi @kostyaby thanks for your suggestion! I have tried to stack multiple FaceGeometryEffectRendererCalculators, although ImmediateMuxCalculator seems do not mux those effects at all, it seems just select one or another effect like in the face effect example app. Am i missing something?

Hi @jianinz,
What you need to do is to re-assign some input / output stream. Let's take face_effect_gpu.pbtxt as an example: if you want to first render the Facepaint effect and then the Glasses effect, then then output stream of the first renderer calculator (i.e. output_stream: "IMAGE_GPU:facepaint_effect_output_video") must go as the input stream of the second renderer calculator (i.e. input_stream: "IMAGE_GPU:facepaint_effect_output_video").
Please note, that you'll likely need multiple instances of the same FaceGeometryEffectRendererCalculator doing the same effect (like Glasses) for each of the possible paths (like, only Glasses and Facepaint + Glasses). The reason for that is that it's not possible to dynamically re-assign input / output stream names in MediaPipe, so the renderer calculator for Facepaint effect can only output into either facepaint_effect_output_video or glasses_effect_throttled_input_video
Let me know if you have questions!

Hi @jianinz,
What you need to do is to re-assign some input / output stream. Let's take face_effect_gpu.pbtxt as an example: if you want to first render the Facepaint effect and then the Glasses effect, then then output stream of the first renderer calculator (i.e. output_stream: "IMAGE_GPU:facepaint_effect_output_video") must go as the input stream of the second renderer calculator (i.e. input_stream: "IMAGE_GPU:facepaint_effect_output_video").
Please note, that you'll likely need multiple instances of the same FaceGeometryEffectRendererCalculator doing the same effect (like Glasses) for each of the possible paths (like, only Glasses and Facepaint + Glasses). The reason for that is that it's not possible to dynamically re-assign input / output stream names in MediaPipe, so the renderer calculator for Facepaint effect can only output into either facepaint_effect_output_video or glasses_effect_throttled_input_video
Let me know if you have questions!

Please note, that you'll likely need multiple instances of the same FaceGeometryEffectRendererCalculator doing the same effect (like Glasses) for each of the possible paths (like, only Glasses and Facepaint + Glasses).

Do you mean the actual 3D model needs to be Facepaint + Glasses?
What i did was:
# Renders the eyepatch effect.
node {
  calculator: "FaceGeometryEffectRendererCalculator"
  input_side_packet: "ENVIRONMENT:environment"
  input_stream: "IMAGE_GPU:throttled_transformed_input_video_gpu"
  input_stream: "MULTI_FACE_GEOMETRY:multi_face_geometry"
  output_stream: "IMAGE_GPU:eyepatch_effect_output_video"
  node_options: {
    [type.googleapis.com/mediapipe.FaceGeometryEffectRendererCalculatorOptions] {
      effect_texture_path: "mediapipe/graphs/face_custom/data/eyepatch.pngblob"
      effect_mesh_3d_path: "mediapipe/graphs/face_custom/data/eyepatch.binarypb"
    }
  }
}

# Renders the Sunglass effect.
node {
  calculator: "FaceGeometryEffectRendererCalculator"
  input_side_packet: "ENVIRONMENT:environment"
  input_stream: "IMAGE_GPU:eyepatch_effect_output_video"
  input_stream: "MULTI_FACE_GEOMETRY:multi_face_geometry"
  output_stream: "IMAGE_GPU:output_video"
  node_options: {
    [type.googleapis.com/mediapipe.FaceGeometryEffectRendererCalculatorOptions] {
      effect_texture_path: "mediapipe/graphs/face_custom/data/pirate.pngblob"
      effect_mesh_3d_path: "mediapipe/graphs/face_custom/data/pirate.binarypb"
    }
  }
}

as you can see that the input stream of second FaceGeometryEffectRendererCalculator takes in the output of first FaceGeometryEffectRendererCalculator. But this gives me only the second renderer effect.

Please note, that you'll likely need multiple instances of the same FaceGeometryEffectRendererCalculator doing the same effect (like Glasses) for each of the possible paths (like, only Glasses and Facepaint + Glasses).

Do you mean the actual 3D model needs to be Facepaint + Glasses?
What i did was:
# Renders the eyepatch effect.
node {
  calculator: "FaceGeometryEffectRendererCalculator"
  input_side_packet: "ENVIRONMENT:environment"
  input_stream: "IMAGE_GPU:throttled_transformed_input_video_gpu"
  input_stream: "MULTI_FACE_GEOMETRY:multi_face_geometry"
  output_stream: "IMAGE_GPU:eyepatch_effect_output_video"
  node_options: {
    [type.googleapis.com/mediapipe.FaceGeometryEffectRendererCalculatorOptions] {
      effect_texture_path: "mediapipe/graphs/face_custom/data/eyepatch.pngblob"
      effect_mesh_3d_path: "mediapipe/graphs/face_custom/data/eyepatch.binarypb"
    }
  }
}

# Renders the Sunglass effect.
node {
  calculator: "FaceGeometryEffectRendererCalculator"
  input_side_packet: "ENVIRONMENT:environment"
  input_stream: "IMAGE_GPU:eyepatch_effect_output_video"
  input_stream: "MULTI_FACE_GEOMETRY:multi_face_geometry"
  output_stream: "IMAGE_GPU:output_video"
  node_options: {
    [type.googleapis.com/mediapipe.FaceGeometryEffectRendererCalculatorOptions] {
      effect_texture_path: "mediapipe/graphs/face_custom/data/pirate.pngblob"
      effect_mesh_3d_path: "mediapipe/graphs/face_custom/data/pirate.binarypb"
    }
  }
}

as you can see that the input stream of second FaceGeometryEffectRendererCalculator takes in the output of first FaceGeometryEffectRendererCalculator. But this gives me only the second renderer effect.

Hey @jianinz,
Yeah, you did exactly what I purposed by chaining 2 renderer calculators. It's unexpected that you only see the second effect :/
Is there a standalone pirate effect in the graph? If so, can you please confirm that this eyepatch + pirate chained effect path is triggered instead of the just pirate effect path? Also, can you please confirm that the eyepatch effect can be renderer stand by itself?

Hey @jianinz,
Yeah, you did exactly what I purposed by chaining 2 renderer calculators. It's unexpected that you only see the second effect :/
Is there a standalone pirate effect in the graph? If so, can you please confirm that this eyepatch + pirate chained effect path is triggered instead of the just pirate effect path? Also, can you please confirm that the eyepatch effect can be renderer stand by itself?

Hi @kostyaby ,
yeah, it's odd, i checked it again, there is a standalone pirate effect in the graph, adding log in effect_renderer_calculator.cc shows that both effects were read from correct path. If i just have standalone eyepatch effect, it can be correctly rendered.
The complete graph regarding the render effect nodes are:
# Renders the standalone eyepatch effect.
node {
  calculator: "FaceGeometryEffectRendererCalculator"
  input_side_packet: "ENVIRONMENT:environment"
  input_stream: "IMAGE_GPU:throttled_transformed_input_video_gpu"
  input_stream: "MULTI_FACE_GEOMETRY:multi_face_geometry"
  output_stream: "IMAGE_GPU:eyepatch_effect_output_video"
  node_options: {
    [type.googleapis.com/mediapipe.FaceGeometryEffectRendererCalculatorOptions] {
      effect_texture_path: "mediapipe/graphs/face_custom/data/eyepatch.pngblob"
      effect_mesh_3d_path: "mediapipe/graphs/face_custom/data/eyepatch.binarypb"
    }
  }
}

# Renders the standalone eyepatch effect.
node {
  calculator: "FaceGeometryEffectRendererCalculator"
  input_side_packet: "ENVIRONMENT:environment"
  input_stream: "IMAGE_GPU:throttled_transformed_input_video_gpu"
  input_stream: "MULTI_FACE_GEOMETRY:multi_face_geometry"
  output_stream: "IMAGE_GPU:pirate_effect_output_video"
  node_options: {
    [type.googleapis.com/mediapipe.FaceGeometryEffectRendererCalculatorOptions] {
      effect_texture_path: "mediapipe/graphs/face_custom/data/pirate.pngblob"
      effect_mesh_3d_path: "mediapipe/graphs/face_custom/data/pirate.binarypb"
    }
  }
}

# Renders all together effect.
node {
  calculator: "FaceGeometryEffectRendererCalculator"
  input_side_packet: "ENVIRONMENT:environment"
  input_stream: "IMAGE_GPU:eyepatch_effect_output_video"
  input_stream: "MULTI_FACE_GEOMETRY:multi_face_geometry"
  output_stream: "IMAGE_GPU:all_together_output_video"
  node_options: {
    [type.googleapis.com/mediapipe.FaceGeometryEffectRendererCalculatorOptions] {
      effect_texture_path: "mediapipe/graphs/face_custom/data/pirate.pngblob"
      effect_mesh_3d_path: "mediapipe/graphs/face_custom/data/pirate.binarypb"
    }
  }
}

# Decides which of the Facepaint or the Glasses rendered results should be sent
# as the output GPU frame.
node {
  calculator: "ImmediateMuxCalculator"
  input_stream: "all_together_output_video"
  input_stream: "pirate_effect_output_video"
  output_stream: "output_video"
}

Please correct me if anything wrong with this, thanks!

Hi @kostyaby ,
yeah, it's odd, i checked it again, there is a standalone pirate effect in the graph, adding log in effect_renderer_calculator.cc shows that both effects were read from correct path. If i just have standalone eyepatch effect, it can be correctly rendered.
The complete graph regarding the render effect nodes are:
# Renders the standalone eyepatch effect.
node {
  calculator: "FaceGeometryEffectRendererCalculator"
  input_side_packet: "ENVIRONMENT:environment"
  input_stream: "IMAGE_GPU:throttled_transformed_input_video_gpu"
  input_stream: "MULTI_FACE_GEOMETRY:multi_face_geometry"
  output_stream: "IMAGE_GPU:eyepatch_effect_output_video"
  node_options: {
    [type.googleapis.com/mediapipe.FaceGeometryEffectRendererCalculatorOptions] {
      effect_texture_path: "mediapipe/graphs/face_custom/data/eyepatch.pngblob"
      effect_mesh_3d_path: "mediapipe/graphs/face_custom/data/eyepatch.binarypb"
    }
  }
}

# Renders the standalone eyepatch effect.
node {
  calculator: "FaceGeometryEffectRendererCalculator"
  input_side_packet: "ENVIRONMENT:environment"
  input_stream: "IMAGE_GPU:throttled_transformed_input_video_gpu"
  input_stream: "MULTI_FACE_GEOMETRY:multi_face_geometry"
  output_stream: "IMAGE_GPU:pirate_effect_output_video"
  node_options: {
    [type.googleapis.com/mediapipe.FaceGeometryEffectRendererCalculatorOptions] {
      effect_texture_path: "mediapipe/graphs/face_custom/data/pirate.pngblob"
      effect_mesh_3d_path: "mediapipe/graphs/face_custom/data/pirate.binarypb"
    }
  }
}

# Renders all together effect.
node {
  calculator: "FaceGeometryEffectRendererCalculator"
  input_side_packet: "ENVIRONMENT:environment"
  input_stream: "IMAGE_GPU:eyepatch_effect_output_video"
  input_stream: "MULTI_FACE_GEOMETRY:multi_face_geometry"
  output_stream: "IMAGE_GPU:all_together_output_video"
  node_options: {
    [type.googleapis.com/mediapipe.FaceGeometryEffectRendererCalculatorOptions] {
      effect_texture_path: "mediapipe/graphs/face_custom/data/pirate.pngblob"
      effect_mesh_3d_path: "mediapipe/graphs/face_custom/data/pirate.binarypb"
    }
  }
}

# Decides which of the Facepaint or the Glasses rendered results should be sent
# as the output GPU frame.
node {
  calculator: "ImmediateMuxCalculator"
  input_stream: "all_together_output_video"
  input_stream: "pirate_effect_output_video"
  output_stream: "output_video"
}

Please correct me if anything wrong with this, thanks!

Hey @jianinz,

there is a standalone pirate effect in the graph, adding log in effect_renderer_calculator.cc shows that both effects were read from correct path

Having correct assets is not enough to confirm that the correct path is taken in runtime. You need to add logging into Process and make sure, that when you expect to see the "eyepatch + pirate" effect you see both calculators printing into logs
If that doesn't work, I'll take a look during week and get back to you

Hey @jianinz,
I was able to make work exactly the approach I proposed earlier: chaining 2 effect renderer one after another. Please, verify that you indeed invoke the correct runtime path by adding logs to Process (not Open) as I recommended in my previous comment.
GIF demo:

Thanks for checking @kostyaby ! Appreciated it. I will double check on my side and get back to you. Thanks!

i want to how to create OBJ file and the relation of PNG file.
thanks

Hey @bugmany,
If I understood your question correctly, it has been discussed in great length in comments to this issue so I encourage you to take a closer look there first. If that's not helpful, please be more specific which parts of the ongoing discussion require further clarification

thanks @kostyaby, i can create those files.

hey @kostyaby ,
can you please elaborate on how to have N effects in the app?. i tried changing the face_effect_gpu.pbtxt but i have no clue how its done. and the custom calculator you specified, hows that done.

Hello @kostyaby
I'm working on an app that allows me to try on different types of glasses. I use your 2nd suggestion, use separate mediapipe and filament. All working fine. But I have a problem that the parts of the glasses that should be hidden by the face show up over the face (Attached image). Because mediapipe only provide scaling / rotation / translating, I do not know how to calculate the hidden part. Do you have any suggestions?

Hey @duy-maimanh,
Good job on making a MediaPipe + Filament prototype! The final thing that you need is a face occluder in the scene. Please, grab the MediaPipe canonical face 3D model (FBX, OBJ), add it into your Filament scene and render it as an occluder (read/write in depth buffer, don't write anything into color buffer). Not sure how exactly it could be done with Filament, but what helped me with other 3D engines is enforcing the Opaque mode for the occluder entity + setting alpha = 0. I'm pretty sure occluders are possible with Filament

Greetings to all of you , I want to make an AR app to try sunglasses so I used mediapipe python to get the landmarks , I have glasses.obj but I do not know what is the next step to make the 3d projection  , I used openCV but it doesnot work and I tried
a lot of stuff,  what should I do ? and will it be easier if I will use ArCore ? and which is better client side or server side ?
thanks

Hey @NourOmran,
MediaPipe still lacks Face Geometry support for Python, so the guidance in gave in this comment is still valid; please take a look to see whether it's helpful to you
Regarding ARCore, I don't think they give you any Python at all, so I don't think it'll match the Python requirement.
Regarding client vs server, it depends on many factors, but normally people prefer doing AR on client due to latency & server cost concerns.

Hi @kostyaby,
I am developing an app to try different types of glasses. As per your guidance, i tried to change the asset files. For that i have downloaded obj files from "https://www.cgtrader.com/3d-models/eyeglasses" and converted using the python script which you have mentioned. But the glass is not fitting on the face properly. Could you please guide me to do this?.. I am very new to 3d modelling. Can you please share different asset files for glass effect?

Hey @midhulavijayan,
One important step for making sure a 3D glasses asset is aligned with face at runtime is to align the 3D glasses asset with the canonical face model (similar comments: https://github.com/google/mediapipe/issues/1155#issuecomment-739078145, https://github.com/google/mediapipe/issues/1155#issuecomment-744628191, https://github.com/google/mediapipe/issues/1155#issuecomment-767008953). In addition to my recommendation from the last comment, I'd recommend using https://threejs.org/editor/: just import both the canonical model OBJ file and your glasses model into the workspace, align the glasses model with the canonical model by moving / rotating / scaling and then export the resulting glasses OBJ model

Hi @kostyaby,
Thanks. Finally it worked😀

@kostyaby Any chance you have some code in the wild that demonstrates integrating MediaPipe with a 3D engine such as Filament?
And to anyone in the open source community who is interested – we have a budget to fund work on an open source demo of a MediaPipe + external 3D engine integration. You can find my email in my profile.

@kostyaby
We're a small team trying to build applications on MediaPipe. In first few projects, the rendering stuff is quite straightforward. We wrote OpenGLES directly in calculators pretty mush like MediaPipe built-in examples. However when things become complicated, we realize that we need a 3D rendering engine to go further.
You mentioned two ways to integrate Filament with MediaPipe. The first one is to integrate Filament as calculators, and it only support OpenGL backend and might cause more issues in the future. The second one is initialize Filament and MediaPipe separately and communicate through application level signals. It seems to me that the second one is reasonable and should be less buggy. However, I still have two questions about it.

How to balance GPU resource between the two components?

In realtime applications, we use FlowLimiterCalculator in the high level graph to control the number of in-flight streams. If Filament is a separate element of the system, it means we can't have a back edge signal representing the completion of specific timestamp. Is there any possible way to solve this?

@jclay: Hey! Unfortunately, I don't have an example myself. @duy-maimanh seems to have a working prototype, please reach out to them
@brucechou1983: Hey!

How to balance GPU resource between the two components?

At the end of the day, there is a single GPU device and all you can do is send commands to it. When it comes to balance / bottleneck control, there's significantly less flexibility when compared to CPU. On CPU, you can try creating separate system threads and hope it'll get mapped to separate CPU cores; on some OSes, you can also try to assign priorities to threads and hope to get high-performance CPU cores assigned to threads with more CPU processing work. As far as I know, there's no such thing available for popular GPU APIs
Having said that, you still control how much processing work you send at different stages of the pipeline (perception, rendering), how often and when you synchronize between CPU and GPU. The only way I know to get a well-performing GPU pipeline is to start lean and iterate on bottlenecks in an ad-hoc manner using a CPU/GPU profiler. General advice:

Extra CPU-GPU syncs are bad (maybe there's a way to remove some of those?)
Having too much GPU processing work is bad (maybe you can run a lighter perception NN model or render a lighter 3D model with less triangles or pick a lighter shading model with small shader?)

In realtime applications, we use FlowLimiterCalculator in the high level graph to control the number of in-flight streams. If Filament is a separate element of the system, it means we can't have a back edge signal representing the completion of specific timestamp. Is there any possible way to solve this?

If you decide to keep Filament outside of the MediaPipe (MP) graph, then only use FlowLimiterCalculator for what's left inside of the graph: ML perception part. This way, your graph is no longer "frame in - frame out"; instead, it's "frame in - ML signals out". ML signals can a segmentation mask, face geometry proto, hand tracking landmarks, pose tracking landmarks - you name it, all the ML goodness that MP currently provides / can be extended with. Then, your app-level callback is waiting for the geometry, not for the final rendered frame. After that geometry is received, it should be re-packaged as a set of Filament inputs; then you let Filament render your final frame. If you are worried Filament CPU processing would be taking too long synchronously then make it asynchronous (again, separately from the MP graph - the price for having a renderer externally is not being able to use MP synchronization routines)
I wouldn't be crazy about trying to keep everything inside a MP graph. At the end of the day, MP uses the same OS synchronization primitives available to you; even more, it tried to do something very generic (i.e. balance resources in a generic computational graph) while you are trying to do something very specific (i.e. add a single rendering stage on top of the existing perception pipeline). My point is that you are likely to succeed in building a performant "MP perception + external renderer" pipeline :)
Good luck!

I was able to make work exactly the approach I proposed earlier: chaining 2 effect renderer one after another. Please, verify that you indeed invoke the correct runtime path by adding logs to Process (not Open) as I recommended in my previous comment.
GIF demo:

Hi, @kostyaby can you share this effect graph file?

Hey @berrymoor,
I couldn't find that exact effect graph which I used to generate this GIF, but I've assembled another one in MediaPipe Visualizer that should work as well: combined_effects.txt
Please let me know if it works for you!

Hello @kostyaby I'm working on an app that allows me to try on different types of glasses. I use your 2nd suggestion, use separate mediapipe and filament. All working fine. But I have a problem that the parts of the glasses that should be hidden by the face show up over the face (Attached image). Because mediapipe only provide scaling / rotation / translating, I do not know how to calculate the hidden part. Do you have any suggestions?

Hey Could you please share how the rotations are possible with mediapipe

I was able to make work exactly the approach I proposed earlier: chaining 2 effect renderer one after another. Please, verify that you indeed invoke the correct runtime path by adding logs to Process (not Open) as I recommended in my previous comment.
GIF demo:

Hi, @kostyaby can you share this effect graph file?

How I can I do this in python?

Hey @ThilakReddyy,
Face Geometry module provides support for attaching 3D objects to a face and "inheriting" face 3D rotation. Please, take a look at the documentation and see whether this solution matches your needs

Hey @AswinParanji,
Unfortunately, MediaPipe doesn't provide an out-of-box Python API for the Face Geometry module

Hello Kanstantsin Sokal,
My name is Thilak Reddy and I have a intern at
a company and the company wants me to render the 3d objects on face. I have
look through the documentation but I am not understanding what to do. Would
me please send me a demo project or the required steps to render the image
on face.
On Thu, 16 Dec 2021 at 00:19, Kanstantsin Sokal @.***>
wrote:

Hey @ThilakReddyy https://github.com/ThilakReddyy,
Face Geometry module
https://google.github.io/mediapipe/solutions/face_mesh.html#face-geometry-module
provides support for attaching 3D objects to a face and "inheriting" face
3D rotation. Please, take a look at the documentation and see whether this
solution matches your needs
Hey @AswinParanji https://github.com/AswinParanji,
Unfortunately, MediaPipe doesn't provide an out-of-box Python API for the
Face Geometry module
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/google/mediapipe/issues/1155#issuecomment-995079150,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/APJGSSOSJVSSSO726F7VIJDURDPM3ANCNFSM4R43BXZQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Hello @kostyaby I'm working on an app that allows me to try on different types of glasses. I use your 2nd suggestion, use separate mediapipe and filament. All working fine. But I have a problem that the parts of the glasses that should be hidden by the face show up over the face (Attached image). Because mediapipe only provide scaling / rotation / translating, I do not know how to calculate the hidden part. Do you have any suggestions?

Hey Could you please share how the rotations are possible with mediapipe

Mediapipe provide all we need to transform, rotate , scale, etc. This is 4*4 matrix. Sorry but I no longer work with mediapipe so I can't remember exactly. You can read more at here. http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/

Hey @ThilakReddyy,
We've already shared documentation as well as sample apps for Android and iOS that do exactly what you asked for. I encourage you to make an effort and give it another try. We do not plan to release any additional in-depth materials to cover the topic, maybe someone from the community will do that someday (maybe already have done?)

@kostyaby any sample for the Web in JavaScript ?

Hey @JpEncausse,
I didn't have one, so I've forked the MP Face Mesh web example and slapped together a demo using Three.JS: https://codepen.io/kostyaby/full/abqavyo
Not an officially support product, use at your own risk 😉

Perfect ! So cool thanks very much !
I'll give it a try, will let me do AR on many usecases

Hey @JpEncausse,
I didn't have one, so I've forked the MP Face Mesh web example and slapped together a demo using Three.JS: https://codepen.io/kostyaby/full/abqavyo
Not an officially support product, use at your own risk 😉

hi i tried to open this example but i get an error. I'm trying to better understand mediapipe and how to integrate it into a web solution with glb model. Could you help me figure out what the problem with the example code is?

Hey @JpEncausse,
I didn't have one, so I've forked the MP Face Mesh web example and slapped together a demo using Three.JS: https://codepen.io/kostyaby/full/abqavyo
Not an officially support product, use at your own risk wink

hi i tried to open this example but i get an error. I'm trying to better understand mediapipe and how to integrate it into a web solution with glb model. Could you help me figure out what the problem with the example code is?

Some bug with load mediapipe file. You can try use my fix https://codepen.io/Babich/pen/VwXrjvK

@kostyaby  Sorry to bother you, teacher. I want a model of glasses. Can you send it to me? thank you

I want to know how these glasses are worn on the face, how does it work

Hey @JpEncausse,
I didn't have one, so I've forked the MP Face Mesh web example and slapped together a demo using Three.JS: https://codepen.io/kostyaby/full/abqavyo
Not an officially support product, use at your own risk wink

hi i tried to open this example but i get an error. I'm trying to better understand mediapipe and how to integrate it into a web solution with glb model. Could you help me figure out what the problem with the example code is?

Some bug with load mediapipe file. You can try use my fix https://codepen.io/Babich/pen/VwXrjvK

I can't figure out how does codepen open camera, can you give me some advice~

I can't figure out how does codepen open camera, can you give me some advice~

I can't figure out how does codepen open camera, can you give me some advice~

Hi can any one please guide me how to align glasses. I working on python and using CV2 and media pipe library .Rendering is done but glasses are not completely align with face

Hey @JpEncausse,
I didn't have one, so I've forked the MP Face Mesh web example and slapped together a demo using Three.JS: https://codepen.io/kostyaby/full/abqavyo
Not an officially support product, use at your own risk wink

hi i tried to open this example but i get an error. I'm trying to better understand mediapipe and how to integrate it into a web solution with glb model. Could you help me figure out what the problem with the example code is?

Some bug with load mediapipe file. You can try use my fix https://codepen.io/Babich/pen/VwXrjvK

I'm trying to create a similar example using react. I had no problems doing face reveal via mediapipe. But I think I got stuck in creating EffectRender components for creating the scene and loading the model. Has anyone ever tried to do something like this? or can I find some interesting resource?

@kostyaby @mabab  Hi! Thank you very much for your web demo :D
I notice that there are some heuristic values in these two lines
gltf.scene.position.set(0, -2, 0);
gltf.scene.scale.set(20, 20, 15);

I understand that they are specified to mak rendering of the mask /. wearing close to user faces, but how to nicely determine these values for customized 3D models? Should I first align my 3D model to the canonical face model? (mediapipe/tasks/cc/vision/face_geometry/data/canonical_face_model.fbx)
Thank you very much.

@all Please share any example github link please

Hey @jianinz,
I was able to make work exactly the approach I proposed earlier: chaining 2 effect renderer one after another. Please, verify that you indeed invoke the correct runtime path by adding logs to Process (not Open) as I recommended in my previous comment.
GIF demo:

@kostyaby  Do you have any example in android app  github link if yes please share


Expose GCRCLEANER_TOKEN for cli Docker image

This will allow users of the cli Docker image to pass in the
authentication token via the environmental variable GCRCLEANER_TOKEN.

Why can't you just pass -e GCRCLEANER_TOKEN=... to docker run?

Why can't you just pass -e GCRCLEANER_TOKEN=... to docker run?

  EBKAC


First iteration of #83 reworks

See https://github.com/devcontainers-contrib/features/discussions/83 for original idea and discussion.
⚠ This shouldn't be the final iteration! This is a practical example that could work.

Relevant discussion excerpt
By @jcbhmr in https://github.com/devcontainers-contrib/features/discussions/83#discussioncomment-4285131

Actually, I think keeping all the versions in source control is a Good Thing™ since it incentivizes that: as few versions as possible are in "usage" at once.

Ihv used curl but maybe It can be done aswell using your injection technique? (btw from your experience so far does it still feel superior to curl approach?)

Alpine images don't come with curl, so you'd, again, need to install it first 🙄. https://stackoverflow.com/a/64300621

My opinion (again, my opinion) is that the best way to solve this solution is to:

Keep dependencies in source control without any external URLs. Just files.

Practice good upkeep to try (keyword: try; it doesn't need to be perfect) to keep as few duplicate versions as possible.

Segment only on major versions like @DaneWeber suggested.

Not worry about bundle size in the generated image; if it becomes a problem, we can tackle it then. A few kb of textfiles in a gzip'ed tar archive isn't going to make much difference.

Copy what Node.js does with their "bundledDependencies"-style of packaging

This means creating a bash_modules/, vendor/ or lib/ special folder in each src/*/ folder to hold all the check_packages.sh and<EMAIL_ADDRESS>files when publishing.
We also need a root vendor/ or lib/ or pkgs/ or something directory to hold all those<EMAIL_ADDRESS>files.
We need a .gitignore rule to not commit the generated src/*/bash_modules/ folder.
We need a prebuild script to cp -r ./pkgs src/$EACH_FEATURE/bash_modules just before building
StackOverflow more details on bundledDependencies: https://stackoverflow.com/a/25044361

Not use anything more complicated than cp for dep management. No need to use bpkg or npm or pip. Simple copying is good for now. We can improve in the future if we need to.

Normal dependencies are usually installed from the npm registry. Thus bundled dependencies are useful when:

you want to re-use a third party library that doesn't come from the npm registry or that was modified
you want to re-use your own projects as modules
you want to distribute some files with your module

This way, you don't have to create (and maintain) your own npm repository, but get the same benefits that you get from npm packages.

Most of this feature-set is demonstrated in https://github.com/jcbhmr/devcontainers-contrib-features-83-demo

What this PR changes

[ ] Adds a new wiki page detailing the current solution to "The check_packages problem"
[x] Adds a prebuild script that must run prior to package generation to "install" the bash_modules/ folder
[x] Adds some common utils to the bash_modules/ folder
[ ] Doesn't break backwards compatibility
[ ] Tests it with src/bikeshed/

One of the biggest plus sides to this iteration is that nothing needs to change for previous features. That means any future features can use the source ./bash_modules/* trick, but we don't need to convert everyone right away. This is an incremental change.
cc @DaneWeber @danielbraun89

Is there a particular bashdoc syntax anyone knows of?
Here's some competing options:

https://github.com/dustinknopoff/bashdoc
https://github.com/ajdiaz/bashdoc

This fails and I don't know why. It's SO CLOSE.
#0 386.6 bash_modules/,pipx.sh: line 7: pipx: command not found

Just that pipx can't be found.

#0 342.3 Installing collected packages: setuptools, pip
#0 344.5   WARNING: The scripts pip3, pip3.10 and pip3.11 are installed in '/usr/local/python/3.11.0/bin' which is not on PATH.
#0 344.5   Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
#0 344.8 Successfully installed pip-22.3 setuptools-65.5.0
#0 344.8 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#0 345.1 Updating /etc/bash.bashrc and /etc/zsh/zshrc...
#0 345.6 Installing Python tools...
#0 345.9 Updating pip...
#0 346.3 Requirement already satisfied: pip in /usr/local/python/3.11.0/lib/python3.11/site-packages (22.3)
#0 346.4 Collecting pip
#0 346.4   Downloading pip-22.3.1-py3-none-any.whl (2.1 MB)
#0 346.4      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 208.1 MB/s eta 0:00:00
#0 346.5 Installing collected packages: pip
#0 346.5   Attempting uninstall: pip
#0 346.5     Found existing installation: pip 22.3
#0 346.7     Uninstalling pip-22.3:
#0 346.7       Successfully uninstalled pip-22.3
#0 347.9 Successfully installed pip-22.3.1
#0 348.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#0 348.1 Installing Python tools...
#0 348.5 Collecting pipx
#0 348.5   Downloading pipx-1.1.0-py3-none-any.whl (55 kB)
#0 348.5      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.4/55.4 kB 52.6 MB/s eta 0:00:00
#0 348.5 Collecting argcomplete>=1.9.4
#0 348.5   Downloading argcomplete-2.0.0-py2.py3-none-any.whl (37 kB)
#0 348.6 Collecting packaging>=20.0
#0 348.6   Downloading packaging-21.3-py3-none-any.whl (40 kB)
#0 348.6      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.8/40.8 kB 231.8 MB/s eta 0:00:00
#0 348.6 Collecting userpath>=1.6.0
#0 348.6   Downloading userpath-1.8.0-py3-none-any.whl (9.0 kB)
#0 348.7 Collecting pyparsing!=3.0.5,>=2.0.2
#0 348.7   Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)
#0 348.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.3/98.3 kB 294.5 MB/s eta 0:00:00
#0 348.7 Collecting click
#0 348.7   Downloading click-8.1.3-py3-none-any.whl (96 kB)
#0 348.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 kB 267.6 MB/s eta 0:00:00
#0 348.8 Installing collected packages: pyparsing, click, argcomplete, userpath, packaging, pipx
#0 349.1   WARNING: The script userpath is installed in '/tmp/pip-tmp/bin' which is not on PATH.
#0 349.1   Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
#0 349.3   WARNING: The script pipx is installed in '/tmp/pip-tmp/bin' which is not on PATH.
#0 349.3   Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
#0 349.5 Successfully installed argcomplete-2.0.0 click-8.1.3 packaging-21.3 pipx-1.1.0 pyparsing-3.0.9 userpath-1.8.0
#0 349.5 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#0 349.7 creating virtual environment...
#0 349.7 creating shared libraries...
#0 353.9 upgrading shared libraries...
#0 357.3 installing pipx...
#0 358.6 done! ✨ 🌟 ✨
#0 358.6   installed package pipx 1.1.0, installed using Python 3.11.0
#0 358.6   These apps are now globally available
#0 358.6     - pipx
#0 358.8 creating virtual environment...
#0 358.9 installing pylint...
#0 367.2 done! ✨ 🌟 ✨
#0 367.2   installed package pylint 2.15.7, installed using Python 3.11.0
#0 367.2   These apps are now globally available
#0 367.2     - epylint
#0 367.2     - pylint
#0 367.2     - pylint-config
#0 367.2     - pyreverse
#0 367.2     - symilar
#0 367.4 creating virtual environment...
#0 367.5 installing flake8...
#0 368.5 done! ✨ 🌟 ✨
#0 368.5   installed package flake8 6.0.0, installed using Python 3.11.0
#0 368.5   These apps are now globally available
#0 368.5     - flake8
#0 368.6 creating virtual environment...
#0 368.7 installing autopep8...
#0 369.7 done! ✨ 🌟 ✨
#0 369.7   installed package autopep8 2.0.0, installed using Python 3.11.0
#0 369.7   These apps are now globally available
#0 369.7     - autopep8
#0 369.8 creating virtual environment...
#0 369.9 installing black...
#0 371.4 done! ✨ 🌟 ✨
#0 371.4   installed package black 22.10.0, installed using Python 3.11.0
#0 371.4   These apps are now globally available
#0 371.4     - black
#0 371.4     - blackd
#0 371.6 creating virtual environment...
#0 371.6 installing yapf...
#0 372.4 done! ✨ 🌟 ✨
#0 372.4   installed package yapf 0.32.0, installed using Python 3.11.0
#0 372.4   These apps are now globally available
#0 372.4     - yapf
#0 372.4     - yapf-diff
#0 372.6 creating virtual environment...
#0 372.7 installing mypy...
#0 375.2 done! ✨ 🌟 ✨
#0 375.2   installed package mypy 0.991, installed using Python 3.11.0
#0 375.2   These apps are now globally available
#0 375.2     - dmypy
#0 375.2     - mypy
#0 375.2     - mypyc
#0 375.2     - stubgen
#0 375.2     - stubtest
#0 375.4 creating virtual environment...
#0 375.5 installing pydocstyle...
#0 376.6 done! ✨ 🌟 ✨
#0 376.6   installed package pydocstyle 6.1.1, installed using Python 3.11.0
#0 376.6   These apps are now globally available
#0 376.6     - pydocstyle
#0 376.7 creating virtual environment...
#0 376.8 installing pycodestyle...
#0 377.5 done! ✨ 🌟 ✨
#0 377.5   installed package pycodestyle 2.10.0, installed using Python 3.11.0
#0 377.5   These apps are now globally available
#0 377.5     - pycodestyle
#0 377.7 creating virtual environment...
#0 377.8 installing bandit...
#0 379.4 done! ✨ 🌟 ✨
#0 379.4   installed package bandit 1.7.4, installed using Python 3.11.0
#0 379.4   These apps are now globally available
#0 379.4     - bandit
#0 379.4     - bandit-baseline
#0 379.4     - bandit-config-generator
#0 379.6 creating virtual environment...
#0 379.6 installing pipenv...
#0 385.0 done! ✨ 🌟 ✨
#0 385.0   installed package pipenv 2022.11.30, installed using Python 3.11.0
#0 385.0   These apps are now globally available
#0 385.0     - pipenv
#0 385.0     - pipenv-resolver
#0 385.1 creating virtual environment...
#0 385.2 installing virtualenv...
#0 386.5 done! ✨ 🌟 ✨
#0 386.5   installed package virtualenv 20.17.0, installed using Python 3.11.0
#0 386.5   These apps are now globally available
#0 386.5     - virtualenv
#0 386.6 Updating /etc/bash.bashrc and /etc/zsh/zshrc...
#0 386.6 Updating /etc/bash.bashrc and /etc/zsh/zshrc...
#0 386.6 Updating /etc/bash.bashrc and /etc/zsh/zshrc...
#0 386.6 Done!
#0 386.6 bash_modules/,pipx.sh: line 7: pipx: command not found
#0 386.6 ERROR: Feature "./bikeshed" (Unknown) failed to install! Look at the documentation at http://github.com/devcontainers-contrib/features/tree/main/src/bikeshed for help troubleshooting this error.
------
ERROR: failed to solve: executor failed running [/bin/sh -c cd /tmp/build-features/bikeshed_1 && chmod +x ./devcontainer-features-install.sh && ./devcontainer-features-install.sh]: exit code: 127
[-] Failed to launch container:


Replace the motor phase connector with a cable inlet and bring the phase wires out

@j3qq4hch how is it going?

This thing is descrubed long ago. There was no point in opening this issue. Close it


fix(Expense): allow seeing payout method with the right draft key

For https://github.com/opencollective/opencollective/issues/6379#issuecomment-2155472259

When live? Thanks!


keybindings prevTab/nextTab with ctrl+pageup/ctrl+pagedown jumps to unexpected tabs

Environment
Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Microsoft Windows [版本 10.0.19042.630]

Windows Terminal version (if applicable):
Windows Terminal
版本: 1.4.3141.0

Any other software?

Steps to reproduce

Add keybindings in settings

"keybindings":
    [
        { "command": "prevTab", "keys": "ctrl+pageup" },
        { "command": "nextTab", "keys": "ctrl+pagedown" }
    ]

Open 3 or more tabs

Use ctrl + pageup or ctrl + pagedown, it doesn't jump to  pre or next tab

This settings works well in the version before I upgrade it in Microsoft Store, but I don't know what version was.
Expected behavior

ctrl+pageup to the pre tag
ctrl+pagedown to the next tag
Actual behavior

Random jumps

If you hold ctrl while you're switching tabs, does a little dialog with a list of your open tabs show up? And does that dialog have them listed in "most recently used" order?
What I'm thinking you're seeing is the new tab switcher which defaults to MRU ordering. You can change this back to in-order traversal with "tabSwitcherMode": "inOrder" (or disable it entirely with "tabSwitcherMode": "disabled")

I configured it with "tabSwitcherMode": "inOrder" or "tabSwitcherMode": "disabled", both not working in 1.4.3141.0.
And I found tabSwitcherMode in https://docs.microsoft.com/en-us/windows/terminal/customize-settings/global-settings, and this is only working in Windows Terminal Preview.
Fortunately useTabSwitcher is working in 1.4.3141.0.
I configured it with "useTabSwitcher": false and get what I expected.
Thanks for your help.

For anyone else finding this: It has nothing to do with the key bindings used, the nextTab and prevTab commands are completely broken unless you disable the tab switcher (at least, in v1.5.3142.0).  The tab switcher was annoying when it was first introduced (why do I want a UI to pop up listing tabs right next to another UI element that lists tabs?) and probably should default to off.  It definitely should not default to a behaviour that breaks tab switching.  MRU policies on frequently used UI elements are bad practice in general because they break motor memory.

MRU policies on frequently used UI elements are bad practice in general because they break motor memory.

alt+tab would like to have a word with you

There's been a lot of research covering alt-tab and related things for task switching over the last 30 years.  This has led to things like Expose on the Mac and the Tasks View on Windows, which give a stable spatial view that generally do better in user studies than the alt-tab LRU policy, which works well if you are switching between two applications and increasingly badly as that number grows above two.

I'm not gonna disagree with you - I'm an inOrder guy myself. But my dedication is to customizability. For everyone out there who likes inOrder traversal, there's someone else who prefers mru, which is why there are settings to enable both modes. It's IMPOSSIBLE to pick a set of defaults that makes everyone happy, but the goal with the Terminal has always been to enable the user to customize it just the way they like it.
Since OP figured this out, I'm gonna close this issue.

I don't mind the option of MRU existing, I object to the POLA violation: the meaning of nextTab and prevTab changed during an update and users need to explicitly opt in to the prior behaviour.  The new behaviour is significantly worse because the MRU list is update on every switch, so in a four-tab window you will have one tab that is unreachable using the keyboard shortcuts (this was the symptom that I saw that led me to this bug).

FWIW, I was about to post an issue that "tabSwitcherMode": "inOrder" does not override the change in default introduced in 1.4.3141.0. (It seems this setting isn't available in 1.4, though?)
So the new tab switcher suddenly only works in MRU mode, and the previous default cannot be restored without disabling the interface entirely. I would think this is a regression, but please let me know if I'm missing something.


Insure IP/Secrets/Passwords/etc are removed.

No passwords or quote center info is being used in the slinky, it's entirely generic and can be used in any React app


Skip Test_writefile_sync_dev_stdout if /dev/stdout isn't writable

Although it's not common for /dev/stdout to not be available, it has
been seen in a few build/test environments.

Codecov Report

Merging #2830 into master will decrease coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2830      +/-   ##
==========================================
- Coverage    75.4%    75.4%   -0.01%
==========================================
  Files          92       92
  Lines      134610   134609       -1
==========================================
- Hits       101505   101504       -1
  Misses      33105    33105

Impacted Files
Coverage Δ

src/if_xcmdsrv.c
84.17% <0%> (-0.54%)
:arrow_down:

src/gui.c
47.78% <0%> (-0.11%)
:arrow_down:

src/ui.c
46.46% <0%> (-0.08%)
:arrow_down:

src/os_unix.c
55.09% <0%> (-0.05%)
:arrow_down:

src/channel.c
83.13% <0%> (-0.05%)
:arrow_down:

src/if_py_both.h
76.59% <0%> (-0.01%)
:arrow_down:

src/ex_cmds.c
79.46% <0%> (+0.08%)
:arrow_up:

src/ex_cmds2.c
78.68% <0%> (+0.09%)
:arrow_up:

src/window.c
81.99% <0%> (+0.09%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 405dadb...fddd508. Read the comment docs.


Investigate bpf_fib_lookup + bpf_redirect to replace egress gateway IP rules/routes

When the egress IP is assigned to a different interface than the one with the default route, we'll have to install additional IP rules and routes to steer the traffic to the correct interface.
That's because the network stack routes packets before the TC egress hook (i.e. where bpf SNAT happens), which means can't match traffic on the egress IP. We instead need to explicitly match each combination of source (endpoints) IPs and destination CIDRs.
@pchaigno suggested we might want to look into switching to bpf_fib_lookup + bpf_redirect after the packet has been SNATed with the egress IP as that would allow to match the source/egress IP without the need for all the special IP rules/routes.

Another option is to perform the FIB lookup in bpf_overlay, before SNAT, and redirect directly to the proper interface. If we do that, we should be careful about path asymmetries (make sure the reply also bypasses the stack).
Yet another option (suggested by Julian) would be to encode the interface number in the BPF map, to avoid needing the FIB lookup.

I think any bpf_fib_lookup-based solution requires an Egress GW IP addr set to a netdev. Is it always the case?

I'll start taking a look at this given that I have some cycles

I think any bpf_fib_lookup-based solution requires an Egress GW IP addr set to a netdev. Is it always the case?

@brb I think it's reasonable to assume the egress IPs are assigned to a netdev. I'm aware of at least one setup where these are assigned to dummy devices instead of real netdev, not clear yet if that could be an issue here

Another option is to perform the FIB lookup in bpf_overlay, before SNAT, and redirect directly to the proper interface

that presumes bpf_host is installed on all interfaces, which might not always be the case :thinking:

Yet another option (suggested by Julian) would be to encode the interface number in the BPF map, to avoid needing the FIB lookup.

that could work, but requires changing the map layout plus some extra logic in userspace. Worth keeping in mind depending on which side we want to take the tradeoff (more instructions in the datapath vs some extra complexity in userspace)


Loading animation

In the Messaging API, we've added a new endpoint that allows you to display a loading animation. After your LINE Official Account receives a message from a user, the response may takes some time due to message preparation or reservation processing. In such cases, you can visually tell the user that you want them to wait by displaying a loading animation.
news: https://developers.line.biz/en/news/2024/04/17/loading-indicator/

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


fix formatting issues in completion.md file

Fixed ordered list formatting issues. Could you check and merge this?
@bermudezmt

Deploy preview for docsdocker ready!
Built with commit ed87d31a0048d42b49ed6de87e69cf8b71eff7e5
https://deploy-preview-8516--docsdocker.netlify.com

The netlify preview looks good - https://deploy-preview-8516--docsdocker.netlify.com/compose/completion/

LGTM


[Cupertino]CupertinoNavigationBar support iconTheme like AppBar

Description
I found that the back icon color of the CupertinoNavigationBar is DefaultTextStyle.color and cannot support IconTheme, so I added the iconTheme property just like the AppBar.
Related Issues
NO
Tests
I added the following tests:
I tested the  UI display in cupertino_navigation_demo
 navigationBar: const CupertinoNavigationBar(
        trailing: ExitButton(),
        iconTheme: IconThemeData(color: Colors.black, size: 50),
      ),

Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I signed the CLA.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I updated/added relevant documentation (doc comments with ///).
[x] All existing and new tests are passing.
[x] The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (Please read Handling breaking changes). Replace this with a link to the e-mail where you asked for input on this proposed change.
[x] No, this is not a breaking change.

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
📝 Please visit https://cla.developers.google.com/ to sign.
Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.
What to do if you already signed the CLA
Individual signers

It's possible we don't have your GitHub username or you're using a different email address on your commit. Check your existing CLA data and verify that your email is set on your git commits.

Corporate signers

Your company has a Point of Contact who decides which employees are authorized to participate. Ask your POC to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the Google project maintainer to go/cla#troubleshoot (Public version).
The email used to register you as an authorized contributor must be the email used for the Git commit. Check your existing CLA data and verify that your email is set on your git commits.
The email used to register you as an authorized contributor must also be attached to your GitHub account.

ℹ Googlers: Go here for more info.

I signed it!

hi @ZengyiMa, thanks for the PR! Do you have a concrete use case for the change you proposed? In UIKit , as far as I know, there's no direct API to achieve this (tintColor changes the color of both the chevron and the text next to it). As you can see in your test image, it doesn't look as good when the size is set to 50 px. And since changing the color of the IconThemeData doesn't change the color of the text next to it (in this case "color"), that makes the style of the back button less consistent. So as an API consumer I'd be a bit reluctant to change either the size or the color of the back chevron unless my use case is really solid.


Can't connect to proxy after client crash (even when using a different username)

When trying to connect with minetest client, it gives me "connection timed out". When trying with netcat it succeeds tho:
fleckenstein@Caldera:~$ nc -zuv localhost 33000
Connection to localhost 33000 port [udp/*] succeeded!

In neither of the cases anything appears in the logs. The logs also don't show any errors etc.

Seems fixed


Stop silencing estimated size output

So, this is a fix I had to make on my server after a ZFS on Linux upgrade. I'm unsure how the original code worked, to be honest, so if there's logic here I'm not aware of, I may be able to figure out the root cause.
I'm not sure what the exact change was after my upgrade that caused the logic to break, but by not redirecting here, my snapshots started working again. It seems like this pipeline logic should work in either case, though.

Thanks!


[function_worker] Fix deploy of WindowFunctions

This causes WindowFunctions not to be deployable from pulsar-admin.

Motivation
In pulsar 2.5.0 deploying window functions fails because its class doesn't pass validation.
The behavior looks the same in current master.
Modifications
Add WindowFunction.class to the list of allowed function classes
Verifying this change

[ ] Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If yes was chosen, please highlight the changes

Dependencies (does it add or upgrade a dependency): no
The public API: no
The schema: no
The default values of configurations: no
The wire protocol: no
The rest endpoints: no
The admin cli options: no
Anything that affects deployment: no

Documentation

Does this pull request introduce a new feature? no
If yes, how is the feature documented? n/a
If a feature is not applicable for documentation, explain why? bug, not feature
If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

/pulsarbot run-failure-checks

/pulsarbot run-failure-checks


Optimize local base image support: more efficient layer processing

Following up #1906. Some potential ideas:

[ ] Multi-threaded layer compression

[x] First pass (#2022)
[ ] Separate build steps to allow pushing layers immediately after compressing

Old ideas that we don't want to do anymore:

When extracting the tar, process each entry without writing them to disk (conflicts with caching mechanism)
Instead of computing the layer digest and then pushing to a registry, push base image layers while compressing on-the-fly (https://github.com/GoogleContainerTools/jib/pull/1906#discussion_r314796323) (conflicts with caching mechanism)
Untar docker save output directly instead of writing to disk first (i.e. docker save | tar -xf -) (Doesn't seem to save time)
Use BEST_SPEED while gzipping instead of the default compression method (faster compression, but slows down push steps since blobs are larger)

For the record, I tried "Untar docker save output directly instead of writing to disk first", and it doesn't seem to save much time, if any. It makes the code harder to read as well, since DockerClient, TarExtractor, and LocalBaseImageSteps need to be more tightly connected, so I think we can skip this one.

I also just tried using BEST_SPEED for layer compression. The results are sort of what I expected; the layer compression executes faster, so stuff like jibDockerBuild and jibBuildTar seems to be slightly faster overall. But the faster compression also results in larger blobs, which means pushing to a registry is slower. In that case this seems like it's not worth it since it will actually cause a slowdown for pushing to registries, especially for users with weaker connections.

Should we make it configurable?

I don't think it's worth adding an extra configuration for it. The speed difference is pretty small anyway, and it's only noticeable when the image hasn't been cached yet.


Release Token

Ive been playing around with your downloader example and it seems there is an issue when attempting multiple logins. Is there a way to logout after the work has been completed rather than leave the session running (im hitting session limits).

Have worked it out, there is already a logout function (sc.logout()). Thanks none the less


bruig: Out of order news feed

This may be related to my use of the "reset all old KX" option yesterday.
Items in the news feed are not in proper chronological order.
We might also want to consider having options to sort the feed by most recent post as well as by most recent activity (comments).

Currently the sorting is based on last activity.   Things like new comments or a new post being received.  And keep in mind that when a post is 'received' that is the time that it exists to you.

Got it, thanks, so my broken ratchet with jy-p made his old post "new" to me which explains it.