Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Using ViPER-GT's New Features: Omega, Textline, and Scripting
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
David Mihalcik  
View profile  
 More options May 25 2005, 2:11 pm
From: "David Mihalcik" <kraka...@gmail.com>
Date: Wed, 25 May 2005 18:11:21 -0000
Local: Wed, May 25 2005 2:11 pm
Subject: Using ViPER-GT's New Features: Omega, Textline, and Scripting
The Omega Shape
---------------

This new attribute type is used to mark up people, giving both the
location of the head as an ellipse and the location of the shoulder as
two points. The original goal was to present the shape as an 'Omega'.
As such, the editing controls are oriented around that idea - changing
the size of the ellipse moves the line, under the assumption that is
more likely what the user will desire. I haven't done any testing of
this; it is altogether possible that this doesn't buy us anything on
real data. But then, why not just use an ellipse and a 2-point open
polygon? (Perhaps because multiple-item drag and resize isn't
implemented.)

As with most shapes, the creation step is distinct and slightly
different from the editing step (e.g. in polygons you click to create
points, but while editing you have to hold down  shift to add points
and then drag them to your desired location). Here you draw the base
line, then select the height of the ellipse. The ellipse will be half
the width of the base line and its axis perpendicular to it.

You will notice the ellipse is surrounded with a rectangle, with two
dots at the top and bottom. The rectangle is used to resize the
ellipse, while the two dots allow for rotation. Since the ellipse acts
as the parent shape, adjust this first, by first orienting the ellipse
to the head, then dragging the border to adjust the size. Then, modify
the base line by dragging the line or its endpoints.

There are some additional editing modes that can be accessed by holding
down modifier keys (e.g. alt or shift). 'Shift' maintains the ellipse's
aspect ratio, while 'Control' edits the shape from the center point,
instead of holding the opposite side still.

Omega Shape Walkthrough
~~~~~~~~~~~~~~~~~~~~~~~

Open the "Schema Editor" through the "Window" menu.

Click "Add Descriptor". Change the new Descriptor's name to 'Person'.

Click "Add Attribute". Change the name of the attribute to "Location",
set 'dynamic' to 'true', and change the data type to 'omega'.

Click 'Apply' and close the schema editor.

Add a media file containing people by clicking the '+' button in the
media toolbar. I recommend using the LAMP-moving sample:
http://viper-toolkit.sourceforge.net/stuff/lamp-moving.mpg

Go to the "Person" tab in the data view (on the right). Click 'Create'
to add a new person descriptor. Then, click on the NULL field to enter
creation mode.

First, we draw an approximate omega around a person's head. In the
video, click+drag to draw the baseline, then drag up to select the head
region.

Now, you can edit the shape by changing the size of the ellipse or the
location of the line.

The Text Line Shape
-------------------

This is perhaps the most complex shape in viper. The text line is an
oriented rectangle with associated text and information about the
visibility of the words and characters. Designed as a compromise
between cost to mark-up text for tracking evaluation and quality of
evaluation, the shape hopefully allows for some modified character and
word level evaluation for not much more than the cost of marking up
text as lines. (I haven't done any user studies yet, and I don't have
enough data to make any reasonable conclusions about how well this
approximates word-level markup.)

The text line object is an oriented box with three associated bits of
information: the words in the box, where the breaks between the words
are located, and which characters in the words are occluded. However,
while the other values may change over time, the text in the box does
not change.

To implement this sort of 'partially dynamic attribute' within ViPER's
framework, we actually keep the text value in a seperate, linked
attribute within the same descriptor. This is a useful trick, as it
allows things like propagation and interpolation to only change one
part of a value. In the schema editor, when you create a text line
object, it adds a 'Text Link' item to its property list. From this, you
must select an attribute to contain your text value, otherwise the
system will not work.

Creating a text line works just like creating an oriented rectangle -
drag to draw the top line, then click again to place the bottom line.
Interesting things happen once you enter the text to associate with the
text line. This includes the ability to place and modify word breaks
(place word breaks by holding down shift and clicking inside the box)
and editing character occlusions (right now, you can get at them
through the pop-up menu in the table).

Text Line Shape Walkthrough
~~~~~~~~~~~~~~~~~~~~~~~

Open the Schema Editor from the Window menu.

Click "Add Descriptor". When the descriptor appears, change the name
from "Desc0" to "Text".

Click "Add Attribute". This adds a generic static String-valued field
to the "Text" descriptor. Change the name of the attribute from "Attr0"
to "Contents".

Click "Add Attribute" again. This time, change the name to "Location",
the data type to "textline", and set "dynamic" to "true".

You should notice that changing the type to "textline" added an
additional property, "Text Attribute", to the table. Click on it to
select from a list of static svalue attributes in the current
descriptor. Since we have only created one such attribute, it, the
'Contents' attribute, the list jumps to that value when you click on
it.

Hit Apply and close the Schema Editor. (I'm going to replace this with
'Okay'.)

If you don't already have any media loaded, click on the '+' icon in
the media toolbar to add a new media file. This pulls up a file
chooser; I'd recommend something like the LAMP-Moving sample:
http://viper-toolkit.sourceforge.net/stuff/lamp-moving.mpg

Advance to a location in the video that contains text to mark up. If
you are using LAMP-moving.mpeg, the first frame is fine. I will assume
that you are marking up the text at the top of the screen, which says
"LAMP Laboratory". If your clip or image doesn't have any text, feel
free to mark up some imaginary text that says "LAMP Laboratory" near
the top of the frame. ;-)

Once the file has finished loading, click on the "Text" tab in the
spreadsheet view (this is the pane on the right half of the display).
Then click "Create" to add a new instance of the "Text" descriptor.

Click on the NULL value in the Location column to select a text line
for creation.

Click above and to the left of the "LAMP Laboratory" headline, then
drag the mouse to the right to indicate orientation and width of the
text line, then click, then click again to indicate the height of the
line of text.

Next, double click on the selected empty cell in the "Contents" column
of the table, then type "LAMP Laboratory".

Select the "Location" object again. Notice that the word "LAMP" appears
over it now.

To place a word break in the box, hold down Shift and click between the
words "LAMP" and "Laboratory". You should notice a blue highlight
indicating where the break will be placed. Once the break is placed,
you can drag it around to shift its location.

Right-click on the "Location" value in the table. The first item on the
pop-up menu should be "Occlusions..." (before "Valid"). Clicking on
this brings up the Occulsion editor.

Scripting ViPER with Groovy
---------------------------

One of the newer features in viper is the ability to load Groovy
scripts. These are little pieces of code that can be added to the
'Scripts' menu by placing them in the ~/.viper/scripts/ directory. For
some examples, see the viper home page under the 'Extras for ViPER-GT'
heading: http://viper-toolkit.sourceforge.net/#scripts

Each script is a groovy class which implements the AppLoaderScript
interface. The examples include the useful 'Add I Frame Descriptor',
which places a new descriptor that is valid only on i-frames, and
'Scrub Invalid Data', which deletes data from invalid attributes (while
the data is useful for editing, it is not relevant for evaluation).

Using a Script in ViPER
~~~~~~~~~~~~~~~~~~~~~~~

First, install the script. ViPER loads scripts when it launches, or
when you click the  'Reset this Menu' option from the scripts menu. It
looks in two places: for system scripts in the jar file itself, and for
user scripts in the ~/.viper/scripts directory. So, download a script
from  the home page, place it in the appropriate directory, then click
the 'Reset this Menu'.

Writing a Script in ViPER
~~~~~~~~~~~~~~~~~~~~~~~~~

This is somewhat annoying. Debugging in groovy leaves much to be
desired. First, I'd recommend getting eclipse and importing the latest
viper-full source code drop into it. This will give you access to all
of the internal state that you need. Also, note that you have to use
the AppLoader's 'getBean' methods to get at any data in the program, so
you might have to look at the gt-config.n3 file to find out the mapping
from URI to internal objects.

As I can, I'll add more information to
http://viper-toolkit.sourceforge.net/docs/scripting/

==========================
If you have any questions or suggestions, feel free to post them or
email me privately.

- David Mihalcik


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Mihalcik  
View profile  
 More options Jun 22 2005, 7:11 pm
From: "David Mihalcik" <kraka...@gmail.com>
Date: Wed, 22 Jun 2005 23:11:52 -0000
Local: Wed, Jun 22 2005 7:11 pm
Subject: Re: Using ViPER-GT's New Features: Omega, Textline, and Scripting
What if you already have text marked up?
========================================
Since June 22, 2005, ViPER-GT supports turning oriented boxes and
bounding boxes directly into textline shapes. Just open the Schema
Editor, select the location attribute you wish to modify, and change
its type to 'textline'. If you have a static string attribute on the
descriptor already, it will link to that. Otherwise, it will create an
svalue attribute, and you will have to browse through the video and set
its value on each descriptor.

More importantly (& annoyingly), you will have to mark word breaks and
occlusions. To do mark word breaks, you have to go to each frame and
hold down shift while clicking in the existing boxes. To mark
occlusions, you have to right-click on the value of the textline in the
spreadsheet view to bring up the 'Occlusions...' window. (Yeah... I
know...)

What if you were using dynamic svalue attributes?
=================================================

Okay, so the current version of viper-gt doesn't support linking to
dynamic string attributes. There are a couple of solutions. One is to
break the descriptors so that each descriptor has a homogenous Content
value, then convert to static strings. Another is to use your
descriptors as is and modify the strings to be the whole string.

The intention when designing the textline attribute was that the
textline would represent a larger piece of text as it scrolls across
the screen (or doesn't). The main example would be a crawl on a news
broadcast. Here, each texline would be a single headline. While the
entire headline may never be visible, it represents a semantic unit
that is worthwhile to extract from the video.

If you are tracking text with a dynamic svalues, you might have to take
a hybrid approach. While there isn't a 'split' button in the UI
(perhaps I should add one...) it is not difficult to mark the current
frame, duplicate the current descriptor, and drag the lines so that one
ends before and the other starts on the mark (hmm... autoscrolling and
smart arrangement in the timeline would make this easier).


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google