TensorFlow.js Object Detection Made Easy

Sdílet
Vložit
  • čas přidán 4. 09. 2024

Komentáře • 36

  • @SaschaDittmann
    @SaschaDittmann  Před 4 lety +2

    Hope you enjoy this video! Here's what I cover:
    00:00 | Intro
    00:55 | Preview what we will build
    01:35 | Creatung a Custom Vision project
    03:01 | Upload & tag the images
    05:41 | Train the model
    06:30 | Evaluate / test the model
    07:42 | Export & download the model
    09:10 | A first look inside the web app
    10:32 | Integrating the model with TensorFlow.js
    15:45 | Checking the results
    16:12 | Performance Optimizations
    … and more info here:
    The GitHub repository
    github.com/SaschaDittmann/tfjs-cv-objectdetection
    The dataset I used to train the model, can be downloaded here
    github.com/microsoft/AIVisualProvision/tree/master/Documents/Images/Training_DataSet
    TensorFlow.js Image Classification Made Easy
    czcams.com/video/WFUL_oRT3nk/video.html

  • @krzusiekniwazne
    @krzusiekniwazne Před 4 lety +1

    And that's what I need. Thank you very much Sascha.. And I am asking for more.

    • @SaschaDittmann
      @SaschaDittmann  Před 4 lety +1

      You're welcome!
      I'll be sending out a poll later this week on my community tab, what I should create next. 😉

  • @ahmedrajaspeaks
    @ahmedrajaspeaks Před 2 lety

    Great Job Sascha!

  • @heyyy4987
    @heyyy4987 Před 2 lety

    awesome...

  • @elizabethcastrovillegas3231

    Hello Friend. tanks for the tutorial. I have an error to tray to run you proyect, in the console appeear this Uncaught Error: Based on the provided shape, [3,3,3,16], the tensor should have 432 values but has 363 and the proyect dont work. how i can solve this. Tanks and regards.

    • @SaschaDittmann
      @SaschaDittmann  Před 3 lety

      Did you clone the repo or download it as zip file. I use Got LFS which messes up the model bin files when using Download as ZIP

  • @dalandan8300
    @dalandan8300 Před rokem

    He sascha, nice tutorial! Thank you, that's what I actually needed. Too bad azure don't allow my debit card for the free trial. Do you have another approach?( Without azure)

  • @asddasd5262
    @asddasd5262 Před 2 lety

    Getting this error in console. Model is loaded. Did not changes to the clone git
    Uncaught (in promise) Error: Cannot infer the missing size in [-1,0] when there are 0 elements

  • @MajinVegeto89
    @MajinVegeto89 Před 2 lety

    I can't get past the error:
    "Error: The shape of dict['Placeholder'] provided in model.execute(dict) must be [-1,416,416,3], but was [1,2560,1440,3]"

  • @RudfaanMaimahad
    @RudfaanMaimahad Před 2 lety

    is there anyway to
    1. change box style (which one around image)
    2. crop and save detected area to image file

  • @VogelVlug
    @VogelVlug Před 2 lety

    Hey Sascha,
    I'm struggling to get you project running correctly with an own model. I trained a new model in CustomVision and just replaced your model in the project with my own new one, and I do get results, but the probabilty is a lot different from when I quicktest the exactly same image directly in Custom Vision. A prediction that gets a probability of 92.1% via the quicktest only gets a probability of 55%.

    • @VogelVlug
      @VogelVlug Před 2 lety

      Nevermind, I found the problem:
      if (is_new_od_model) {
      console.log( "Object Detection Model V2 detected." );
      image = is_new_od_model ? image : image.reverse(-1); // RGB->BGR for old models
      }
      With the wrapping if statement the image never gets converted to BGR for an old model. I moved the line and now the precision ist a lot better. (Still not exactly as good as directly within CustomVision, but they probably do even more pre-processing.) I created a Pull-Request in your github repository moving that line 😊

  • @song705
    @song705 Před 2 lety +1

    Hello Thanks for your tutorial can you help me with one little problem i am getting this error with my own Model
    Uncaught (in promise) Error: TensorList shape mismatch: Shapes -1 and 3 must match
    at lv (util_base.js:108:11)
    at OO (tensor_utils.js:28:3)
    at e.t.setItem (tensor_list.js:229:5)
    at control_executor.js:241:18
    at u (runtime.js:45:40)
    at Generator._invoke (runtime.js:274:22)
    at Generator.forEach.e. [as next] (runtime.js:97:21)
    at Um (runtime.js:728:43)
    at o (runtime.js:728:43)
    at runtime.js:728:43

  • @manfyegoh
    @manfyegoh Před 3 lety +1

    what is version 1 or version 2 @_@" how do we know the version?

    • @SaschaDittmann
      @SaschaDittmann  Před 3 lety

      There are two different model versions, which might be created by the Custom Vision service. I use the output of the prediction (length of the array) to check which model version was used.

  • @ahmadadib51
    @ahmadadib51 Před 3 lety

    Thanks for this tutorial. But I had a little problem, the predictions could not be made, localhost continued to show "running predictions" but it never finished. I don't know why, is it because of my big model? My model reaches 61 bin files.
    Please help me

    • @SaschaDittmann
      @SaschaDittmann  Před 3 lety +1

      Might be the large model. Please check with the developer tools in your browser, if you get an error message.

    • @ahmadadib51
      @ahmadadib51 Před 3 lety

      @@SaschaDittmann In console I got "Error : Activation leakyrelu has not been implemented for the WebGL backend"

    • @beautymates_de
      @beautymates_de Před 3 lety

      @@SaschaDittmann same here as Arib Bachmid I get I got "Error : Activation leakyrelu has not been implemented for the WebGL backend" can you help? I get this after optimization. In the json file it seems that leakyrelu changed to leakyrelu_alpha, maybe this is the problem? Thanks in Advance and for this awesome video

    • @beautymates_de
      @beautymates_de Před 3 lety

      got this: replace the thensflow script with

  • @FrewqasZ
    @FrewqasZ Před 4 lety

    Hi! sorry to reach out to you in this rather awkward way but im really at the end of my rope and cant find help anywhere.
    Ive got a problem with azure customvision regarding your video about simple image recognition. I am adding my images (of fruits) and after training my model has 100% precision/recall and ap ... this makes the model completely useless. Do you have any idea what im doing wrong or where to find help?

    • @SaschaDittmann
      @SaschaDittmann  Před 4 lety

      Hi Jeremiasz,
      How many images are you using?
      Do you have a fair amount for each kind of fruits?
      Are you using any kind of Image Data Augmentation?

    • @FrewqasZ
      @FrewqasZ Před 4 lety

      ​@@SaschaDittmann
      Hello! thank you so much for answering.
      1. 400 images total,
      2. 200 images per category (banana/apple)
      3. I am not aware if i do, so probably not.
      Images of fruits are downloaded from www.kaggle.com/moltean/fruits

  • @xhancexd
    @xhancexd Před 3 lety

    Hello, Do you have a tutorial to implement this to node-red?

    • @SaschaDittmann
      @SaschaDittmann  Před 3 lety +1

      I‘m sorry but no. But I‘m happy to add that to my list of ideas

  • @mirzaabdulrehman428
    @mirzaabdulrehman428 Před 3 lety

    make a video on runtime detection on webcam

  • @chings228
    @chings228 Před 3 lety

    is it free for azure training model ?

    • @SaschaDittmann
      @SaschaDittmann  Před 3 lety

      Hi Tom,
      there is a free, as well as a paid, offering for Azure Custom Vision.
      The free instance currently contains:
      - Up to 2 projects
      - Up to 1 hour training per month
      - Up to 5000 training images per project
      For more details about both offerings, please have a look here
      azure.microsoft.com/en-us/pricing/details/cognitive-services/custom-vision-service/

  • @user-sq2cx6qc3y
    @user-sq2cx6qc3y Před 3 lety

    Херня какая то, при регистрации пришлось засветить карту банка. И там нет тарифа бесплатного, есть тариф "с оплатой по мере использования". В ролике много вырезано. Интерфейс отличается координально. После регистрации сразу начнутся проблемы с пониманием и попытками повторить. Забейте, не тратьте время...

    • @SaschaDittmann
      @SaschaDittmann  Před 3 lety

      If you are looking for the free offer details, checkout this link:
      azure.microsoft.com/en-us/pricing/details/cognitive-services/custom-vision-service/

    • @user-sq2cx6qc3y
      @user-sq2cx6qc3y Před 3 lety

      @@SaschaDittmann Ты на своём "бесплатном" аккаунте демонстрируешь тренировку 24 часа, хотя бесплатно только 1 час в месяц, судя по данным из твоей ссылки.

    • @SaschaDittmann
      @SaschaDittmann  Před 3 lety

      @@user-sq2cx6qc3y I'm sorry that it came across that way. I should have emphasized this more clearly.