Giter Site home page Giter Site logo

luodian / madan Goto Github PK

View Code? Open in Web Editor NEW
164.0 164.0 27.0 117 KB

Pytorch Code release for our NeurIPS paper "Multi-source Domain Adaptation for Semantic Segmentation"

Home Page: https://arxiv.org/abs/1910.12181

License: MIT License

Python 94.74% Shell 5.26%

madan's People

Contributors

luodian avatar pikachusocute avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

madan's Issues

the proper weight of the semantic loss

Hi,

the training script scripts/CycleGAN/cyclegan_gta_synthia2cityscapes.sh contains: 
--DSC --DSC_weight 20, 
but the python main() doesn't accept "DSC" parameters and it fails. 

But, a semantic weight of 0.2 as default, appears in base_options.py: 
self.parser.add_argument('--general_semantic_weight', type=float, default=0.2, help='weight for semantic loss')

Which one is the correct one?

TIA

Error when loading state_dict

Hello @Luodian ,

Hope you enjoyed the winter holidays! Thank you so much for this code release, it was like second Christmas for me!

Anyway, I tried running the model and I got reasonably far; however, I get the following issue when I try to replicate the model.

-------------- End ----------------
CustomDatasetDataLoader
dataset [GTA5_Cityscapes] was created
initialize network with normal
initialize network with normal
initialize network with normal
Traceback (most recent call last):
  File "train.py", line 20, in <module>
    model = create_model(opt)
  File "/efs/spot/MADAN/cyclegan/models/__init__.py", line 20, in create_model
    model.initialize(opt)
  File "/efs/spot/MADAN/cyclegan/models/multi_cycle_gan_semantic_model.py", line 92, in initialize
    self.netPixelCLS_SYN = get_model(opt.weights_model_type, num_cls=opt.num_cls, pretrained=True, weights_init=opt.weights_init)
  File "/efs/spot/MADAN/cycada/models/models.py", line 12, in get_model
    net = models[name](num_cls=num_cls, **args)
  File "/efs/spot/MADAN/cycada/models/drn.py", line 256, in drn26
    out_map=out_map, finetune=finetune, **kwargs)
  File "/efs/spot/MADAN/cycada/models/drn.py", line 174, in __init__
    self.load_state_dict(state_dict)
  File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 845, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for DRN:
	size mismatch for fc.weight: copying a param with shape torch.Size([1000, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([19, 512, 1, 1]).
	size mismatch for fc.bias: copying a param with shape torch.Size([1000]) from checkpoint, the shape in current model is torch.Size([19]).

I think there's a semantic channel space (19, COCO-style) and then there's the 1000 dim vector, which I am not 100% sure where that comes from.

Let me know if you have any ideas, thanks!

How to train with synthia?

Hi,
@Luodian I have download the code and found that cyclegan_gta_synthia2cityscapes.sh and cyclegan_synthia2cityscapes are the same. Then i want to use the script of GTA5, however the initial model weights are from drn26_cycada_cyclegta2cityscapes.pth. So if i train synthia, how to init the model? The same with GTA5 use drn26_cycada_cyclegta2cityscapes.pth? What if I train from my another own dataset, how to init the model?
Another problem is that how could i train the model end-to-end which as you claimed in paper?
Expect your reply.
Thanks.

About DeepLabV2 model in the table 8,9

Thanks for sharing your great research and code.
I am a student studying deep learning.

MADAN: Multi-source Adversarial Domain Aggregation Network for
Domain Adaptation, 2021, IJCV (https://link.springer.com/content/pdf/10.1007/s11263-021-01479-3.pdf)
In the above paper, there was a part where you experimented with DeepLabV2. If possible, can you provide the code or detailed description of the DeepLabV2 you used? ([email protected])
Did you simply use resnet101 backbone + aspp module + upsampling?
I'm not sure about the difference between DeepLabV3 and DeepLabV2. Please give me some advice.
Thanks for reading.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.