kulikovv / harmonic

MIT License
57 stars 10 forks source link

How to get the value of sins in train_CVPPP.ipynb? #6

Open Carmenliang opened 3 years ago

Carmenliang commented 3 years ago

In train_CVPPP.ipynb: sins = [[-24.22295570373535, 0.0, 0.4452361464500427], [-14.779047012329102, 0.0, 1.2561423778533936], [-16.399198532104492, 0.0, -0.3734317719936371], [18.362571716308594, 0.0, 0.7659217715263367], [-0.6603534817695618, 0.0, 0.24005144834518433], [-33.7341423034668, 0.0, -0.4350433051586151], [0.0, 4.286965370178223, 0.8109257817268372], [0.0, -19.908288955688477, 0.614355206489563], [0.0, 22.987812042236328, 0.28104516863822937], [0.0, 7.108828067779541, 0.4827950894832611], [0.0, 23.66850471496582, 0.21264752745628357], [0.0, -22.332250595092773, 1.0007625818252563]]

Is it initialized randomly?

TeRyZh commented 10 months ago

Same question here. How to generate sine wave. "Our approach describes each object instance using an expectation of a limited number of sine waves with frequencies and phases adjusted to particular object sizes and densities."

kulikovvictor commented 10 months ago

Hi! I will try to find the code but the idea is simple:

  1. Given a labeled dataset and number of horizontal and vertical sin waves N and M for example.
  2. Initialize sin waves linearly so smallest object will correpond smallest wave length and largest largest sinwave;
  3. Given labels and sin waves you can estimate the sum of all distances between objects on each image; (it is differentiable and you can find it in the repo)
  4. Optimize that metric on the train dataset;