GithubHelp home page GithubHelp logo

basiclab / da-od-meaa-pytorch Goto Github PK

View Code? Open in Web Editor NEW
18.0 3.0 1.0 1.13 MB

Domain-Adaptive Object Detection via Uncertainty-Aware Distribution Alignment, ACM MM 2020

Home Page: https://dl.acm.org/doi/10.1145/3394171.3413553

License: MIT License

Python 84.35% MATLAB 0.25% Shell 0.33% Cuda 6.30% C 8.76%
computer-vision object-detection domain-ad domain-adaption

da-od-meaa-pytorch's People

Contributors

erictseng610 avatar theblackcat102 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

zeta1999

da-od-meaa-pytorch's Issues

About using multi GPUs

Dear Hsinchu,
Thanks a lot for your opening code about your work. And when I run trainval_net_MEAA.py with adding "--mGPUs", there is an error "TypeError: forward() missing 4 required positional arguments: 'im_data', 'im_info', 'gt_boxes', and 'num_boxes'
". However, the error doesn't occur without "--mGPUs". Can you help me to solve it?

Best wishes!

resume training from saved weights

Hello,
Currently, I am trying the code on colab. However, when it disconnects, I change resnet path field in the config file to start from learnt weights. But accuracy drops too much and loss also starts from very high point. So, how can we resume training from a checkpoint ?

The lack of the file of py

I ready to predict the picture with the model,but i find model.faster_rcnn.vgg16_global and model.faster_rcnn.resnet_global are lack.

from model.faster_rcnn.vgg16_global import vgg16

from model.faster_rcnn.resnet_global import resnet

they are used in demo_global.py.SO i hope author can upload them.Thanks

demo_global.py is not working

 # initilize the network here.
  from model.faster_rcnn.vgg16_SCL import vgg16

  if args.net == 'vgg16':
    fasterRCNN = vgg16(foggy_classes, pretrained=True)

    # fasterRCNN = vgg16(pascal_classes, pretrained=False, class_agnostic=args.class_agnostic,lc=args.lc,gc=args.gc)
  elif args.net == 'res101':
    fasterRCNN = resnet(pascal_classes, 101, pretrained=False, class_agnostic=args.class_agnostic,context=args.context)
  elif args.net == 'res50':
    fasterRCNN = resnet(pascal_classes, 50, pretrained=False, class_agnostic=args.class_agnostic)
  elif args.net == 'res152':
    fasterRCNN = resnet(pascal_classes, 152, pretrained=False, class_agnostic=args.class_agnostic)
  else:
    print("network is not defined")
    pdb.set_trace()

  fasterRCNN.create_architecture()

It seems that some files are missing.

Traceback (most recent call last):
  File "demo_global.py", line 192, in <module>
    from model.faster_rcnn.vgg16_SCL import vgg16
ModuleNotFoundError: No module named 'model.faster_rcnn.vgg16_SCL'

Thanks

Get NaN loss during training

Hi,
I use cityscapes to be source domain which has 2964 images after filtering, night scene of bdd100k to be target domain which has 19864 images after filtering. There are 8 categories:
bicycle, bus, car, motorcycle, person, rider, train, truck and use python trainval_net_MEAA.py --cuda --net vgg16 --dataset cityscape --dataset_t bdd100k --use_tfb

I would like to ask how to avoid getting NaN loss, which mostly happens in rcnn loss. I get NaN loss at the 4th epoch and 4300 iterations.
Imgur
By the way, does it matter if the source domain and target domain training samples are unbalanced?

And I modify these because pixel indexes is 0-based.

# Make pixel indexes 0-based
x1 = float(bbox.find('xmin').text) - 1
y1 = float(bbox.find('ymin').text) - 1
x2 = float(bbox.find('xmax').text) - 1
y2 = float(bbox.find('ymax').text) - 1

and
# Make pixel indexes 0-based
x1 = float(bbox.find('xmin').text) - 1
y1 = float(bbox.find('ymin').text) - 1
x2 = float(bbox.find('xmax').text) - 1
y2 = float(bbox.find('ymax').text) - 1

to

 x1 = float(bbox.find('xmin').text)
 y1 = float(bbox.find('ymin').text) 
 x2 = float(bbox.find('xmax').text) 
 y2 = float(bbox.find('ymax').text)

Thanks.

----UPDATE----
I followed this jwyang/faster-rcnn.pytorch#136 (comment) but only checkedxmin==xmax and ymin==ymax and boundary coordinate, more importantly, I made coordinates convert to integers instead of floating-point, because the BDD100K coordinates were originally floating point.
I trained the model for 20 epochs and didn't get NaN Loss error.
But, I get a error after save model at the final epoch but it doesn't matter.

Exception ignored in: <bound method _DataLoaderIter.__del__ of <torch.utils.data.dataloader._DataLoaderIter object at 0x7efdfc15f240>>
Traceback (most recent call last):
  File "/media/wyt/Data3/conda_env/DA-OD-MEAA/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 399, in __del__
  File "/media/wyt/Data3/conda_env/DA-OD-MEAA/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 378, in _shutdown_workers
  File "/media/wyt/Data3/conda_env/DA-OD-MEAA/lib/python3.6/multiprocessing/queues.py", line 337, in get
AttributeError: Can't get attribute 'Tensor' on None
Exception ignored in: <bound method _DataLoaderIter.__del__ of <torch.utils.data.dataloader._DataLoaderIter object at 0x7efe17fc7f60>>
Traceback (most recent call last):
  File "/media/wyt/Data3/conda_env/DA-OD-MEAA/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 399, in __del__
  File "/media/wyt/Data3/conda_env/DA-OD-MEAA/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 378, in _shutdown_workers
  File "/media/wyt/Data3/conda_env/DA-OD-MEAA/lib/python3.6/multiprocessing/queues.py", line 337, in get
AttributeError: Can't get attribute 'Tensor' on None

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.