yupidevs / yupi Goto Github PK
View Code? Open in Web Editor NEWPython package designed for collecting and processing trajectory data.
License: MIT License
Python package designed for collecting and processing trajectory data.
License: MIT License
Since, now we have 3 different ways to create a Trajectory object from data, we should include a demo of each in:
Great workl! Please add some working examples
Currently the __all__
variable on the __init__.py
file of the analyzing module only contains the plot_trajectories
function.
When time data is given the velocity must be calculated using this data. At this moment is calculated using the mean of the differences (average dt
).
Right now this method loads all the trajectories from a folder searching in a recursively way. Lets add a parameter so the user can control this behavior.
Not sure how much features you want to integrate into yupi but I thought it would be really great to have general tracklet linking features in order to connect tracklets created due to id switches while tracking.
Thanks for all your work on yupi!
Being able to do:
t2 = t1[50:200]
Now there are some resources that are not being linked automatically. Maybe, we need to generate the links elsewhere.
New tracking methods to be implemented:
Hi and thanks for your work! I have a question regarding trajectories which are not uniformly sampled in time. Reading your "brief comment on time" in the documentation I thought I only have to supply a sequence of time data and optionally set dt to None. However I realized the dt value set is on creation of the Trajectory object.
points1 = [[0, 0], [1.0, 0], [0.63, 0.98]]
t1 = [0,0.5,2]
track1 = Trajectory(points=points1, t=t1,traj_id="track1")
print(track1.dt)
points2 = [[0, 0], [2.0, 0], [1, 0.98]]
t2 = [0.5,1,1.3]
track2 = Trajectory(points=points2, dt=None, t=t2,traj_id="track2")
print(track2.dt)
Trajectory.save_trajectories([track1,track2], "./demo")
trajs = Trajectory.load_folder("./demo")
output:
1.0
0.4
Ignoring: demo/trajectory_1.json
Ignoring: demo/trajectory_0.json
When saving the trajectories and loading them again this leads to a LoadTrajectoryError triggered by a ValueError:
ValueError: You are giving 'dt' and 't' but 't0' is not the same as the first value of 't'.
Am I understanding something wrong or is this a bug in the implementation?
The bug can be reproduced by executing example_004.py from here:
https://github.com/yupidevs/yupi_examples/blob/master/example_004.py
Vector hashes will be used to check if some trajectory data must be recalculated.
After creating a Trajectory object, traj
, it is possible to successfully overwrite traj.r
by using +=
. For instance:
import yupi
x = [2, 5, 3]
traj = yupi.Trajectory(x)
traj.r += 1
traj.r
# Vector([[3.],
[6.],
[4.])
However, one gets an Attribute Error
when trying to do the analogous change with time or component attributes, as indicted bellow:
traj.t += 1
# Attribute Error: can't set attribute 't'
traj.r.x += 1
# Attribute Error: can't set attribute 'x'
It would be great if one could overwrite other Trajectory's attributes as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.