mrlooi / rotated_maskrcnn

Rotated Mask R-CNN: From Bounding Boxes to Rotated Bounding Boxes
MIT License
349 stars 62 forks source link

Beginner implementing RotatedMaskRCNN #36

Open mariamsanchezs opened 3 years ago

mariamsanchezs commented 3 years ago

❓ Questions and Help

Hello, I am a complete beginner in MaskRCNN. I have just started learning about it and I followed a tutorial based on using MRCNN for training a kangaroo recognition model (https://machinelearningmastery.com/how-to-train-an-object-detection-model-with-keras/), so that is the code I have so far. I would like to implement Rotated MaskRCNN, but I just dont know how to start with it. My question is what would be the first steps for using this repository? Is there a way to implement it using the code written for MaskRCNN but changing it somehow? Thanks in advance for every help or piece of advice you could give me.

mrlooi commented 3 years ago

Hi, I would look at the config https://github.com/mrlooi/rotated_maskrcnn#configs

A good way would be to compare the rotated MRCNN config and the non rotated config to see the difference

happy tunning! :)

mariamsanchezs commented 3 years ago

Thank you very much mrlooi. I have been looking at it, but I still don't get it. After following the Install and Prepare data steps, what should I expect to receive after running this code fragment?

python tools/train_net.py --config-file "configs/rotated/e2e_ms_rcnn_R_50_FPN_1x.yaml" SOLVER.IMS_PER_BATCH 2 SOLVER.BASE_LR 0.0025 SOLVER.MAX_ITER 720000 SOLVER.STEPS "(480000, 640000)" TEST.IMS_PER_BATCH 1

I am getting a lot of error codes, and as I am trying to run this in Google Colab, I don't know if the problem is due to this environment or because I am missing an important step.

mrlooi commented 3 years ago

Hmm can you post the error codes? Also note that this repo was updated more than a year ago, the pytorch package would have changed a lot

mariamsanchezs commented 3 years ago

The changes in the versions of the packages must be the problem Im facing, as when running conda install -c pytorch pytorch-nightly torchvision cudatoolkit=9.0 , this error code comes up:

image

How could I know which versions should I use to make it work? The repo mentions using CUDA 9.0. However, for PyTorch, it says "PyTorch 1.0 from a nightly release. It will not work with 1.0 nor 1.0.1", but I don't know which of the current stable versions should I install. I guess I should find the current stable version correspondent to that nightly release, right? I am also confused about the torchvision version as it is not mentioned in the repo. Furthermore, I guess it is on Python 2 (as the error code mentions torchvision is only working for Python 2.7), but I would like to make sure.

I have tried several combinations of versions but I can't make it work. Any idea of which versions should I install?

Thanks in advance! :)

mrlooi commented 3 years ago

Hi, yes the code was written in python 2.7, but should also work on python 3 as well if I remember correctly. I believe the working pytorch version at the time was 1.1 The error from your log seems to be related your version of torchvision being different. Would look into that first. Apologies if I can't be more specific, it's been a while since I used this repo and well, you know how fast the pytorch community moves