Giter Site home page Giter Site logo

trajectories_prediction's People

Contributors

masashi-hatano avatar

Stargazers

 avatar

Watchers

 avatar

trajectories_prediction's Issues

Extracting the required images from the dataset

The images are collected in approximately 30 fps, whereas the input of the model is supposed to be in 2.5 fps. Therefore, we need to extract the required images from the original dataset.

  • Write a code to extract images in 2.5 fps from the dataset.
  • apply the code to get a timestamp which contains the required images' filename.

Replacing the code of segformer

The current code for semantic segmentation is from the official code of segformer, but they provides with the pre-trained model, which is not enough trained. So, using a pre-trained model from huggingface is a better way to use the model because we will have less code.

  • Write a code to use a pre-trained model of segformer from huggingface.
  • Check its quality.

Sort input data

Input data need to be sorted according to timestamp and pedestrian ID number.
Priorities should be timestamp and then pedestrian ID.

Creating input data for the model

After extracting the required images, input data is ready to be created.

  • run the existing code of ctrans.py and get the input data.

Uncertainty of coordinate transformation from far-shot

The coordinate transformation of points which are far from recorder seems to be uncertain and incorrect.
Maybe this is because the parameters are not so exact or the depth value is not used, but I am not sure about the reasons.
It might be possible to improve if the distortion factor is taken into account.

Plot the predicted trajectories

Using a json file which contains the information about all trajectories prediction, we can now plot them in the original images and see if it is appropriate or not.

  • Write a code to read contents of json file and run ctrans_inv.py.
  • Save each image in output file.

Inconsistency of predicted trajectories

Trajectories predicted by the model is not sorted in an ascending or descending order; therefore, they are to be carefully treated.

  • Consider an algorithm that matches to the output of model.
  • Realize it.

Converting prediction data to json file

Socialgan/prediction.py returns torch array, which is of [number of prediction length, number of predicted trajectories, 2D coordinate].
This array is needed to be saved as either a text file or json file.
So far, I am thinking about saving as a json file as follow:

{
    "PredTimeList": [
    {
        "time_start": 1430,
        "PedList": [
        {
            "index": 0,
            "pred_traj": [(pred1_x, pred1_y),...,(pred8_x,pred8_y)]
        },
        {
            "index": 1,
            "pred_traj": [(pred1_x, pred1_y),...,(pred8_x,pred8_y)]
        }]
    },
    {
        "time_start": 1830,
        "PedList": [
        {
            "index": 0,
            "pred_traj": [(pred1_x, pred1_y),...,(pred8_x,pred8_y)]
        },
        {
            "index": 1,
            "pred_traj": [(pred1_x, pred1_y),...,(pred8_x,pred8_y)]
        }]
    }
}
  • Create a new function to save predicted trajectories in a json file.

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.