Luodian / Mapillary2COCO

Transfer Mapillary Vistas Dataset to Coco format
28 stars 10 forks source link

Greetings form London #1

Open AlbertoMCS opened 5 years ago

AlbertoMCS commented 5 years ago

Hi, I want to train a Mask RCNN network pre-trained with COCO dataset (https://github.com/matterport/Mask_RCNN) with Mapillary dataset, I saw you were doing this for the challenge some months ago. Just for curiosity, did you finally succeed in such conversion with the code in your repository?.

Thanks

Luodian commented 5 years ago

Ye, we use the converted datasets and fair/Detectron(as codebase) to train our models. Actually I think you use a model pre-trained on COCO and then finetune it to Mapillary, that will be helpful in accuracy according to our experiments. I am not sure this conversion is a bug-free version. I guess it was, but if u meet anything you can ask me directly. It's wonderful to meet a new friend in London who's researching CV. More, I also converted Apollo, CityScapes, Kitti to COCO format. So if you have more questions~I will be happy to help with.

AlbertoMCS commented 5 years ago

Hi Bo Li,

Thank you for the answer, really appreciated.

I am trying to use your repository but I am not able to succeed with it, basically because I am novel on this...

Could you please enumerate/explain the steps I should follow to implement your repo?

Thanks a lot, Alberto.


De: Bo Li notifications@github.com Enviado: viernes, 22 de marzo de 2019 2:39 Para: Luodian/Mapillary2COCO Cc: AlbertoMCS; Author Asunto: Re: [Luodian/Mapillary2COCO] Greetings form London (#1)

Ye, we use the converted datasets and fair/Detectron(as codebase) to train our models. Actually I think you use a model pre-trained on COCO and then finetune it to Mapillary, that will be helpful in accuracy according to our experiments. I am not sure this conversion is a bug-free version. I guess it was, but if u meet anything you can ask me directly. It's wonderful to meet a new friend in London who's researching CV. More, I also converted Apollo, CityScapes, Kitti to COCO format.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FLuodian%2FMapillary2COCO%2Fissues%2F1%23issuecomment-475464197&data=02%7C01%7C%7C94025b20e81e43a093a008d6ae6742d1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636888155849701472&sdata=6IL%2F5m5nmf7CBA8QRmsIi1UrMN91Oi117ErR5%2BLHbao%3D&reserved=0, or mute the threadhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAP_0GdUYPeXP1EHzdXkTDsfBdCHDE5rMks5vZDRfgaJpZM4cCizg&data=02%7C01%7C%7C94025b20e81e43a093a008d6ae6742d1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636888155849711477&sdata=IWuimaew28wPw5mdjQXe7iZXCOuQ8mWloiG0UraSPkQ%3D&reserved=0.

Luodian commented 5 years ago

@AlbertoMCS Since I already deleted the original MVD dataset and I'm kinda busy recently. I may provide a quick guide for you to implement.

  1. SplitTools You should first run SplitTools.py, this script is to read images from Mapillary dataset and split each image into multiple instance images in black/white representation. Remember to place MVD dataset in the same root path.
  2. Images2Json This folder is to transform former generated instance images into JSON annotation in COCO format. Remember to align this path IMAGE_DIR = os.path.join(ROOT_DIR, "shapes_train2018") correctly.

So it's 2 steps in general. First, convert original MVD into multiple instance images.

MVD instance image use one instance.png contains all objects, and we should split them into different images that one only contains one object.

Second, convert generated instance images into JSON annotations since it's used in COCO format.

AlbertoMCS commented 5 years ago

Hi Bo Li,

Thank you very much for the info, I run your code successfully. How much time did it take you to convert the entire Mapillary Dataset? I converted 10 pictures and it took like 5 minutes so I guess 20.000 would take me 7 days! Did you use a external Virtual Machine?, which one do you think is better for splitting tasks and trainning the model?

Thanks, Alberto.


De: Bo Li notifications@github.com Enviado: lunes, 25 de marzo de 2019 5:20 Para: Luodian/Mapillary2COCO Cc: AlbertoMCS; Mention Asunto: Re: [Luodian/Mapillary2COCO] Greetings form London (#1)

@AlbertoMCShttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAlbertoMCS&data=02%7C01%7C%7Cc4d3185ca9c24d554ac408d6b0d94120%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636890844472080862&sdata=yOBkLUCR2umWBA2YBwENbuWpBmDKnYm0Sm9VDFK1KS8%3D&reserved=0 Since I already deleted the original MVD dataset and I'm kinda busy recently. I may provide a quick guide for you to implement.

  1. SplitTools You should first run SplitTools.py, this script is to read images from Mapillary dataset and split each image into multiple instance images in black/white representation. Remember to place MVD dataset in the same root path.
  2. Images2Json This folder is to transform former generated instance images into JSON annotation in COCO format. Remember to align this path IMAGE_DIR = os.path.join(ROOT_DIR, "shapes_train2018") correctly.

So it's 2 steps in general. First, convert original MVD into multiple instance images.

MVD instance image use one instance.png contains all objects, and we should split them into different images that one only contains one object. Second, convert generated instance images into JSON annotations since it's used in COCO format.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FLuodian%2FMapillary2COCO%2Fissues%2F1%23issuecomment-476050003&data=02%7C01%7C%7Cc4d3185ca9c24d554ac408d6b0d94120%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636890844472090873&sdata=6E%2FFX6DHjhbegwEDsqrY7r01ssa647POuAtaghvAAKY%3D&reserved=0, or mute the threadhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAP_0GfKTgCEp0tXbs9A3PMMpo4PabjHaks5vaE6cgaJpZM4cCizg&data=02%7C01%7C%7Cc4d3185ca9c24d554ac408d6b0d94120%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636890844472100878&sdata=OrnjaVc7eMuIULar95lKHjJUvyZFa3JMISvYOZaCip0%3D&reserved=0.

Luodian commented 5 years ago

@AlbertoMCS It's truly time-consuming, I recommend you to use multitasks to parallelly run the first split step. As for VM? did it mean cloud server? I've tried both google cloud platform and AWS. If you are still a student, you can get some free credits to use them for a while. GCP is better in user experience.