Git Product home page Git Product logo

Comments (6)

lessw2020 avatar lessw2020 commented on May 26, 2024 1

You can use the converter tool I have published here:
https://github.com/lessw2020/perception_tools
convert_complete

There is both a notebook and a script. For the notebook run all the cells down to the begin processing.
Set the path to the perception directory, adjust the image height and width and the output name if needed...and run.
Will process and produce a training ready Coco format file for you.

Note that this is for 2D bounding boxes. I have not implemented segmentation yet.

from com.unity.perception.

JonathanHUnity avatar JonathanHUnity commented on May 26, 2024 1

Wonderful @lessw2020!
For other types of models, we do provide the library Dataset Insights, a python library for loading Perception-based datasets. This should make it straightforward to feed the data into your model training code.

from com.unity.perception.

Tylersuard avatar Tylersuard commented on May 26, 2024

Firs of all, THANK YOU!
Second, I am running on Linux, getting this error consistently:
"directory of type Perception not found. aborting..."

In the instructions you refer to the "perception directory". What do you mean by that?

from com.unity.perception.

lessw2020 avatar lessw2020 commented on May 26, 2024

Hi @Tylersuard:
Definitely welcome.
'perception directory' should be the folder where Unity/perception puts it's three main output folders - Dataset*, Logs, and RGB*.
The error is triggered if that path is not of type directory. (are you passing in a path to the file instead of the directory?)

Example from my drive (though this is windows):

perception_directory

Thus the 'perception_directory' is the full path to that highlighted dir, 26cd1c73-4631-4b67-bfb1-9726d23d8de6.

From there, the converter will look for the first Dataset* folder and use that to get the annotations, and could also use the RGB folder if needed to check images/sizes, etc.

It should work fine on Linux, so if you can verify you are passing in path to the directory that should let you proceed.
If not, feel free to just post a screenshot of what you are passing in, and if can also update it to strip a filename and get the parent dir.

from com.unity.perception.

orangeRobot990 avatar orangeRobot990 commented on May 26, 2024

did anyone try to use these annotations and register them into detectron2 models ?
can we use directly like this
https://detectron2.readthedocs.io/en/latest/tutorials/datasets.html#:~:text=from%20detectron2.data.datasets%20import%20register_coco_instances%0Aregister_coco_instances(%22my_dataset%22%2C%20%7B%7D%2C%20%22json_annotation.json%22%2C%20%22path/to/image/dir%22)

from detectron2.data.datasets import register_coco_instances
register_coco_instances("my_dataset", {}, "json_annotation.json", "path/to/image/dir")

thank you @lessw2020 for providing your code, ill try it soon !

from com.unity.perception.

lessw2020 avatar lessw2020 commented on May 26, 2024

Hi @orangeRobot990 - I didn't use synthetic inside of detectron2, but have worked with detectron2 beyond that, and would say it should work fine to import the synthetic with coco annotations.
Once the synthetic images are annotated with coco format like I setup, they will work anywhere coco labelling is accepted.

Hope that helps!
Less

from com.unity.perception.

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.