matterport / Mask_RCNN

Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow
Other
24.57k stars 11.69k forks source link

COLAB VERSION PROBLEM SOLUTION #3041

Open userwatch opened 3 months ago

userwatch commented 3 months ago

Hi everyone, I used this repo in Colab. https://github.com/z-mahmud22/Mask-RCNN_TF2.14.0 If it doesn't work, let me know and I will share my own colab file.

Best wishes,

zikav1 commented 3 months ago

Have you been training on your own dataset? Me and my friend have been using that repo and have gotten some decent results, however the detection is giving some bad results and the mAP always returns 0.0...

userwatch commented 3 months ago

yes i tried own dataset, It didn't give any errors but the results are not very good. Also, training is slow, how can I fast it up?

zikav1 commented 3 months ago

No the results are not best for us either, only decent depending on the configs we use. Don't know much about your specs but I guess you are running the training with a GPU?

userwatch commented 3 months ago

In Google Colab, I select the runtime as GPU. But I don't know if you use it or not.

https://github.com/userwatch/test/blob/main/OneClassCar.ipynb I added the model codes here

zikav1 commented 3 months ago

You can check that by creating a cell and run the line "tf.test.is_gpu_available()" I think. Because you want to run tensorflow with the GPU

userwatch commented 3 months ago

image showed this result.

image This is requirements.txt

userwatch commented 3 months ago

image

userwatch commented 3 months ago

!pip install tf-nightly
image I can see your name now

userwatch commented 3 months ago

image I encountered a problem with the version again:(

userwatch commented 3 months ago

Which version should it be? tf-nightly Do you have any ideas? @zikav1

https://stackoverflow.com/questions/76453565/error-installing-tensorflow-gpu-in-google-colab-subprocess-exited-with-error I think there is no need to install it, just connecting to the GPU at runtime is enough.

gpu looks before installing requirements. GPU:[] does not appear after this line of code (!pip install -r /content/maskrcnn/requirements.txt)

zikav1 commented 3 months ago

I'm not quite sure, we're not working inside of google colab. We're using a WSL ubuntu env and have installed CUDA and cuDNN to be able to run tensorflow with the GPU.

userwatch commented 3 months ago

This problem has been resolved. Thank you very much.

userwatch commented 3 months ago

How are your results?

zikav1 commented 3 months ago

They are not that good. Don't know what is wrong. Something seems off with the validation and detection but can't figure out what that could be. And you?

userwatch commented 3 months ago

How many epochs and steps_per_epoch did you use? In the example I follow step_per_epoch =1000 epoch=5 It detects in the testing part. https://github.com/TannerGilbert/MaskRCNN-Object-Detection-and-Segmentation/blob/master/MaskRCNN%20Microcontroller%20Segmentation.ipynb
That's my test. yanii

I can share my data file with you. or you can also try the microcontroller dataset here.

Note: Try testing with the best model in .h5 files.

zikav1 commented 3 months ago

We have been trying with different optimizations. But think we ran something like 50 steps/epoch and 5000 epochs or so. Still getting some weird results when trying to predict. Yes that would be really nice if you could share that with me.

And yes i'm a bit confused about what is being the model and the .h5 files. Is a single .h5 file defined as the "model"?

zikav1 commented 3 months ago

Do you have discord or anything, would be easier to talk through there

userwatch commented 3 months ago

https://github.com/userwatch/data I added the data here. Yes, I use discord, my username is usertttwm

zikav1 commented 3 months ago

Thanks, is it okay if I add you?

userwatch commented 3 months ago

Yes, you can add, We help each other.

zikav1 commented 3 months ago

Yes perfect! I added you