GithubHelp home page GithubHelp logo

Comments (5)

charlesCXK avatar charlesCXK commented on August 23, 2024

Hi, the config file of few supervision is here.
(1) You could start from this config. Please note that we only show the difference in the below. Other files such as network.py, train.py need no change.
(2) Following the official code of PseudoSeg, we view all the 10582 images in the VOC Aug set as the unlabeled set. The image IDs are recorded in the file train_aug.txt. To generate this file, you could simply merge two files: train_aug_unlabeled_1-2.txt and train_aug_labeled_1-2.txt.
(3) We train 30 epochs for few supervision. The cps_weight is 0.1 here, but if you use 0.5, you would get significantly higher performance than the number in our paper (1%~4% IoU gain for 732, 366, 183 labeled settings).

C.dataset_path = osp.join(C.volna, 'DATA/pascal_voc')
C.img_root_folder = C.dataset_path
C.gt_root_folder = C.dataset_path
C.labeled_ratio = 2
C.train_source = osp.join(C.dataset_path,'subset_train_aug/pseudoseg_labeled_1-{}.txt'.format(C.labeled_ratio))
C.unsup_source = osp.join(C.dataset_path, 'train_aug.txt')
C.eval_source = osp.join(C.dataset_path, "val.txt")
C.is_test = False

C.num_train_imgs = 1464 // C.labeled_ratio
C.num_eval_imgs = 1449
C.num_unsup_imgs = 10582     # unsupervised samples

C.max_samples = max(C.num_train_imgs, C.num_unsup_imgs)


"""Train Config"""
if os.getenv('learning_rate'):
    C.lr = float(os.environ['learning_rate'])
else:
    C.lr = 0.001

if os.getenv('batch_size'):
    C.batch_size = int(os.environ['batch_size'])
else:
    C.batch_size = 8

C.nepochs = 30
C.niters_per_epoch = int(math.ceil(C.max_samples * 1.0 // C.batch_size))
C.num_workers = 8
C.train_scale_array = [0.5, 0.75, 1, 1.5, 1.75, 2.0]
C.warm_up_epoch = 0

C.cps_weight = 0.1
C.cutmix_mask_prop_range=(0.25, 0.5)
C.cutmix_boxmask_n_boxes=3
C.cutmix_boxmask_fixed_aspect_ratio=False
C.cutmix_boxmask_by_size=False
C.cutmix_boxmask_outside_bounds=False
C.cutmix_boxmask_no_invert=False

from torchsemiseg.

Huiimin5 avatar Huiimin5 commented on August 23, 2024

Hi, Thank you so much for your reply.
But changing C.train_source to subset_train_aug/pseudoseg_labeled_1-{}.txt only leads me dataloader errors.
image
I think the problem is with file format because when I check overlap ids between subset_train_aug/pseudoseg_labeled_1-2.txt and train_aug.txt with uniq command I can only find one but there are definitely identical ids across these two files.
image

Could you find overlapped ids using uniq in your environment?

from torchsemiseg.

charlesCXK avatar charlesCXK commented on August 23, 2024

Could you provide more details?

from torchsemiseg.

Huiimin5 avatar Huiimin5 commented on August 23, 2024

It seems the problem is caused by missing directory: TorchSemiSeg/DATA/pascal_voc/pseudoseg_labeled_1-2.
Could you please provide that?

from torchsemiseg.

charlesCXK avatar charlesCXK commented on August 23, 2024

Hi, there is no need to create such a directory. All the images could be found in the VOC Aug set.

from torchsemiseg.

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.