Coder Social home page Coder Social logo

How to visualize the prediction about dance HOT 4 OPEN

lkevinzc avatar lkevinzc commented on June 15, 2024
How to visualize the prediction

from dance.

Comments (4)

JunbongJang avatar JunbongJang commented on June 15, 2024 2

Dear all,

  1. To get the segmentation, look for the "pred_polys" key among the output of the model in the following function in the detectron2/detectron2/evaluation/evaluator.py
inference_on_dataset(model, data_loader, evaluator)

  1. There is a visualization function in the dance/core/modeling/edge_snake/snake_head.py
vis(image, poly_sample_locations, poly_sample_targets)

If you write some code with two information above, you can get the following image:

vis_single_2

p.s. I had to put the following code in the line 98 of /detectron2/detectron2/data/dataset_mapper.py in order to correctly visualize the predicted boxes and segmentation on the image.

dataset_dict['height'] = image_shape[0]
dataset_dict['width'] = image_shape[1]

Without it, you will get the following image instead.
vis_single_2

from dance.

lkevinzc avatar lkevinzc commented on June 15, 2024 1

Hi @JunbongJang , sorry for the delayed reply, just saw you have already found a way to obtain the vertices point, nice!

Yes all the predictions need proper scaling since the training / testing operate on some fixed scales.

If you have further questions welcome to leave an issue or email me :)

from dance.

JunbongJang avatar JunbongJang commented on June 15, 2024

No Problem! @lkevinzc

Thank you for your work.

Your framework will be very useful for my future project.

from dance.

bamboopu avatar bamboopu commented on June 15, 2024

Dear all,

  1. To get the segmentation, look for the "pred_polys" key among the output of the model in the following function in the detectron2/detectron2/evaluation/evaluator.py
inference_on_dataset(model, data_loader, evaluator)
  1. There is a visualization function in the dance/core/modeling/edge_snake/snake_head.py
vis(image, poly_sample_locations, poly_sample_targets)

If you write some code with two information above, you can get the following image:

vis_single_2

p.s. I had to put the following code in the line 98 of /detectron2/detectron2/data/dataset_mapper.py in order to correctly visualize the predicted boxes and segmentation on the image.

dataset_dict['height'] = image_shape[0]
dataset_dict['width'] = image_shape[1]

Without it, you will get the following image instead. vis_single_2

Thanks for your sharing. It works well.

from dance.

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.