filtering data by the bounding box size

39 views
Skip to first unread message

Sergiy Fefilatyev

unread,
Feb 20, 2011, 5:26:09 PM2/20/11
to ViPER Mailing List
Hi,

I spent quite a lot of time trying to figure out how to filter ground-
truth data and results of detection by the size of the bounding box. I
needed to filter out targets with the bounding boxes that have height
or width <12 pixels. As far as I understand the type of data of
"data:bbox" does not accept filters like ">=" or ">". Is that a
correct conclusion?

My second attempt used specifically introduced node "<attribute
name="WIDTH>" with data values of type "data:fvalue" which,
theoretically should accept those filters.

my filter section is the following:

#BEGIN_GROUND_FILTER
OBJECT SHIP
WIDTH : >= 12
#END_GROUND_FILTER

Howver, I get the following error:
java.lang.NullPointerException
at viper.descriptors.attributes.Attribute_fvalue
$FloatValue.compareTo(Un
known Source)
at viper.filters.Rules$Comparison.passes(Unknown Source)
at viper.descriptors.attributes.Attribute.passes(Unknown
Source)
at viper.filters.RuleHolder.meetsCriteria(Unknown Source)
at viper.descriptors.DescVector.parseData(Unknown Source)
at viper.descriptors.DescHolder.parseData(Unknown Source)
at viper.descriptors.DescHolder.parseData(Unknown Source)
at viper.comparison.ViperPE.parseDescriptorData(Unknown
Source)
at viper.comparison.ViperPE.run(Unknown Source)
at viper.comparison.ViperPE.main(Unknown Source)

I use the following config of schema:
<descriptor name="SHIP" type="OBJECT">
<attribute dynamic="false" name="name" type="http://
lamp.cfar.umd.edu/viperdata#svalue"/>
<attribute dynamic="true" name="Location" type="http://
lamp.cfar.umd.edu/viperdata#bbox"/>
<attribute dynamic="true" name="WIDTH" type="http://
lamp.cfar.umd.edu/viperdata#fvalue">
<default>
<data:fvalue value="0.0"/>
</default>
</attribute>
<attribute dynamic="true" name="HEIGHT" type="http://
lamp.cfar.umd.edu/viperdata#fvalue">
<default>
<data:fvalue value="0.0"/>
</default>
</attribute>
</descriptor>

the data looks as following:
<object framespan="1:35 58:100" id="0" name="SHIP">
<attribute name="name">
<data:svalue value="0"/>
</attribute>
<attribute name="Location">
<data:bbox framespan="1:1" height="28" width="26"
x="288" y="169"/>
<data:bbox framespan="2:2" height="47" width="28"
x="243" y="161"/>
....
</attribute>
<attribute name="WIDTH">
<data:fvalue framespan="1:1" value="26"/>
<data:fvalue framespan="2:2" value="28"/>
.....
</attribute>
<attribute name="HEIGHT">
<data:fvalue framespan="1:1" value="28"/>
<data:fvalue framespan="2:2" value="47"/>
.....
</attribute>

Please tell me what I did wrong

David Mihalcik

unread,
Mar 6, 2011, 4:54:49 PM3/6/11
to viper-...@googlegroups.com
It looks like there is a bug in the rule code that does not load
default values. To work around it, you can make
sure the value is set in the xml file, or maybe edit the code. I think
the error is Attribute.java's definition of
'passes(Filterable.Rule)'. Actually, it looks like *nothing* respects
the default value - once it is set, eclipse's
'call hierarchy' reports that nothing uses it.

David Mihalcik

> --
> You received this message because you are subscribed to the Google Groups "ViPER Mailing List" group.
> To post to this group, send email to viper-...@googlegroups.com.
> To unsubscribe from this group, send email to viper-toolki...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/viper-toolkit?hl=en.
>
>

Sergiy Fefilatyev

unread,
Mar 8, 2011, 12:40:01 AM3/8/11
to viper-...@googlegroups.com
David,

thank you for your reply. I decided to avoid the problem by filtering data in my own program.
--
with kind regards,
Sergiy

Reply all
Reply to author
Forward
0 new messages