Giter VIP home page Giter VIP logo

domaingen's Introduction

πŸ‘‹ Hi there, I'm Vidit

  • ⚑⚑ Looking for full-time opportunities.
  • πŸ”¬ Worked on object detection, domain adaptation, and vision-language models
  • πŸŽ“ Final year PhD student

domaingen's People

Contributors

vidit09 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

Watchers

 avatar  avatar  avatar

domaingen's Issues

AttributeError: 'NoneType' object has no attribute 'copy'

python demo.py --config-file configs/diverse_weather.yaml --input test.jpg --output D:/learning/domaingen-main/demoout --opts MODEL.WEIGHTS D:/learning/domaingen-main/model/diverse-weights.pth
An error occurred when I used a sentence like this,demo.py come from detectron2.

Traceback (most recent call last):
File "D:\learning\domaingen-main\demo.py", line 104, in
demo = VisualizationDemo(cfg)
File "D:\learning\domaingen-main\predictor.py", line 35, in init
self.predictor = DefaultPredictor(cfg)
File "d:\learning\detectron2-main\detectron2\engine\defaults.py", line 282, in init
self.model = build_model(self.cfg)
File "d:\learning\detectron2-main\detectron2\modeling\meta_arch\build.py", line 22, in build_model
model = META_ARCH_REGISTRY.get(meta_arch)(cfg)
File "D:\learning\domaingen-main\modeling\meta_arch.py", line 170, in init
super().init(cfg)
File "D:\learning\domaingen-main\modeling\meta_arch.py", line 26, in init
super().init(cfg)
File "d:\learning\detectron2-main\detectron2\config\config.py", line 189, in wrapped
explicit_args = _get_args_from_config(from_config_func, *args, **kwargs)
File "d:\learning\detectron2-main\detectron2\config\config.py", line 245, in _get_args_from_config
ret = from_config_func(*args, **kwargs)
File "d:\learning\detectron2-main\detectron2\modeling\meta_arch\rcnn.py", line 77, in from_config
"roi_heads": build_roi_heads(cfg, backbone.output_shape()),
File "d:\learning\detectron2-main\detectron2\modeling\roi_heads\roi_heads.py", line 43, in build_roi_heads
return ROI_HEADS_REGISTRY.get(name)(cfg, input_shape)
File "D:\learning\domaingen-main\modeling\roi_head.py", line 132, in init
super().init(cfg, input_shape)
File "D:\learning\domaingen-main\modeling\roi_head.py", line 51, in init
clsnames = MetadataCatalog.get(cfg.DATASETS.TRAIN[0]).get("thing_classes").copy()
AttributeError: 'NoneType' object has no attribute 'copy'

Why can't I achieve the experimental effect in the paper?

Thanks for your work!
In the Day Clear scene, I achieved an mAP of only 46.4%, which differs from the reported mAP of 51.3% in the research paper. I used two NVIDIA RTX 3090 GPUs for training and made some modifications to the train.py code to enable multiple GPU training.

 if __name__ == "__main__":
    args = default_argument_parser().parse_args()
    print("Command Line Args:", args)
    launch(
        main,
        args.num_gpus,
        num_machines=args.num_machines,
        machine_rank=args.machine_rank,
        dist_url=args.dist_url,
        args=(args,),
    )

Additionally, in the run_step function, I made the following changes:

        opt_phase = False
        if len(self.off_opt_interval) and self.iter >= self.off_opt_interval[0] and self.iter < self.off_opt_interval[0]+self.off_opt_iters:
        
            if self.iter == self.off_opt_interval[0]:
                self.model.module.offsets.data = torch.zeros(self.model.module.offsets.shape).cuda()
            loss_dict_s = self.model.module.opt_offsets(data_s)
            opt_phase = True
            if self.iter+1 == self.off_opt_interval[0]+self.off_opt_iters:
                self.off_opt_interval.pop(0)

Waiting for your early reply, thank you!

where is the Optimization Step in the code?

Thank you for the great works! However, I couldn't find the Optimization Step in the code. Can you provide more context or point me to the specific section where the Optimization Step is supposed to be implemented?

Save model issue

When I run your code, I face a problem:
β€˜β€™β€˜
Traceback (most recent call last):
File "/home/gyang/data/domaingen/detectron2/detectron2/engine/train_loop.py", line 156, in train
self.after_step()
File "/home/gyang/data/domaingen/detectron2/detectron2/engine/train_loop.py", line 190, in after_step
h.after_step()
File "/home/gyang/data/domaingen/detectron2/detectron2/engine/hooks.py", line 299, in after_step
self._best_checking()
File "/home/gyang/data/domaingen/detectron2/detectron2/engine/hooks.py", line 272, in _best_checking
self._checkpointer.save(f"{self._file_prefix}", **additional_state)
File "/home/gyang/anaconda3/envs/det2/lib/python3.10/site-packages/fvcore/common/checkpoint.py", line 118, in save
data[key] = obj.state_dict()
File "/home/gyang/data/domaingen/train.py", line 429, in state_dict
ret = super().state_dict()
File "/home/gyang/data/domaingen/detectron2/detectron2/engine/defaults.py", line 498, in state_dict
ret["_trainer"] = self._trainer.state_dict()
File "/home/gyang/data/domaingen/detectron2/detectron2/engine/train_loop.py", line 425, in state_dict
ret["optimizer"] = self.optimizer.state_dict()
AttributeError: 'tuple' object has no attribute 'state_dict'
β€™β€˜β€™
I am green for detection, would you mind give me some suggestion to fix this bug?

Weird PCA Result

Hi! Thanks to this great work! I'm quite interested in the PCA visualization result but I encountered a weird problem. I found that under eval() mode of RN101 based CLIP image encoder, the semantc augmentated feature (offests are extracted from the provided weights) located much far away from the source domain than the real target domain images' feature. The corresponding PCA visualization is shown below:
myplot

I wonder have your ever encounterd this problem?
Thanks in advance and looking forward to your replay!

AttributeError: 'tuple' object has no attribute 'state_dict'

Hello, when I running your code, it has errors following. What should I do?
Traceback (most recent call last):
File "/mnt/workspace/domaingen-main/train.py", line 601, in
main(args)
File "/mnt/workspace/domaingen-main/train.py", line 593, in main
trainer.train()
File "/mnt/workspace/detection/detect/detectron2/engine/defaults.py", line 486, in train
super().train(self.start_iter, self.max_iter)
File "/mnt/workspace/detection/detect/detectron2/engine/train_loop.py", line 156, in train
self.after_step()
File "/mnt/workspace/detection/detect/detectron2/engine/train_loop.py", line 190, in after_step
h.after_step()
File "/mnt/workspace/detection/detect/detectron2/engine/hooks.py", line 299, in after_step
self._best_checking()
File "/mnt/workspace/detection/detect/detectron2/engine/hooks.py", line 272, in _best_checking
self._checkpointer.save(f"{self._file_prefix}", **additional_state)
File "/opt/conda/envs/domain/lib/python3.9/site-packages/fvcore/common/checkpoint.py", line 118, in save
data[key] = obj.state_dict()
File "/mnt/workspace/domaingen-main/train.py", line 430, in state_dict
ret = super().state_dict()
File "/mnt/workspace/detection/detect/detectron2/engine/defaults.py", line 500, in state_dict
ret["_trainer"] = self._trainer.state_dict()
File "/mnt/workspace/detection/detect/detectron2/engine/train_loop.py", line 425, in state_dict
ret["optimizer"] = self.optimizer.state_dict()
AttributeError: 'tuple' object has no attribute 'state_dict'

How to do PCA analysis

I read your paper and it is a very good piece of work.
I would like to ask how PCA analysis is done. Can you provide the code?

Reagarding Training the model excluding one class

Hello vidit,
I am working on zero shot object detection and i wanted to train your model while excluding one class for ex. bus and then try to to detect bus using ZSL.

can you please guide me how to modify the code so that bus is no longer considered while training.
PS:I have deleted bus objects from the XML files.

application

I want to know if this method can be applied to other areas, such as detecting fights or non-fight behaviors?

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.