mediapipe KNIFT template matching example: using own pics doesn not work properly - how does the example actually work? - mediapipe

i followed the example steps to create an own android app KNIFT template matching example like the 3 dollar bill example on the mediapipe website...did anyone of you build this and know how this really works? I cant get a clear documentation.
My approach to run my own example as suggested on the mediapipe: I have three example pics in my folder (and I did all the build steps with them) that are detected and framed indeed....but not as often and not as correctly as in the dollar bill example (which works fine for me, every bill is detected and framed and labeled as expected).
Also my labeling doesnt work properly. Sometimes it does partly, sometimes it is labeled but incorrect. What does the framework do with my pics and labels and how to optimize my own example?
Any help is appreciated...
regards, fabian

Related

Object Detection using R-CNN/YOLO with R

Please help! I’ve been reading online for days and just can’t seem to get a good starting point on this concept.
Would someone please be able to show/write a very short example of R code on how to create an object detection script. I would be so grateful!
I want to read in a few images to reference a car (i.e., car.pngs). Then compare with a few images in a folder to see if a car is present in those images (i.e., file1.png, file2.png, etc.).
Would someone please show me a simple script of how I might be able to do this. TIA

llvm Costmodel Analysis Pass is showing different result via opt compared to my own project

I have a llvm IR file that includes instructions like fadd and fmul. These instructions when calculating the cost with the cost-model pass
opt -analyze -targetlibinfo -cost-model myIRFile.ll
I have also created my own pass and run this pass in my code. But when I do this I am getting different results despite it runs on the same system. Mostly just 1's and 0's but never a 2 like when I run it with opts. See also attached screenshot, the top is the opt version and the bottom one my own pass.
Basically I reproduced the pass like described at the bottom of CostModel.cpp and this works perfectly except that the results are different. There are no errors whatsover but as you can see in the image the fadd and fmul instructions are rightfully so having a cost of 2. Sadly, in my own project it just turns out to be 1.
I have also tried to implement the entire cost analysis by calling all the instructions as described in TargetTransformInfoWrapperPass. This compiles also perfectly but it gives me the same results.
Another option I tried was posted here on stackoverflow:
Get cpu cycles of LLVM IR using CostModel. I had to make minor adjustments but the results are the same just 1 for both fmul and fadd on the same instruction.
Appearently, the cost-model pass via opt is doing something else that I am not aware of but I cannot find anything about this.
When you have read this entire post and are familiar with LLVM and have any clue what the cause might be or can point me in another direction I would be very grateful because this problem has been driving me nuts now for weeks.

Too Few Observation Sequences while training new voice for MarryTTS

I'm trying to build a new voice for MaryTTS in German for a while now, but didn't succeed so far. I followed a tutorial (https://github.com/marytts/marytts/wiki/HMMVoiceCreation) and tried to understand each step. No matter what I do, I get stuck at step 14 (HMMVoiceMakeVoice), the error being:
ERROR [+2121] HInit: Too Few Observation Sequences
which usually means, that the tested phone (en9 in this example) is not found within my data set.
After changing the locale, the same error happend on the phone "de27" as Nikolay Shmyrev pointed out.
I doubt that though, since I use about 500 Audio files, which have a length of at least 5 sec, so a total well over an hour of footage.
In fact, I skipped the "en9" phone, since I don't know what exactly is represented by it. The next one to fail was "oI", which I located manually about ten times in the first few audio files.
I think it has to do with the automatic labeling to not work properly (step 2-4), but I don't know, what I can do, to get a better result?
Edit: I uploaded all the files I get until this step, which can be inspected on this shared google drive. Note, that I could not, for copyright reasons, upload the wav folder. In the logs directory, you can find the logs after each step. I couldn't find any problems there, but maybe someone will.
I do not completely understand the structure of the generated data, but I thought changing the MARYBASE/mary/trickyPhones.txt and running the make tools again would be enough to change the map name from "tS" to "Z" which sounds about the same in German. But the HMMVoiceMakeVoice still results in the same output.

silverstripe dynamic backend for flexible frontend

I'm searching for a while, but didn't find a practical answer for the following problem:
An Articlepage in the Frontend can contain different types of sections. For example a block text section and than a text section with left photo an at the end an wallpaper photo.
Now I want to implement this in my backend dynamically, so that I can choose, which type of section and -even more important- how many sections my article should contain.
In my recent project I've solved the problem as an Articlesection with a Dropdown, wich contains the different section styles. And one article hat xy Artilesections as childpages. In the frontend I included all Childpages of the Article - so to speak the Articlesections, where I've checked with if conditions, which sectionsystyle I have in this Section and here I styled the section as I want.
For example Artilce1 has 2 Childpages: Articlesection1 and Artilcesection2.
In AS1 I have choose in the dropdown: right text with left photo and check with if conditions, to style the section. The same with AS2, that is for example a wallpaper photo.
This semiprofessional solution worked, but there are some bugs with displaying the Article correct in the backend, because I have to declare the Articlesections as Includes and not native childpages. And in generell this don't seems like the developers of silverstripe want the users to do it this way..
Are there better ways to implement a dynamically changing backend, so I can decide, which and how much sections I have in the frontend.
Take a look at https://github.com/sheadawson/silverstripe-blocks. There's quite a few addons that offer similar functionality as Blocks such as Elemental. The following blog post might also be useful too - https://www.silverstripe.org/blog/silverstripe-strips/.
Thank you for your reply, but there is a problem, because I don't work a lot with the terminal and the composer. In principle I want to install sheadawsons silverstripe-block. I have installed the composer and run the command:
"composer require sheadawson/silverstripe-blocks" it seems like it installed that correctly, because I became no errors, but what then? With dev/build -to refresh the database- happened nothing and the following instructions in the readmy chanced nothing. Should I copy any files in my Sivlerstripe web folder or what else..? I'm a bit desperate, because there is such a poor documentation.
Tank you

Newbie gotchas in Sarah Mei's "Outside-In BDD: How?!" Cucumber tutorial

I'm trying to learn Cucumber. After poking around a bit on SO I found a link to this tutorial. It was very helpful (and I recommend it highly!), but, for a beginner like myself, a couple of the early steps were opaque. I thought I'd explain these two pitfalls here, to spare future Cucumber students the head-scratching they caused me.
The two problems both came up in this section:
Starting the fail-fix cycle
I run it using cucumber features, and it fails on the first line –
Given I go to the new book page – because cucumber doesn’t know where
the “new book page” is. So I add that to the cucumber paths helper.
when /the new book page/
new_book_path
I had trouble interpreting this section and running her code.
My first question was: where do I find the cucumber paths helper file?
Once I figured it out and ran cucumber features, I got a syntax error.
My second question was how do I debug the syntax error that her code raises? I've tried to answer these two questions below.
First Gotcha: where the heck is the `cucumber paths helper'?
First off, she talks about adding a step to the cucumber paths helper. I struggled for a while to figure out where this file was located. I couldn't find anything with a similar name in my app, and google searches didn't yield any useful results. What was going on?
It turns out that I couldn't find the file because it's not automatically generated -- you need to create it yourself. Furthermore, the name of the file is totally arbitrary: it doesn't need to be called cucumber_paths_helper. That's why my google searches were fruitless.
For her code snippet to be executed it just needs to be in some file living in the features/support folder. All of the code in this directory is executed before any cucumber tests are run. The solution? I put her code into a new file at features/support/manage_books_steps.rb.
Ok, one down...
Second Gotcha: syntax error, unexpected keyword_when
The next problem showed up when I tried to run cucumber features. I got this:
/Users/dB/myApp/features/support/manage_books_steps.rb:1: syntax error, unexpected keyword_when
when /the new book page/
^ (SyntaxError)
For some reason my system couldn't parse this code. I'm not sure why exactly, but I'm guessing that Sarah was using some gem or tool to preprocess her code that I didn't have installed, and she unfortunately didn't go into detail about her gemset in the article. (Maybe she wrote it before cucumber's training wheels came off?) In any case, after consulting some other cucumber tutorials I tried reformatting her snippet like so.
When /^I go to the new book page$/ do
visit new_book_path
end
This worked.
After getting past those two little obstacles, the rest of the tutorial was a synch.
Anyway, I hope this helps someone somewhere down the line. And thanks, Sarah, for a great tutorial.
Edits/comments/corrections are welcome.