Code Monkey home page Code Monkey logo

acrofod's Introduction

(ECCV2022) AcroFOD: An Adaptive Method for Cross-domain Few-shot Object Detection

Data Preparation

The links of the processed data (Yolo format) are as follows (in Baidu Desk):

Sim10K Key: juf6 (The synthetic dataset includes only car class.)

KITTI Key: 8brv (The KITTI dataset includes only car class.)

Cityscapes_car_8_1 Key: p69u (The randomly selected 8 images from cityscapes_car.)

Cityscapes_car Key: 4ym4 (The cityscapes dataset includes only car class.)

Cityscapes_8cls Key: rg4z (The Cityscapes dataset includes 8 classes.)

Cityscapes_8cls_foggy Key: bjgr (The Foggy Cityscapes dataset includes 8 classes.)

Viped Key: a9y7 (The synthetic dataset includes)

coco_person_60 Key: vg1m (The randomly selected 60 images from coco_person.)

coco_person Key: je89 (The COCO dataset includes only person class.)

You can also process the raw data to Yolo format via the tools shown here.

Requirements

This repo is based on YOLOv5 repo. Please follow that repo for installation and preparation. The version I built for this project is YOLO v5 3.0. The proposed methods are also easy to be migrated into advanced YOLO versions.

Training

  1. Modify the config of the data in the data subfolders. Please refer to the instructions in the yaml file.

  2. The command below can reproduce the corresponding results mentioned in the paper.

python train_MMD.py --img 640 --batch 12 --epochs 300 --data ./data/city_and_foggy8_3.yaml --cfg ./models/yolov5x.yaml --hyp ./data/hyp_aug/m1.yaml --weights '' --name "test"
  • If you find this paper/repository useful, please consider citing our paper:
@inproceedings{gao2022acrofod,
  title={AcroFOD: An Adaptive Method for Cross-Domain Few-Shot Object Detection},
  author={Gao, Yipeng and Yang, Lingxiao and Huang, Yunmu and Xie, Song and Li, Shiyong and Zheng, Wei-Shi},
  booktitle={European Conference on Computer Vision},
  pages={673--690},
  year={2022}
}

acrofod's People

Contributors

hlings 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

Watchers

 avatar  avatar

acrofod's Issues

❓ Question

Excuse me,“Fig. 3. Left: visualization ofmulti-level domain-aware augmentation. Right: three types of proposed box-level cross-domain augmentations.”This part of the visualization results how to achieve, where specific.

训练自己数据集

请问在训练自己数据集时,如果类别不同,除了配置文件外,代码中是不是也存在需要修改的部分。

数据集在哪啊,大佬请指教

Readme中提到 “The above data has been uploaded. I will share the links this week.”。
是这周可以看到voc、coco数据集吗,另外想要一个联系方式可以吗。。。

How to select images for the few shot settings in cityscapes_foggy dataset

Hi,
Hope you are doing well.
I read this paper and it is amazing too as AsyFod and more importantly I could run the code on 11 GB gpu. I am running your code on a custom dataset. I have preprocessed the source data following the cityscapes_to_yolo.py but now I am confused how to preprocess the target dataset and more importantly how you did it in this work.

I am new to few shot domain adaptation so not able to figure out how to reshape the target domain dataset into few shot settings. Please help me in this, it will be perfect if you can provide me the foggy_cityscapes_to_yolo.py file.

Thanks alot !

导出模型

作者您好,我想使用您的模型用于实践中,不知道您修改后的模型还支持导出功能吗?导出TorchScript格式的模型

转到yolov7

我想把论文的方法 换到yolov7 demo里。大佬有什么指教吗。

question

Hello, may I ask how to use box-level (copy_pastev3.py) in the training process (train_MMD.py)? I see that there is no such part in the training code?

class setting in config file

Thanks for your opensource, it's a nice work.

I want to test it on my datasets, so if my source dataset is coco, target is cityscape, how do I set the config file? Does the next setting right?

train_source: [/coco/images/train, select/images/train] (select means few shot images from cityscape dataset)
train_target: coco/images/val
val: cityscapes_8cls_foggy/images/val

number of classes
nc: 80 or 88 or 8?

class names needing change for different datasets
names: only source class or target class or all of them?

By the way, I found a classes.txt in cityscape_8cls_foggy/labels, should I make a class file for coco?

Data Augmentation Sampling Strategy

The paper mentioned that the augmentation sample data from two domain,but the data augmentation in the code seems to only sample data from one domain,is the source image [A, B] means source and target image?But if the target image is few, the few shot image is difficult to be selected。Would it be okay to do so?

And another question is what is the role of the variable bs_add(or image_add).

Domain-aware Augmentation

Hello, recently read this paper you wrote and found it very helpful, want to understand your code, but I am a beginner some details do not read too well, please ask the paper's Domain-aware Augmentation and Directive Optimization Strategy in which part of the code embodied in the specific, thank you!

S->C cross-domain few-shot

Hi, for the S->C scenario, I made the following changes to city_and_foggy8_1.yaml

train_source: [C:\VOC2012\images, C:\cityscapes\images\train]
train_target: C:\VOC2012\images

val: C:\cityscapes\images\val

However, there are around 3k images from cityscapes train folder, how is this a few shot problem? Should I only select 8-10 images from cityscapes and put it under the train folder?

Thank you.

Training Error!

Hello,

When I run the code for the training, I get an error. The error:

image

Can you share the versions of the python, torch etc. that you used?

Thank you in advance!

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.