Convolutional Neural Network wirh Keras & TensorFlow in R | Large Scale Image Recognition

  Рет қаралды 28,290

Dr. Bharatendra Rai

Dr. Bharatendra Rai

Күн бұрын

Пікірлер: 232
@flamboyantperson5936
@flamboyantperson5936 6 жыл бұрын
Sir you are great. You are giving us knowledge from top country and very advanced in data science. I have no words to thank you. Please please keep us helping here. We as a student always give blessings for whatever you have taught us so far for FREE. Thank you so much sir.
@bkrai
@bkrai 6 жыл бұрын
Thanks for your feedback!
@cosimotuena6597
@cosimotuena6597 3 жыл бұрын
This is great! is possible to get a continuous output from CNN? That is, I have a sample of noisy (signal) data and the very same clean data. I want to extract from that noisy trend (image) the clean trend output. Once the CNN has caught the correct trend, is possible to get the predicted output?
@YueHanBaoLin
@YueHanBaoLin 5 жыл бұрын
Thank you very much Dr. Rai for all the effort in creating these very helpful tutorials.
@bkrai
@bkrai 5 жыл бұрын
Thanks for your comments!
@asjsingh
@asjsingh 4 жыл бұрын
This is an amazing tutorial!! Got it working for my project first time with no prior ML experience.. thank you so much.
@bkrai
@bkrai 4 жыл бұрын
Great to hear!
@benjaminwarr
@benjaminwarr 4 жыл бұрын
Very very good Dr. Clear, precise. Informative.
@bkrai
@bkrai 4 жыл бұрын
Glad it was helpful!
@parasrai145
@parasrai145 6 жыл бұрын
Very simple and easy to follow explanations!
@bkrai
@bkrai 6 жыл бұрын
Thanks for comments!
@zj9339
@zj9339 3 жыл бұрын
Dear Dr. Bharatendra, please can I ask whether Ganomaly algorithm which was firstly developed by Duke university is available in R? We have a case here where we have a lot of normal images but not enough anomaly images. Ganomaly seems to be the right algorithm for us. Do you think we would be able to achieve this in R? Would you be able to kindly do a video for this? Cheers.
@bkrai
@bkrai 3 жыл бұрын
Thanks, I've added it to my list.
@edmundodeguzman6607
@edmundodeguzman6607 3 жыл бұрын
Hello Dr. May I ask what version of R did you use to install the package EBImage? Thank you.
@asjsingh
@asjsingh 4 жыл бұрын
Hello, can I ask, is a set.seed command needed to randomise the order of images? I have seen this in other implementations but was unclear if needed here? Thank you.
@Divyanshu_Vats
@Divyanshu_Vats 6 жыл бұрын
Hi, This was very helpful. Could you also please provide a video or resources for instance/semantic segmentation using R?
@bkrai
@bkrai 4 жыл бұрын
I've added it to my list.
@venustat
@venustat 6 жыл бұрын
Great... you are really helpful for so many.. Next we are expecting on RNN using R for language Modeling /text
@bkrai
@bkrai 6 жыл бұрын
Thanks for the suggestion, I've added it to my list.
@hapvideolar7957
@hapvideolar7957 2 жыл бұрын
I get that error below. What is the solution? Error in py_call_impl(callable, dots$args, dots$keywords) : ValueError: Input 0 of layer "conv2d_7" is incompatible with the layer: expected min_ndim=4, found ndim=2. Full shape received: (None, 3)
@AllenKei
@AllenKei 6 жыл бұрын
Hi, thanks for the great video. Do you know how can I see the actual value of parameters and filters in the model? Like the weight, bias, and filter value after training? Thanks,
@bkrai
@bkrai 4 жыл бұрын
Probably I'll explain it through a new video.
@amanambuamobi3331
@amanambuamobi3331 6 жыл бұрын
Hello Professor. Thanks for your tutorials as always. can i use this CNN to do landuse classification? if so how do i go about it. i feel it will be very good to apply this technique to a current project i am working. i hope u can help me with answers. Thank you so much for all your videos
@bkrai
@bkrai 6 жыл бұрын
You can create training set of images and label them to use as response variable. And then follow the steps shown in the video.
@dimassetiyadi315
@dimassetiyadi315 3 жыл бұрын
Prof, I wanna ask, when i run this code as same as ur code on video but still error, how to solve it? history % fit(train, trainLabels, epochs = 60, batch = 32, validation_split = 0.2, validation_data = list(test, testLabels)) btw the error is like this Error in py_call_impl(callable, dots$args, dots$keywords) :
@bkrai
@bkrai 3 жыл бұрын
Try colab for R: kzbin.info/www/bejne/jofJn2l_pdSIhrc
@yaoli1413
@yaoli1413 3 жыл бұрын
Thanks so much. Very clear, informative. Can you do another video about Conv-lstm, how CNN combined with LSTM in R?
@bkrai
@bkrai 3 жыл бұрын
I'm adding it to my list. For LSTM you can refer to: kzbin.info/www/bejne/Y4ScqqOdhs6ifKc
@MADHAVSHARMA-m2k
@MADHAVSHARMA-m2k Жыл бұрын
beautiful explaination sir
@bkrai
@bkrai Жыл бұрын
Thanks and welcome!
@Didanihaaaa
@Didanihaaaa 6 жыл бұрын
Hello Dr. Rai. Thaks for your channel. I have a question about live stream data in R. Can we apply R to does some works on real-time data? Is it possible to use R for real-time tasks? Most of the time in the industry we do have real-time data, which are changed and causes different optimum answers. Thanks for your time and best regards.
@bkrai
@bkrai 6 жыл бұрын
I'm adding analysis of streaming data to my list. Thanks for the suggestion!
@muhammadhaekal4498
@muhammadhaekal4498 3 жыл бұрын
hai Dr. rai, would you suggest me about some literature reference that you use for calculate parameters in CNN
@bkrai
@bkrai 3 жыл бұрын
You can refer to: Rai BK, (2019). “Advanced Deep Learning with R: Become an expert at designing, building, and improving advanced neural network models using R”, Packt Publishing, ASIN: B07ZFN5MXN.
@muhammadhaekal4498
@muhammadhaekal4498 3 жыл бұрын
@@bkrai thx Dr.rai
@bkrai
@bkrai 3 жыл бұрын
You are welcome!
@rohansathasivam1266
@rohansathasivam1266 6 жыл бұрын
Dear Bharatendra, it is fantastic to follow your tutorials as they are simple and clear. I have images in .PGM format, can I use Keras to deal with them? I tried to read them using readImages, but it doesn't support the grayscale images. Any advice would be highly appreciated.
@bkrai
@bkrai 4 жыл бұрын
I saw this today. I think you may have already solved it.
@lakshmichandrasekharan646
@lakshmichandrasekharan646 2 жыл бұрын
When I try to fit the model I am getting the following error : Error in curve(expr = x, from = from, to = to, xlim = xlim, ylab = ylab, : 'expr' did not evaluate to an object of length 'n'. Please could you help me out with this. Thank you for the wonderful videos!
@parthivashome438
@parthivashome438 3 жыл бұрын
I am not able to perform the OHE since it is not categorical value so using the function to_categorical as you did, it throws an error stating "Python module tensorflow.keras was not found". Can you help me out sir, please?
@hunny.dhawan.7
@hunny.dhawan.7 4 жыл бұрын
hello sir, I want to ask that why did you add four conv_2d layers? Cant we have only 1 conv_2d layer? Also I have 20-20 images of shirt, t-shirt and jeans which is total of 60 images as my train set. when I run this code I am getting this error msg. ValueError: Input 0 of layer conv2d_4 is incompatible with the layer: expected ndim=4, found ndim=2. Full shape received: [None, 3] Please help me out how can I solve this issue!
@bkrai
@bkrai 4 жыл бұрын
There must be some error in your code involving model architecture. For more insight, you can refer to this case study too: kzbin.info/www/bejne/a5PWoJJrjZyNq5Y
@erdemerdem4234
@erdemerdem4234 2 жыл бұрын
Thank you for this excellent tutorial. At the end, while running the formula, I am taking the following error; Error in py_call_impl(callable, dots$args, dots$keywords) : ValueError: Input 0 of layer conv2d_86 is incompatible with the layer: : expected min_ndim=4, found ndim=2. Full shape received: [None, 3]. What is the problem about that?
@yt.abhibhav
@yt.abhibhav 4 жыл бұрын
correct me if I am wrong, but I think at @1:17, it should be 98 X 98 X 32 X 3.
@bkrai
@bkrai 4 жыл бұрын
correct answer is 98 X 98 X 32
@zhanyouxu5712
@zhanyouxu5712 3 жыл бұрын
Thank you for the excellent tutorial. When I tried to combine my 700 images using the command "combine," and got the error message as: "Error: C stack usage 15923968 is too close to the limit Error: no more error handlers available (recursive errors?); invoking 'abort' restart". I will appreciate any suggestion from you.
@bkrai
@bkrai 3 жыл бұрын
It says 'too close to limit' for the platform you are using. You can try Google's colab: kzbin.info/www/bejne/jofJn2l_pdSIhrc
@xinjin2808
@xinjin2808 6 жыл бұрын
Thank you sir. I have a question. We have 15 samples in our training data, you use batch size which is 32 is way higher than the number of samples. Is i am wrong on understanding the meaning of batch size?
@urbanhairess
@urbanhairess 5 жыл бұрын
Thank you very much for this great video. When you ran the model again (after getting low accuracy), did you actually change anything in the code to get improved accuracy?
@bkrai
@bkrai 5 жыл бұрын
Yes, a validation related code was added.
@znagy1041
@znagy1041 4 жыл бұрын
For me on Windows 10 (R ver 3.6.3) is the workingcode when line 95 is replaced with: validation_data = list(test, testLabels)) . Just adding this line gives a Python error message.
@shwetaredkar734
@shwetaredkar734 5 жыл бұрын
When I fit the model, It says "The previous R session was abnormally terminated due to an unexpected crash". I googled out this error but I am unable to fix it. Could you please help me out with this? I am executing this on Rcloud. Are there any memory restrictions on RCloud? Thanks!
@bkrai
@bkrai 5 жыл бұрын
I would recommend for running deep network models you use desktop version of R and RStudio.
@niluparupasinghe9499
@niluparupasinghe9499 6 жыл бұрын
A full thumbs up for this. Appreciate your effort. Video is nicely aligned. Thank you so much.
@bkrai
@bkrai 6 жыл бұрын
Thanks for comments!
@hammao
@hammao 5 жыл бұрын
Hi Bharatendra, you succeeded in making CNN very cool... thanks for the video. I followed the example and trust me i watch all the video several times just to get a hang of it. I feel you're the only one that has gone to lenght to explains what is actually happening in the layers. thanks for this. I have set of images from geology (1325 in total) belonging to 102 classes (groups). i was wondering how to handle this because physically typing the labels and dividing into test and train would take me forever. I was wondering if can recommend an easy way to handle this large data and read them in.
@bkrai
@bkrai 4 жыл бұрын
Thanks! The link below can give you some idea: kzbin.info/www/bejne/a5PWoJJrjZyNq5Y
@latebowl1
@latebowl1 6 жыл бұрын
Hi, I'm new to this and am at the stage of trying to combine the images but EBImage does not support the new version of R. Is there another way to combine the images as you did about 10 minutes into your video?
@bkrai
@bkrai 6 жыл бұрын
I would suggest going over image analysis and processing first. Here is the link: kzbin.info/www/bejne/mnzKdnd3irqnpdE
@latebowl1
@latebowl1 6 жыл бұрын
Thank you so much for your help! I had to reinstall the older R version 3.3.2 but everything works great now.
@kclim
@kclim 5 жыл бұрын
Not sure whether this was relevant 10 months ago, but I recently had some trouble installing EBImage initially on R3.5.2. But if you do it via the instructions on the bioconductor org website (which basically says to install BiocManager, followed by EBImage you should be good to go.
@arpitgupta6068
@arpitgupta6068 5 жыл бұрын
try installing the package from github. it works with latest R version 3.5.2 devtools::install_github('aoles/EBImage')
@Didanihaaaa
@Didanihaaaa 6 жыл бұрын
I was wondering that what IDE do you suggest for python!? Cuz I see Rodeo, Spyder, pycharm ... I see lot of similarity between rstudio and rodeo tho! Thanks for your help Sir.
@bkrai
@bkrai 6 жыл бұрын
If you have used rstudio and matlab, rodeo should be fine.
@tedmiller3267
@tedmiller3267 4 жыл бұрын
Thank you very much for this great video! Could you suggest reading or watching something about facial recognition in R? Thanks!
@bkrai
@bkrai 4 жыл бұрын
Thanks, I've added it to my list.
@jacobusstrydom7017
@jacobusstrydom7017 6 жыл бұрын
O wow thanks, now I can get away from python and back to R, Yhaaa!!
@bkrai
@bkrai 6 жыл бұрын
That's great!
@rahuljindal3160
@rahuljindal3160 4 жыл бұрын
Error 'Sequential' object has no attribute 'get_shape' when adding any layer to the model. Any help?
@bkrai
@bkrai 4 жыл бұрын
If the error is computer specific, you can try rstudio cloud: kzbin.info/www/bejne/iXfTq6VoZrWUrMk
@NRobles93
@NRobles93 6 жыл бұрын
Awesome stuff sir! I'll start playing with this algorithm in the next few days!
@bkrai
@bkrai 6 жыл бұрын
Thanks!
@nzyukomasai9530
@nzyukomasai9530 4 жыл бұрын
Informative. But I have every time I run trainlabels
@bkrai
@bkrai 4 жыл бұрын
Try this: kzbin.info/www/bejne/Y3q8iqSarcmMjs0
@InfinitesimallyInfinite
@InfinitesimallyInfinite 6 жыл бұрын
Thanks a lot for this! Really appreciate your hard work and free content.
@bkrai
@bkrai 6 жыл бұрын
Thanks for comments!
@sergiomorellmonzo1780
@sergiomorellmonzo1780 4 жыл бұрын
Thank you for your videos, these are really interesting. I am trying to apply your approach to a remote sensing problem. I would like to apply CNN to a set of farm parcels. I have a list of images that contain an aerial view of each parcel but these images are not square or rectangular because images are cropped according to parcel shape. Will your approach work in this case? Thanks for your time.
@bkrai
@bkrai 4 жыл бұрын
For each type of image, you will need many samples. For image related data, CNN is the best network to use, however you will need lot of data.
@sergiomorellmonzo1780
@sergiomorellmonzo1780 4 жыл бұрын
@@bkrai I agree. I am trying to implement a parcel-based agricultural crop classification process. At the moment I am able to extract each parcel through a segmentation process. Then I can generate an image of each previously classified plot. But, my images do not have the same number of pixels in all columns (x) and in all rows (y). I will try to apply your approach and report on the results obtained. Thank you
@bkrai
@bkrai 4 жыл бұрын
Thanks for the update!
@supratikghosh2975
@supratikghosh2975 5 жыл бұрын
Hi Sir, it was really helpful, i have one question, can we also see what are the features this CNN is extracting from the images, i mean is the logo or the color etc...
@bkrai
@bkrai 4 жыл бұрын
Probably I'll explain it through a new video.
@supratikghosh2975
@supratikghosh2975 4 жыл бұрын
@@bkrai ok sir, i will wait for that...
@ibuint5181
@ibuint5181 5 жыл бұрын
Nice tutorial. I've been following your video currently. Just a simple question, is it possible to build a single classification model? In other words, i wanted that model to be able to classify only 1 object. Thanks :)
@bkrai
@bkrai 5 жыл бұрын
Probably you can use 1 for the objects you are interested in classifying and 0 for the others that you are not interested in.
@amithvalentine1479
@amithvalentine1479 3 жыл бұрын
What if I have only two categories? Can I still use Loss = 'categorical_croentropy' ? Thank you for the video! it has been a huge help for my project
@smsrenu
@smsrenu 4 жыл бұрын
Sir,When i Tried to run the code in R studio ,it is giving the error for to_categorical() call, tensorflow not found ,please suggest any solution for this .
@bkrai
@bkrai 4 жыл бұрын
Make sure you run library(keras) and library(tensorflow)
@yt.abhibhav
@yt.abhibhav 4 жыл бұрын
@@bkrai adding on this one, run the code install_tensorflow(). This will sort your problem.
@Jubo256
@Jubo256 6 жыл бұрын
Awesome... You make me a data scientist... thank you
@bkrai
@bkrai 6 жыл бұрын
Thanks for comments!
@89Chriscarp
@89Chriscarp 3 жыл бұрын
Thank you for the video!
@bkrai
@bkrai 3 жыл бұрын
You are welcome!
@avichi1avichi
@avichi1avichi 6 жыл бұрын
Prof.Rai Thank you for the excellent CNN modelling video, helps me to understand the importance of layers. I would appreciate if you could please explain you thought process on deciding on how many layers to have between the input and output, also, which one needs to be convoluted, or max_pooling or ,dense , how did you decide these layers was it based on the number of "Independent Variables"? Also, I am trying to install the "Keras" and "Tensorflow" packages , was these installed using the Ananconda "Conda" or was it installed within the R-Studio/R development environment. Finally, did you run the CPU or GPU version of the Keras/Tensorflow package. I would appreciate if you could create a video to help setup these packages in R-Studio, as the CUDA .dll is not working in the NVIDIA CUDA Version 9.1
@bkrai
@bkrai 6 жыл бұрын
For installing keras you can use this link: kzbin.info/www/bejne/npWbYnh-ZsxkmKc Regarding decision about number of layers, there is no specific rule. What is covered is a good starting point based on what Google has provided, and one can definitely explore variations if needed.
@avichi1avichi
@avichi1avichi 6 жыл бұрын
Thankyou Dr.Rai, appreciate your help, this is Avi from California, I am trying to use this modelling technique on realtime Stockmarket data , with one outcome variable and about 20 independent parameters.
@avichi1avichi
@avichi1avichi 6 жыл бұрын
After installing Keras and Tensorflow: I tried to "normalize" the data after converting to a matrix, and it gives me a "python' error from the "Anaconda" installation directory saying there is a error in line 40, seems the np-utils.py code has some error in the "Anaconda package", is there a way to correct this problem? Error below: "Error in py_call_impl(callable, dots$args, dots$keywords) : AttributeError: 'str' object has no attribute 'conjugate' Detailed traceback: File "F:\Users\User\ANACON~1\envs\R-TENS~1\lib\site-packages\keras\utils p_utils.py", line 40, in normalize l2 = np.atleast_1d(np.linalg.norm(x, order, axis)) File "F:\Users\User\ANACON~1\envs\R-TENS~1\lib\site-packages umpy\linalg\linalg.py", line 2286, in norm s = (x.conj() * x).real"
@avichi1avichi
@avichi1avichi 6 жыл бұрын
Resolved the issue with upgrading the Anaconda" modules
@bkrai
@bkrai 6 жыл бұрын
thanks for the update!
@ibrahimalabi6162
@ibrahimalabi6162 4 жыл бұрын
This video is super helpful as always! Thank you very much indeed!
@bkrai
@bkrai 4 жыл бұрын
You're very welcome!
@priyasurenthran
@priyasurenthran 4 жыл бұрын
Hi this was helpful but I dont understand why it was showing 0 accuracy for the model
@bkrai
@bkrai 4 жыл бұрын
Training accuracy should be much higher than 0.
@priyasurenthran
@priyasurenthran 4 жыл бұрын
@@bkrai i tried running the program with the data you provided idk why it was only showing 0 accuracy
@bkrai
@bkrai 4 жыл бұрын
Send me code to look at.
@priyasurenthran
@priyasurenthran 4 жыл бұрын
@@bkrai drive.google.com/file/d/1guJGMSaiEYRXuCONwNcUv-UH1Sted6eD/view?usp=sharing This is the link to the code Thank you
@rahulpandey-lc7kn
@rahulpandey-lc7kn 5 жыл бұрын
which versiob r studio you use?
@bkrai
@bkrai 5 жыл бұрын
I currently have Version 1.1.463
@odysseasg.5868
@odysseasg.5868 3 жыл бұрын
Hello Dr., could you do a Regression tutorial based on Images in R? Lets say we have a database with images and some ratings (labels) for each image. How can we predict the ratings of the images with a cnn model with only the images as input? Thank you in advance.
@odysseasg.5868
@odysseasg.5868 3 жыл бұрын
also i get this error when i try to resize the my 2444*1788 images : Error in resize(train_cnn[[i]], 150, 150) : Expecting a four-dimensional array str of train_cnn is the same as yours excect all images are of [1:2444, 1:1718, 1:3]
@sonalichakrabarty1618
@sonalichakrabarty1618 2 жыл бұрын
Hello sir, I am trying this program many times exactly with your code and data...but i am constantly getting error during model fitting "Error in py_call_impl(callable, dots$args, dots$keywords) : ValueError: in user code:" Can you please help me what type of error it is
@jackleyable
@jackleyable 4 жыл бұрын
thanks sir, you open my world to R, can you please do a video by using labelme files with label images to do classification in R, I can not find any tutorial using R to do so, only find many people use Python.
@bkrai
@bkrai 4 жыл бұрын
Thanks, I've added it to my list of future videos.
@beclear8661
@beclear8661 Жыл бұрын
I am getting the error below when trying to define the pred variable. can't quite get it to work using the message `predict_classes()` is deprecated and and was removed from tensorflow in version 2.6. Please update your code: * If your model does multi-class classification: (e.g. if it uses a `softmax` last-layer activation). model %>% predict(x) %>% k_argmax() * if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation). model %>% predict(x) %>% `>`(0.5) %>% k_cast("int32")
@beclear8661
@beclear8661 Жыл бұрын
actually; never mind.
@bkrai
@bkrai Жыл бұрын
Thanks for the update!
@MuhammadUsman-pv4ds
@MuhammadUsman-pv4ds 5 жыл бұрын
Nice job sir! Could you show an example for multitemporal land use data for crop classification?
@bkrai
@bkrai 5 жыл бұрын
Thanks for the suggestion, I've added this to my list.
@MuhammadUsman-pv4ds
@MuhammadUsman-pv4ds 5 жыл бұрын
I follow your videos and these are well explained. I will be waiting for convolution NN for remote sensing data.
@joannefsadni589
@joannefsadni589 5 жыл бұрын
So i have 1000 images ... how can i for example save names in pic1 like you did in a loop or something ... since to name them all one after the other would be tedious and not efficient
@bkrai
@bkrai 5 жыл бұрын
You can use this link: kzbin.info/www/bejne/a5PWoJJrjZyNq5Y
@joannefsadni589
@joannefsadni589 5 жыл бұрын
@@bkrai yes but in this link you used a data set which is ready only ... my images are all in a folder and i have to import them the same way you did here... i have 1120 for training and 350 for testing ... sorry but i really need help in this... it is for my school thesis
@bkrai
@bkrai 5 жыл бұрын
After developing the model in this link, I read some images from my computer to see how the model performs. That part should solve your problem.
@joannefsadni589
@joannefsadni589 5 жыл бұрын
@@bkrai thank you so much i found it :)
@joannefsadni589
@joannefsadni589 5 жыл бұрын
@@bkrai Sorry to bother you again... did you encounter this error when you were working on this the first time Error in initialize_python(required_module, use_environment) : Installation of Python not found, Python bindings not loaded. I dont have phython installed and i dont know how to use it... the above error showed up when i tried to use one of keras' functions: to_categorical
@evertonfonseca8916
@evertonfonseca8916 5 жыл бұрын
can you make now about RNN using LSTM for some examples?
@bkrai
@bkrai 5 жыл бұрын
Thanks for the suggestion! It's on my list for future videos.
@alfredcarry2452
@alfredcarry2452 6 жыл бұрын
Sir, I tried to install Keras with "install_keras(method='conda') got this error message: Warning message: In normalizePath(path.expand(path), winslash, mustWork) : path[1]="C:\Users\User\AppData\Local\conda\conda\envs\xgboost/python.exe". I'm using Windows 8 and Python Anaconda is already installed. How can i fix this issue? If the problem is 'slash' then how can i change it? If you can suggest something, I would appreciate. Thanks!
@bkrai
@bkrai 6 жыл бұрын
That's not error message, it's just a warning message.
@pulkitkalia6248
@pulkitkalia6248 6 жыл бұрын
Hello! Thank you so much for the tutorial. I get an error when I try to combine large set of images(error : nested too deeply) but works fine with smaller set of images, say 200. Is it a memory issue?
@bkrai
@bkrai 6 жыл бұрын
Yes, larger set of images will need more powerful computer.
@pulkitkalia6248
@pulkitkalia6248 6 жыл бұрын
Thank you for the prompt response. Could you also make a video on NLP and video/voice recognition if achievable in R?
@bkrai
@bkrai 6 жыл бұрын
Thanks for the suggestion, I've added this to my list.
@zhanyouxu5712
@zhanyouxu5712 3 жыл бұрын
Have you got your problem solved? I have 700 images, resized to 48 by 48, still get an error message "Error: C stack usage 15923968 is too close to the limit Error: no more error handlers available (recursive errors?); invoking 'abort' restart". I googled around, failed to find any solution.
@odysseasg.5868
@odysseasg.5868 3 жыл бұрын
Combine function doesn't work and vctrs::vec_c doesn't do anything...?
@netmarketer77
@netmarketer77 4 жыл бұрын
Suppose we have 100 different categories with 100 image in each category, so should we name them 100 times for each category for "trainx" ???
@bkrai
@bkrai 4 жыл бұрын
You can check this video for how to use a for loop to read all images in a directory.
@saikrishnachalavadi
@saikrishnachalavadi 5 жыл бұрын
thanks bro. can you help with mask RCNN in R. i really need it
@bkrai
@bkrai 5 жыл бұрын
Thanks, I've added it to my list.
@vineetporwal4813
@vineetporwal4813 4 жыл бұрын
Hi Sir, thanks for such a nice tutorial. I was implementing it for differentiating between a cat and dog, but unable to get the right prediction. I tried varying the filters, also tried varying the dimensions increasing from 100 * 100 to 200* 200 in one more iteration i tried with sigmoid activation function too, can you give me some insight what else i should look for.
@bkrai
@bkrai 4 жыл бұрын
The problem may be that when you do validation_split = 0.2, it chose 1st 80% for training and last 20% for validation. So some pictures may not find place in training data.
@vineetporwal4813
@vineetporwal4813 4 жыл бұрын
@@bkrai thanks sir let me switch the pictures and give a try and will update you once i get sone good results. Thanks for the reply sir ..
@bkrai
@bkrai 4 жыл бұрын
sounds good!
@vineetporwal4813
@vineetporwal4813 4 жыл бұрын
​@@bkrai I tried a couple of iteration by increasing the count of images and reducing on the dimension side. The model is predicting the cat well when I am running it on the test sample. This is I think because when in order first 200 are cats and then the next 200 are the dog. This may be because of validation_split. Second question is when I am trying to read a large number of images and combine, it gives a memory error. Is there any way to get rid of it.
@pedrosnvn
@pedrosnvn 6 жыл бұрын
Hi professor, Well, it's nice to talk to you. Do you know what can be happening? test=EBImage::combine(test) train=EBImage::combine(train) Error in abind::abind(x, y, along = along) : arg 'X2' has dims=100, 100, 3, 120; but need dims=100, 100, 4, X
@bkrai
@bkrai 6 жыл бұрын
Make sure dimensions look correct after resize and also after combine.
@somnathmondal830
@somnathmondal830 4 жыл бұрын
Sir firstly thank you for your help. But I am getting the following error when I am running the area: history % fit(train, trainLabels, epochs = 60, batch_size = 32, validation_split = 0.2) Output: Error in py_call_impl(callable, dots$args, dots$keywords) : AttributeError: 'NoneType' object has no attribute 'write' Detailed traceback: File "C:\Users\User1\AppData\Local -miniconda\envs -reticulate\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 728, in fit use_multiprocessing=use_multiprocessing) File "C:\Users\User1\AppData\Local -miniconda\envs -reticulate\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py", line 372, in fit prefix='val_') File "C:\Users\User1\AppData\Local -miniconda\envs -reticulate\lib\contextlib.py", line 99, in __exit__ self.gen.throw(type, value, traceback) File "C:\Users\User1\AppData\Local -miniconda\envs -reticulate\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py", line 686, in on_epoch self.progbar.on_epoch_end(epoch, epoch_logs) File "C:\Users\User1\AppData\Local -miniconda\envs -reticulate\lib\site-packages\tensorflow_core\python\keras\callbacks.py", line 768, in on_epoch_end self.progbar.update Waiting for your kind help.
@bkrai
@bkrai 4 жыл бұрын
See if this helps: kzbin.info/www/bejne/Y3q8iqSarcmMjs0
@somnathmondal830
@somnathmondal830 4 жыл бұрын
@@bkrai It worked perfectly. Thank you Sir.
@vishnunkumar9436
@vishnunkumar9436 6 жыл бұрын
I can't install EBImage package for version 3.4.3. Is there an alternative to this package?
@bkrai
@bkrai 6 жыл бұрын
You can use this: source("bioconductor.org/biocLite.R") biocLite("EBImage")
@dandybirdut
@dandybirdut 4 жыл бұрын
@@bkrai : I see that, now biocLite has become old according to the installation instructions found for BiocManager at "bioconductor.org/install/".
@flamboyantperson5936
@flamboyantperson5936 6 жыл бұрын
Sir I have a request could you please make a machine learning model and use Cross validation k-fold? Please sir. Thank you.
@bkrai
@bkrai 6 жыл бұрын
Thanks for the suggestion, I'm adding it to the list.
@flamboyantperson5936
@flamboyantperson5936 6 жыл бұрын
Thank you, Sir.
@MAbdullah47
@MAbdullah47 6 жыл бұрын
Thank you sir , but I think that I need to understand the structure of CNN again I get confused
@shilpaprashar1801
@shilpaprashar1801 6 жыл бұрын
Hello Sir I am getting an error while doing #OneHotEncoding They are giving me the error that Installation of python not found, Python bindings not loaded. Kindly reply
@bkrai
@bkrai 6 жыл бұрын
What code did you run?
@shilpaprashar1801
@shilpaprashar1801 6 жыл бұрын
@@bkrai Sir I executed the same code which is given here. On the One hot Encoding step i was getting this error.
@MarcusRichard100
@MarcusRichard100 6 жыл бұрын
Yes even i am getting the same errpr while running tocategorical command. Any solutions ?
@MarcusRichard100
@MarcusRichard100 6 жыл бұрын
Hi i got the solution for this, I installed anaconda (python3.7)in my pc and then ran the following code in r Install.packages ("tensorflow") Library(tensorflow) install_tensorflow () install.packages ("keras") Library(keras) This worked for me!! Please try it and let me know if it did for you
@irfanshaik2301
@irfanshaik2301 6 жыл бұрын
Hello sir, please help me mypic[[1]]
@bkrai
@bkrai 6 жыл бұрын
In the video line 13 shows that dimension is 3, but you seem to have 4-dimensional array.
@indukuriharshitha1962
@indukuriharshitha1962 5 жыл бұрын
thank you sir,it helped me so much in my project
@bkrai
@bkrai 5 жыл бұрын
Thanks for comments!
@muktimalik5211
@muktimalik5211 5 жыл бұрын
I try Error when running from model %>% .......,,
@bkrai
@bkrai 5 жыл бұрын
I didn't understand your question.
@All-In-OneA1O
@All-In-OneA1O 5 жыл бұрын
thank you soo much sir..please helo me to solve these error while doing one hot encoding module$keras.util$to-categorical(y=int(32),num classes=num classes):attemt ti apply non function while doing one hot encoding..p
@bkrai
@bkrai 5 жыл бұрын
Not sure what's going on based on info provided.
@maddy14390
@maddy14390 6 жыл бұрын
Hi Sir, Can you please help how I can split the train and trainy using some function and not using separate files for the training and testing manually. I am doing the same thing but I have all images in a folder so my list contains 2300 images data of 5 different categories and need to split this image list into a train and test set. Thank you.
@bkrai
@bkrai 6 жыл бұрын
what kind of function you are trying to use to separate files?
@maddy14390
@maddy14390 6 жыл бұрын
Bharatendra Rai I meant any function or any means to split the data frame evenly for a multiclass dataset (my dataset has 5 classes) into train and test. So eventually what I want is to split the train dataset which contains 15 images of 3 categories into 12 and 3 images in train and test with evenly distributed image classes in both that and train. I just want to avoid the step of taking 15 images for train and 3 for test.
@maddy14390
@maddy14390 6 жыл бұрын
Hi Sir, I am having this warning while using the combine function on my dataset. The warning is: >1: In combine_all(args[[1]]) : Vectorizing 'Image' elements may not preserve their attributes due to this my combined dataset is a numeric vector with only one dimension. After the combine, structure of my data looks like this. > num [1:10412874] 0.965 0.953 0.958 0.912 0.909 ... I am following all the steps suggested by you in the video. Can you please help as I am running too short of time and cannot find a solution to this problem online.
@bkrai
@bkrai 6 жыл бұрын
Warning in R is ok. Error is a problem, but warning is ok.
@Didanihaaaa
@Didanihaaaa 6 жыл бұрын
Thanks!
@prisillajayanthi7969
@prisillajayanthi7969 6 жыл бұрын
sir, how do we read image in Rstudio 3.5 as i am getting "Error in readImage(f1) : could not find function "readImage" " when i am using readImage... i installed EBImage, imager ,jpeg packages.. i am unable read or load image..please can you let me know the function used for reading images in 3.5 version..all my image files are .jpeg
@bkrai
@bkrai 6 жыл бұрын
You can refer to this link: kzbin.info/www/bejne/mnzKdnd3irqnpdE
@prisillajayanthi7969
@prisillajayanthi7969 6 жыл бұрын
Sir, i am getting the errror for Image1
@bkrai
@bkrai 6 жыл бұрын
Did you install EBImage?
@prisillajayanthi7969
@prisillajayanthi7969 6 жыл бұрын
yes i did
@prisillajayanthi7969
@prisillajayanthi7969 6 жыл бұрын
i sent a screen shot to your mail
@EcoresolveInc
@EcoresolveInc 3 жыл бұрын
Thanks a lot for the video!!!!
@bkrai
@bkrai 3 жыл бұрын
Thanks...hope you can join live LSTM session
🕊️Valera🕊️
00:34
DO$HIK
Рет қаралды 11 МЛН
Deep Neural Networks  with TensorFlow & Keras in R | Numeric Response Variable
17:28
Neural Networks Part 8: Image Classification with Convolutional Neural Networks (CNNs)
15:24
Convolutional neural network (CNN) in R | A Rstudio Tutorial on Keras and Tensorflow
22:30
Graph Neural Networks - a perspective from the ground up
14:28
Why Does Diffusion Work Better than Auto-Regression?
20:18
Algorithmic Simplicity
Рет қаралды 353 М.