Git Product home page Git Product logo

Comments (3)

JonathonLuiten avatar JonathonLuiten commented on August 15, 2024 3

Hey! Thanks for the question!

We are actually in the process of supporting official benchmarks that use this kind of evaluation (in progress, can't guarantee when it will be done).

However, I have already had some people ask me about something similar so I have already implemented the Euclidian similarity function, you can find it here:

def _calculate_euclidean_similarity(dets1, dets2, zero_distance=2.0):

You're correct that's it's easy to adapt some current dataset to use it (but not currently dataset currently uses it). I will walk you through an example of how to do this now. You only need to change a few lines I think.

E.g. let's change the mot_challenge_2d_box to the way you want it.
First change this line:

similarity_scores = self._calculate_box_ious(gt_dets_t, tracker_dets_t, box_format='xywh')

To similarity_scores = self._calculate_euclidean_similarity(gt_dets_t, tracker_dets_t, zero_distance=2.0)
You probably a want a different value for 'zero_distance' than 2.0 (this is the distance after which the similarity is considered 0). If your values are in pixels then 2.0 is definitely too small. (2.0 is the default here because for 3D tracking it corresponds to 2 meters)

Second let's change this line:

raw_data['dets'][t] = np.atleast_2d(time_data[:, 2:6])

You want this now to only read in 2 value for 2D point tracking (or 3 values for 3D point tracking).
e.g. raw_data['dets'][t] = np.atleast_2d(time_data[:, 2:4])

Finally you should change the lines:
here:

raw_data['dets'][t] = np.empty((0, 4))

and here:
raw_data['gt_crowd_ignore_regions'][t] = np.empty((0, 4))

such that empty boxes also have the correct size (2 for 2d, 3 for 3d)
e.g. raw_data['dets'][t] = np.empty((0, 2)) and raw_data['gt_crowd_ignore_regions'][t] = np.empty((0, 2))

And I think that should be all.

Let me know if that works for you?

Note that you could get away with not doing the last 3 edits if you just made sure that in your files the other values of the bbox were always 0 (but safer to make these edits, then accidently putting different values won't screw up the evaluation.

Jono

(won't close until you let me know if it works)

from trackeval.

mchagneux avatar mchagneux commented on August 15, 2024

Hi Jonathan,

Thank you so much for the thorough answer, this seems to work well ! I just had to disable preprocessing otherwise I get that error:

"trackeval.utils.TrackEvalException: Attempting to evaluate using invalid gt classes. This warning only triggers if preprocessing is performed, e.g. not for MOT15 or where prepropressing is explicitly disabled. Please either check your gt data, or disable preprocessing. The following invalid classes were found in timestep 0: -1"

I think this makes sense because I have been formatting my gt and trackers files/folders exactly as for MOT15.

Thank again !

Mathis

from trackeval.

JonathonLuiten avatar JonathonLuiten commented on August 15, 2024

Perfect! Glad to help. Closing this now!

from trackeval.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.