Search Unity

YOLO in-game object detection (deep learning)

Discussion in 'Made With Unity' started by mbaske, Mar 12, 2019.

  1. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
    https://github.com/mbaske/yolo-unity
    Not exactly sure what this is useful for, but it's a fun proof of concept: Connecting Unity as a client to a Yolo Service via gRPC. The pretrained model seems to be better suited for photos & videos though, compared to recognizing game content. I guess my demo props and lighting are a little too artificial looking.
     
    Last edited: Mar 12, 2019
    SaadOooO, Antypodish, zakdank and 3 others like this.
  2. kqmdjc8

    kqmdjc8

    Joined:
    Jan 3, 2019
    Posts:
    102
    awesome idea
     
  3. zzzlyzzsq

    zzzlyzzsq

    Joined:
    Mar 4, 2019
    Posts:
    1
    Does it also works for streaming webcam video feed?
     
  4. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
  5. Georgia95

    Georgia95

    Joined:
    Nov 5, 2019
    Posts:
    1
    Hi, your work is very intersting. I would like to ask if i have the opportunity for detection my own objects. If yes, do you know the way?
    Thanks in advance
     
  6. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,778
    I haven't look on git rep, but I love this concept.
    Nice horse at T 2:29

    :)
     
  7. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
    Please see https://github.com/mbaske/yolo-unity/issues/1
     
  8. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
    Ha, are you sure it's not a horse? ;) Seriously though, if state-of-the-art image classifiers are proven to be on par with humans in extensive benchmarks, then one might think the notion of "ground truth" becomes somewhat shaky.
     
  9. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,778
    I am sure I have seen galloping horse there. It was fast, jumping over the bench :p

    Nothing new, but just wanted to say, deep learning challenges interesting problems. Humans fall indeed in similar traps as deep learning. Confusing sometimes one animal, with other, or think there is something which is not. Basically magicians and illusionists job :)

    Giving us enough time and examples to learn, we getting good at recognition. I love seeing AI following the same foot steps. Sometimes a bit scary, but we shouldn't stop.


    How many maximum objects your system is able to recognize at runtime?
     
  10. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
    I'm actually not sure how many objects can be detected simultaneously. The image classifier code sits in a DLL, not sure if it has a hard limit on the number of objects, but so far I haven't had any issues with that. The image classes which can be recognized are from a pretrained yolo model "v3-tiny" https://github.com/mbaske/yolo-unity/blob/master/YoloPretrained/YOLOv3-tiny/coco.names
     
  11. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,778
    I would expect more limitation based on CPU, rather scripts itself.
    I have no intention to give a play at given moment, even I would love to, since I have other priorities atm. Problem is, I would never stop playing then :D
    But if you find out at some point, how many things your rig is capable to run at real time, I think it will be nice info for benchmarking.
     
  12. kotsopoulos

    kotsopoulos

    Joined:
    Nov 6, 2014
    Posts:
    22
    Because i am new to all this stuff, can you please help me
    I cloned the Repo and the bulid the solution
    After that it says publish the YoloServer and the run the excecutable file
    How i can publish the Yoloserver, with which tool i publish it and where is the Yoloserver??
     
  13. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
  14. yannDetaf

    yannDetaf

    Joined:
    Jun 30, 2017
    Posts:
    4
    Really cool. Any idea, how to get it worked on the gpu?
     
  15. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
  16. yannDetaf

    yannDetaf

    Joined:
    Jun 30, 2017
    Posts:
    4
  17. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
    Sorry, no, I haven't run this on a GPU yet.
     
  18. yannDetaf

    yannDetaf

    Joined:
    Jun 30, 2017
    Posts:
    4
    What a pity. You did a really really great job on this project. Thanks u
     
  19. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
  20. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    I got the above running on a smartphone btw
     
  21. Shivatack

    Shivatack

    Joined:
    May 4, 2021
    Posts:
    7
    I'm intersted by that project. With how much FPS did it run on smartphone ? And do you think this is possible to do with more recent yolo version in Unity with images from webcam ?
     
  22. Lanre

    Lanre

    Joined:
    Dec 26, 2013
    Posts:
    3,973
    Shivatack likes this.
  23. ademord

    ademord

    Joined:
    Mar 22, 2021
    Posts:
    49
    @Lanre thanks for posting this, i'll check it out :)
     
    Lanre likes this.