Code Monkey home page Code Monkey logo

Comments (1)

chenbinghui1 avatar chenbinghui1 commented on July 28, 2024

@qdd1234

The implementation of AF is composed of several parts:
(1) ignore-label assignment:

if 'scores' in data.keys() and self.thres is not None:

Because the DSL-style data annotation file contains bboxes, tags, scores information, when we load the annos we can assign each instance into FG, Ignorable Region or BG according to the scores and thresholds. Scores and thresholds \tao_{2} will be updated by mmdet/runner/hooks/unlabel_pred_hook.py.

(2) loss computation:

ig_labels = None

Ignored region will be weighted by 0 when computing losses.

(3) Adaptive \tao_{2} update:

def adathres(rank, flag, filename, id2cat, cat2id, input_list, input_path, settings):

After each epoch, we will update \tao_{2} for each class, and the thresholds for each classes will be saved in json file "adathres.json" which is defined in config_file(

)

(4) Instance score update:

def after_train_iter(self, runner):
if self.interval_mode == "iteration" and runner.iter+1>=(self.start_point*runner.iter_tol_epoch)+1:
if not self.every_n_iters_with_startpoint(runner, self.interval, self.start_point):
return
if self.iter_fuse_flag == True:
self.after_train_iter_func(runner)
else:
# the first fuse will be the same as epoch manner
self.after_train_epoch_iter(runner)
self.iter_fuse_flag=True
next(runner.ITER)
# handling the preload mechanism in torch.dataloader
# runner.ITER is an independent iterator for iter-style pseudo-label update
for i in range(int(self.preload_num)):
next(runner.ITER)

Here, we will update the annotation file of each image in iter-manner(or epoch-manner, you can try by yourself, we also provide other kinds of update, e.g. fuse with pseudo-labels in history like in ISMT. )

from dsl.

Related Issues (20)

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.