Train a Deep Learning model for custom object detection using TensorFlow 2.x (On Google Colab)

Train a Deep Learning model for custom object detection using TensorFlow 2.x (On Google Colab)

techzizou

2 года назад

55,731 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Rinkakumawatbvoc 17
Rinkakumawatbvoc 17 - 22.10.2023 00:43

Thank you so much for such an amazing and detailed video, I got an error when I started the training module 'tensorflow.python.ops.control_flow_ops' has no attribute 'case' could you please help me with this, that would really a great help.

Ответить
marc pacaldo
marc pacaldo - 15.09.2023 02:47

Hello sir i always get this error pls help

``` tensorflow.python.framework.errors_impl.InvalidArgumentError: {{function_node __wrapped__IteratorGetNext_output_types_16_device_/job:localhost/replica:0/task:0/device:CPU:0}} assertion failed: [[0.676126838][0.275459081][0.0400668]...] [[0.629382253][0.435726166][0.49248746]...]
[[{{function_node Assert_1_AssertGuard_false_873}}{{node Assert_1/AssertGuard/Assert}}]]
[[MultiDeviceIteratorGetNextFromShard]]
[[RemoteCall]] [Op:IteratorGetNext] name:

Ответить
Hamadi Behah
Hamadi Behah - 11.09.2023 18:02

Hi , I couldn't find a solution for this : "pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
flax 0.7.2 requires PyYAML>=5.4.1, but you have pyyaml 5.3.1 which is incompatible."
If you can guide me !
Thanks .

Ответить
Hemant Kumar
Hemant Kumar - 26.08.2023 08:18

Sir I am a PhD scholar and ur video is going to help me for buliding a ml model for intelligent Vehicle system.

Ответить
mostafa barout
mostafa barout - 29.06.2023 16:40

Thank you very much sir, when editing the config file, can I make the number of classes 91 instead of 2 ?, To keep the old chapters in addition to the new chapter

Ответить
tejaswini mj
tejaswini mj - 27.06.2023 19:27

How to do it using video

Ответить
Andres Buitrón T
Andres Buitrón T - 01.06.2023 01:23

I have a big cuestion, this neural network just work with 300x300 px images? i read some places with this description

Ответить
Arya
Arya - 23.05.2023 07:52

Sir, can mobileNetv3 do object detection?

Ответить
RRAM ELL
RRAM ELL - 13.05.2023 09:14

did the models we create can we use to deploy in a website using streamlit/flask sir

Ответить
Shubhan Hasanuddin
Shubhan Hasanuddin - 10.05.2023 16:20

I have a question, can tensorflow 2 run models from tensorflow 1 zoo?

Ответить
ABS Mahi
ABS Mahi - 25.04.2023 18:23

Don't we need validation data for training the model?

Ответить
Levie Mukamba
Levie Mukamba - 19.04.2023 10:50

Thank you for the tuturial am trying to train my model on custom data , am having errors on 15a) tensorflow.python.framework.errors_impl.InvalidArgumentError: {{function_node __wrapped__IteratorGetNext_output_types_16_device_/job:localhost/replica:0/task:0/device:GPU:0}} ConcatOp : Dimension 1 in both shapes must be equal: shape[0] = [1,1] vs. shape[1] = [1,2]
[[{{node concat}}]]
[[MultiDeviceIteratorGetNextFromShard]]
[[RemoteCall]] [Op:IteratorGetNext]
how do l solve this

Ответить
Fulache, Christian Neil B.
Fulache, Christian Neil B. - 16.04.2023 12:26

Hi i got this error after running the 10) Create the CSV files and the "label_map.pbtxt" file

i dont know how to fix this


IndexError Traceback (most recent call last)
<ipython-input-10-1f820841af24> in <cell line: 26>()
26 for label_path in ['train_labels', 'test_labels']:
27 image_path = os.path.join(os.getcwd(), label_path)
---> 28 xml_df, classes = xml_to_csv(label_path)
29 xml_df.to_csv(f'{label_path}.csv', index=None)
30 print(f'Successfully converted {label_path} xml to csv.')

<ipython-input-10-1f820841af24> in xml_to_csv(path)
13 int(root.find('size')[1].text),
14 member[0].text,
---> 15 int(member[4][0].text),
16 int(member[4][1].text),
17 int(member[4][2].text),

IndexError: child index out of range

Ответить
sangamithra murugesan
sangamithra murugesan - 07.04.2023 20:41

Hi , awesome video! i followed step by step. trained with 20 images and tested with 3 images(just to get a proof of concept). I had t tweak the code under heading 10, as i got an error when i copy pasted it. the model trained and got only one checkpoint though. the problem is when i fed an image for testing, it did not detect anything. just displayed the image without the green box and label. can you pls advise me why?. Or where i need to check to fix the error.
2). Im getting warning saying as: Could not find TensorRT. (Do you recommend it to be installed, will it fix my error?)

Ответить
Salmanul Faris
Salmanul Faris - 17.03.2023 09:50

my 15(a) step is running forever and not done a single training yet. And my tensor board is showing errors(14th cmd). I did this with my dataset first and then the mask dataset in this video. But still, the training is running forever and not done a single training. If anyone can please help me

Ответить
Miles Lewis
Miles Lewis - 14.03.2023 01:49

hello, when i get to Create test_labels & train_labels, I get. "mkdir: cannot create directory ‘test_labels’: File exists
mkdir: cannot create directory ‘train_labels’: File exists
ls: cannot access 'annotations/*': No such file or directory
ls: cannot access 'annotations/*': No such file or directory"

Ответить
Daniarfa Darmawan
Daniarfa Darmawan - 09.03.2023 12:23

Hello thank you for the tutorial. I want to ask, so I made it till the last code without any error, but the output is only picture without any box that tells wear mask or not wear mask, can you help me to solve this problem ?

Ответить
Alim Bahadur
Alim Bahadur - 20.02.2023 17:33

Exceptional tutorial🫡 The way you put everything in the colab notebook is just 👏. Just wanted to know how to use the trained model locally in Python opencv for inferencing

Ответить
Hasan Can Solakoğlu
Hasan Can Solakoğlu - 11.02.2023 11:32

my training images was not the same size so now my exported model doesnt have bounding boxes. how can i fix?

Ответить
Darryl Lim
Darryl Lim - 04.02.2023 23:44

Loved this tutorial, was wondering, after training the model, can I use the test run code to test run my model outside of google colab? For example, I downlaod my saved model and use the model using the code provided in colab outside of colab (on my local desktop), I tried using the code under "## Test your trained Object Detection model on images", with tensorflow 2.9.2 pip installed, and I received an error saying "ImportError: cannot import name 'string_int_label_map_pb2' from 'object_detection.protos'", any suggestions?

Ответить
Tengku Muliya
Tengku Muliya - 24.01.2023 09:38

some parts are black. i cant even see what youre changing

Ответить
Sarah M
Sarah M - 24.01.2023 00:22

Great tutorial!! Fantastic! How can we view and plot accuracy?

Ответить
Ashin Kunjumon
Ashin Kunjumon - 22.01.2023 10:00

tensorflow.python.framework.errors_impl.InvalidArgumentError: {{function_node __wrapped__IteratorGetNext_output_types_16_device_/job:localhost/replica:0/task:0/device:GPU:0}} assertion failed: [[0.681818187]] [[0.298701316]]
[[{{function_node Assert_1_AssertGuard_false_873}}{{node Assert_1/AssertGuard/Assert}}]]
[[MultiDeviceIteratorGetNextFromShard]]
[[RemoteCall]] [Op:IteratorGetNext]

getting this error while training using my own data set help

Ответить
Amir Give'on
Amir Give'on - 14.01.2023 02:47

Trying to follow this tutorial, but all the datasets I see are with PNG files. Is there a simple dataset that is organized how the tutorial is showing?

Ответить
Aji Prasetio
Aji Prasetio - 13.01.2023 13:01

Can this program run the video sir?.. I need source code to run video detection

Ответить
Mr. Gasper
Mr. Gasper - 11.01.2023 22:38

Thank you for making this great tutorial. It has helped me a lot. I'm having an issue on step 11, when I run the cell it says no file or directory; LD_LIBRARY_PATH: /usr/lib64-nvidia How can fix this error? I'm new to making computer vision.

Ответить
Yaşar Enes Dursun
Yaşar Enes Dursun - 02.01.2023 20:34

hi thank you for tutorial. i have a problem "10) Create the CSV files and the "label_map.pbtxt" file" not creating or showing files in my drive files

Ответить
janvi aggarwal
janvi aggarwal - 25.12.2022 02:00

Could not have access to folder '/content/models/research/object_detection' therefore could not execute 15a nor 15b. Can you please help. Thanks.
can anybody share this folder to me

Ответить
SEOJUNG PARK
SEOJUNG PARK - 21.12.2022 06:27

Hello~ I appreciate ur passional lecture it would be great help to me
btw, i face some error in step 15 a), error code is in below and for references, I put 40 train sets and 10 test sets

AssertionError: Found 40 Python objects that were not bound to checkpointed values, likely due to changes in the Python program. Showing 10 of 40 unmatched objects: [SyncOnReadVariable:{
0: <tf.Variable 'ssd_mobile_net_v2_keras_feature_extractor/FeatureMaps/layer_19_1_Conv2d_5_1x1_64_batchnorm/moving_variance:0' shape=(64,) dtype=float32, numpy=
array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], dtype=float32)>
}, MirroredVariable:{
0: <tf.Variable 'ssd_mobile_net_v2_keras_feature_extractor/FeatureMaps/layer_19_1_Conv2d_3_1x1_128_conv/kernel:0' shape=(1, 1, 512, 128) dtype=float32, numpy=
array([[[[ 0.01146096, 0.02203557, 0.00629593, ..., 0.02213633,
0.03315031, -0.00286419],
[-0.01572509, -0.00326869, -0.00167027, ..., 0.02301511,
-0.0558893 , 0.01885545],
[ 0.02122005, 0.0025963 , -0.00633531, ..., -0.02551603,
0.00022636, -0.01398777],
...,
[ 0.0237318 , -0.01526387, -0.04029399, ..., 0.05559986,
0.02018118, -0.00286904],
[-0.03726905, -0.00856464, 0.00030443, ..., -0.03537108,
-0.00719816, -0.00181781],
[-0.00660692, 0.02270997, -0.01324827, ..., 0.02593063,
0.0187327 , 0.04405713]]]], dtype=float32)>


i tried to search method, but failed so i need help for solve this problem.
Thank you

Ответить
User
User - 08.12.2022 12:35

What should I do if I want to add more images to the model? So if I want to retrain the model with more images, I don't want to start over with all the steps if possible

Ответить
GunBay
GunBay - 07.12.2022 21:25

First of all, I need to thank you greatly for this tutorial. Full appreciation. 
I would like to ask for an update on video. I've tried numerous time with your code with many adjustments and did many researches, however, it just always got stuck at 15(a). I believe it is due to python or other packages's version. (I could be wrong). So please, if you have some time, please do check it out what is wrong. Maybe try running the notebook with the current version of Collab.

Another suggestion beside my request is to make a tutorial for object detection locally (with tf2) instead of collab. (preferably on silicon Mac cuz I am on Mac xP)

Thank you very much!

Ответить
ARTmania🎭
ARTmania🎭 - 24.11.2022 05:07

In step 14.. there is an ERROR occurs as <MODULENotFOUNDError:No module named 'tensorboard>

Ответить
Tito Austen
Tito Austen - 13.11.2022 19:26

Can this be done on Cifar 100 dataset?

Ответить
Aishwarya Jois
Aishwarya Jois - 06.11.2022 21:17

Thank you for the content sir.
Even after running the training code, the training folder has only 'train' folder inside it. No checkpoints are created. Can you please help me with this?

Ответить
Driblet Drop
Driblet Drop - 05.11.2022 07:18

i have take this error at step 14 : "No module named 'tensorboard ", help please

Ответить
Z
Z - 05.11.2022 02:17

This sounds little dumb.. but I am using Faster R-CNN ResNet101 V1 640x640 for my model, but I see warmup_learning rate and warmup_step. I have 2500images with 2 classes (1700 images for class 1 and 800 images for class2). Also, I really want my data accurate, but I am not sure how to set up warmup_learning rate and warmup_step to my learning rate (I am using batch size 4)
I know that learning rate is start point -> warmup learnign rate (untill warmup step linearly).


learning_rate_base: .0003
total_steps: 50000
warmup_learning_rate: .00013333
warmup_steps: 2000

I am using like this right now, but it seems like my total loss is going up and down too hard....
any suggestion?

Also, batchsize cannot exceed 4..., if i exceed 4 i get an error message

Ответить
Ln Bdn
Ln Bdn - 26.10.2022 22:29

Google colab is unable to create train.record and test.record files in step 11 like what was shown in the video. Any help you can give? Thank you!

Ответить