Compile pbtxt into binarypb - mediapipe

I'm playing around with Mediapipe and I'm trying to better understand how the graph works and what is the input/output of the different calculators.
If I understand correctly, the .pbtxt files are just plain-text instructions that describe how each calculator should interact with the rest of the calculators. These files are compiled into .binarypb files, which are fed to Mediapipe.
For example, this .pbtxt file got compiled into this .binarypb file.
I have a few questions:
I saw https://viz.mediapipe.dev/ , which seems to be Mediapipe's playground. That playground seems to be compiling the text in the textarea on the right. If that is correct, how does it do it? Is there any documentation I can read about it? How are .pbtxt compiled into .binarypb?
I'm especially interested in the web capabilities of mediapipe and I'd like to create a small POC using both face-mesh and depth-to-iris features. Unfortunately, there isn't a "solution" for the second one, but there is a demo in Mediapipe's viz claiming depth-to-iris web support (the demo doesn't seem to be working correctly though). If I were able to create a .pbtxt with a pipeline containing the features that I'm interested into, how would I ¿compile? the .wasm and .data files required to deploy the code to the web?

Related

using assimp_cmd to dump fbx model file and render

I want to parse the FBX model files with assimp, firstly, I need to generate some *.json which including the whole FBX model file information, and then rendering it through webGL in browser.
So far, I know we can dump the information of a fbx file, it will generate a .assxml or a *.assbin, it seems that the generated file inlucding all the information of a FBX model file. I wonder if it's possible that I can converting the *.assxml or *.assbin to *.json as above mentioned.
Please check https://github.com/assimp/assimp2json to solve this. There are plans to integrate this into assimp, but time is a really critical resource. So help is welcome :-).
Kim

Using Soot programmatically to analyze .java source files

I have just started playing around with Soot in order to analyze .java files programmatically. From what I've read, Soot seems to be a very powerful tool for source code analysis but most of the material I found online talks about using it as a command-line tool.
I need to programmatically load classes from .java files in a given directory, construct a Program Dependence Graph (PDG) and do some Program Slicing. I am still not sure if Soot offers slicing but I can implement that myself once I have the PDG.
To get started, I tried using the code below:
Options.v().set_whole_program(true);
Options.v().set_soot_classpath("...");
SootClass c = Scene.v().loadClassAndSupport("MyClass");
c.setApplicationClass();
CHATransformer.v().transform();
CallGraph cg = Scene.v().getCallGraph();
However, it does not work. It gets stuck at the loadClassAndSupport call for a few seconds and then my program just exists abruptly, without giving any exception or anything.
If anyone has tried to use Soot programmatically, are there any other options that I need to set? Or can you point me to a tutorial where they set up Soot programmatically from scratch?
You should not use loadClassAndSupport. Insert a "Scene transformer" instead. Slicing can be achieved by using the FlowDroid extension to Soot. It supports slicing of both Android and Java code.

How to create new sample library in LINQPad

I am trying to figure out how to write a sample library in LINQPad.
Went on the official website and tried to google arround as well but couldn't find anything.
I am working on a small framework library for work and I would like to showcase the usage of the framework via some samples. I don't want to publicly distribute the samples, just want to be able to send them to other developers I am working with.
Any idea ?
In the latest beta, you can create a sample library just by right-clicking a folder in My Queries and choosing Create sample library.
You can find some sample library .zip files here:
LINQPad Sample Libraries
Just unzip them and look at the contents.
It looks like all you have to do is just zip up a folder full of LINQPad scripts, and provide a header.xml file in the root of the zip file containing something like this:
<SampleLibrary>
<Name>Name of your sample library</Name>
</SampleLibrary>
If you check the contents of some those libraries on that web page you'll notice that they also bundle the libraries used in the zip file, you should consider doing this as well so that the people you send the library to don't have to fix references in any of the samples before trying them.

Using Apparat dump with FDT and ant

I am totally new to flash development, don't even know ActiveScript yet.
I have to improve some existing flash application, so at first I need to understand the code.
I want to use some tool for code analysis, something to visualize class dependencies and code structure. I googled and found out about Apparat tool. Now I'm struggling with it because I can not find documentation that describes how to use Apparat. I'm frustrated, but it seems to be the only such tool.
So I started with example.
I've set up apparat running on FDT following this guide:
http://www.webdevotion.be/blog/2010/06/02/how-to-get-up-and-running-with-apparat/
The example (http://blog.joa-ebert.com/2010/05/26/new-apparat-example/) builds well and creates two SWF files. (I'm using ANT builder)
Now I want to analyze existing swf and see a PNG with class dependencies.
How should I do that?
What do I have to add and where?
Or maybe someone can explain how to use dump from windows command line? Something like
dump example.swf exampleAnalysis.png
After resolving all dependencies (which was tricky), I managed to get dump running
dump -i example.swf -uml
But it saves the UML diagram in .DOT format which is really hard to read as Graphviz GVedit cannot zoom and exports to PNG only what you see (messy impossible to read zoomed out graph), smyrna doesn't work and zgrviewer fails to load some files.

dojo js library + jsdoc -> how to document the code?

I'd love to ask you how do the guys developing dojo create the documentation?
From nightly builds you can get the uncompressed js files with all the comments, and I'm sure there is some kind documenting script that will generate some html or xml out of it.
I guess they use jsdoc as this can be found in their utils folder, but I have no idea on how to use it. jsDoc toolkit uses different /**commenting**/ notations than the original dojo files.
Thanks for all your help
It's all done with a custom PHP parser and Drupal. If you look in util/docscripts/README and util/jsdoc/INSTALL you can get all the gory details about how to generate the docs.
It's different than jsdoc-toolkit or JSDoc (as youv'e discovered).
FWIW, I'm using jsdoc-toolkit as it's much easier to generate static HTML and there's lots of documentation about the tags on the google code page.
Also, just to be clear, I don't develop dojo itself. I just use it a lot at work.
There are two parts to the "dojo jsdoc" process. There is a parser, written in PHP, which generates xml and/or json of the entirety of listed namespaces (defined in util/docscripts/modules, so you can add your own namespaces. There are basic usage instructions atop the file "generate.php") and a Drupal part called "jsdoc" which installs as a drupal module/plugin/whatever.
The Drupal aspect of it is just Dojo's basic view of this data. A well-crafted XSLT or something to iterate over the json and produce html would work just the same, though neither of these are provided by default (would love a contribution!). I shy away from the Drupal bit myself, though it has been running on api.dojotoolkit.org for some time now.
The doc parser is exposed so that you may use its inspection capabilities to write your own custom output as well. I use it to generate the Komodo .cix code completion in a [rather sloppy] PHP file util/docscripts/makeCix.php, which dumps information as found into an XML doc crafted to match the spec there. This could be modified to generate any kind of output you chose with a little finagling.
The doc syntax is all defined on the style guideline page:
http://dojotoolkit.org/reference-guide/developer/styleguide.html