Class AbstractObjectOverlap

    • Field Detail

      • m_ExcludeIdentical

        protected boolean m_ExcludeIdentical
        whether to skip identical objects, i.e., not count them as overlaps.
      • m_CopyMetaData

        protected boolean m_CopyMetaData
        whether to copy meta-data.
      • m_MetaDataKeys

        protected BaseString[] m_MetaDataKeys
        the meta-data keys to copy.
    • Constructor Detail

      • AbstractObjectOverlap

        public AbstractObjectOverlap()
    • Method Detail

      • setExcludeIdentical

        public void setExcludeIdentical​(boolean value)
        Sets whether to exclude identical objects from the comparison.
        Parameters:
        value - true if to exclude
      • getExcludeIdentical

        public boolean getExcludeIdentical()
        Returns whether to exclude identical objects from the comparison.
        Returns:
        true if to exclude
      • excludeIdenticalTipText

        public String excludeIdenticalTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setCopyMetaData

        public void setCopyMetaData​(boolean value)
        Sets whether to copy meta-data values across.
        Parameters:
        value - true if to copy
      • getCopyMetaData

        public boolean getCopyMetaData()
        Returns whether to copy meta-data values across.
        Returns:
        true if to copy
      • copyMetaDataTipText

        public String copyMetaDataTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setMetaDataKeys

        public void setMetaDataKeys​(BaseString[] value)
        Sets the keys of the meta-data values to copy across.
        Parameters:
        value - the keys
      • getMetaDataKeys

        public BaseString[] getMetaDataKeys()
        Returns the keys of the meta-data values to copy across.
        Returns:
        the keys
      • metaDataKeysTipText

        public String metaDataKeysTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the object, which can be displayed in the GUI.
        Default implementation returns null.
        Specified by:
        getQuickInfo in interface QuickInfoSupporter
        Returns:
        null if no info available, otherwise short string
      • check

        protected String check​(LocatedObjects annotations,
                               LocatedObjects predictions)
        Computes the overlapping objects between the annotations and the predictions.
        Parameters:
        annotations - the annotations (ground truth)
        predictions - the predictions to compare with
        Returns:
        the overlapping objects
      • initMatch

        protected void initMatch​(Map<LocatedObject,​Map<LocatedObject,​Double>> matches,
                                 LocatedObject thisObj)
        Initializes the matches for the object.
        Parameters:
        matches - for storing the matches
        thisObj - the object to initialize the matches for
      • addMatch

        protected void addMatch​(Map<LocatedObject,​Map<LocatedObject,​Double>> matches,
                                LocatedObject thisObj,
                                LocatedObject otherObj,
                                double score)
        Records the match for the object.
        Parameters:
        matches - for storing the matches
        thisObj - the object that a match was found for
        otherObj - the match that was found
        score - the score of the match
      • doCalculate

        protected abstract LocatedObjects doCalculate​(LocatedObjects annotations,
                                                      LocatedObjects predictions,
                                                      Map<LocatedObject,​Map<LocatedObject,​Double>> matches)
        Computes the overlapping objects between the annotations and the predictions.
        Parameters:
        annotations - the annotations (ground truth)
        predictions - the predictions to compare with
        matches - for collecting the matches
        Returns:
        the overlapping objects
      • calculate

        public LocatedObjects calculate​(LocatedObjects annotations,
                                        LocatedObjects predictions)
        Computes the overlapping objects between the annotations and the predictions.
        Specified by:
        calculate in interface ObjectOverlap
        Parameters:
        annotations - the annotations (ground truth)
        predictions - the predictions to compare with
        Returns:
        the overlapping objects
      • copyMetaData

        protected void copyMetaData​(LocatedObject source,
                                    LocatedObject target)
        Copies the specified meta-data values (if available) from source to target.
        Parameters:
        source - the source object with the values
        target - the target object to receive the values