Closed kdh-awraw1019 closed 1 year ago
Hi,
Thank you for being interested in our work.
For the first question, the class_quality equals to (1 - class_difficulty), which is introduced in Section 3.3 of our paper. It is computed and updated using EMA during model training, so a pre-trained model provided by mmdetection will not include it.
For the second question, you need to run python setup.py install
under the PPAL project instead of a newly cloned mmdetection.
Best, Chenhongyi
Thank you for your comment
So, is the correct and only way to install PPAL is to just run the 'python setup.py install' command?
Hi,
You can also run pip install -v -e .
Hi,
I still have question.
How can I find the code for the process of calculating the difficulty of all predicted boxes during learning and the process of updating to EMA to calculate image uncertainty in DCUS (Section3.3)?
Hi,
You can find the implementations here
OK, And...
I want to fine the code for the process of calculating the similarity of Images in CCMS
I found implementation about diversity sampling (k-greedy-centers and kmeans) https://github.com/ChenhongyiYang/PPAL/blob/main/mmdet/ppal/sampler/diversity_sampler.py
but, I could not find calculating similarity...
Hi, you can find it here
Hi, New questions.
In run_al_coco.py, 'torch.distributed.launch' is in train / eval / unlabeled command.
KeyError: 'bbox_head.class_quality' (Runned in pycharm)
Traceback (most recent call last):
File "D:\Workspace\PPAL\tools\run_al_coco.py", line 168, in
config file (ppal_retinanet_coco.py)
config_dir = 'D:/Workspace/PPAL/configs/coco_active_learning/' work_dir = 'D:/Workspace/PPAL/work_dirs/'
python_path = 'C:/Users/aaaaa/Anaconda3/envs/ppal/' port = 29500 gpus = 1
oracle_path = 'D:/Workspace/PPAL/data/coco/annotations/instances_train2017.json' init_label_json = 'D:/Workspace/PPAL/data/active_learning/coco/coco_2365_labeled_1.json' init_unlabeled_json = 'D:/Workspace/PPAL/data/active_learning/coco/coco_2365_unlabeled_1.json' init_model = None
train_config = config_dir + 'al_train/retinanet_26e.py' uncertainty_infer_config = config_dir + 'al_inference/retinanet_uncertainty.py' diversity_infer_config = config_dir + 'al_inference/retinanet_diversity.py'
round_num = 5 budget = 2365 budget_expand_ratio = 4 uncertainty_pool_size = budget budget_expand_ratio + gpus - (budget budget_expand_ratio) % gpus
uncertainty_sampler_config = dict( type='DCUSSampler', n_sample_images=uncertainty_pool_size, oracle_annotation_path=oracle_path, score_thr=0.05, class_weight_ub=0.2, class_weight_alpha=0.3, dataset_type='coco') diversity_sampler_config = dict( type='DiversitySampler', n_sample_images=budget, oracle_annotation_path=oracle_path, dataset_type='coco')
output_dir = work_dir + 'retinanet_coco_ppal_5rounds_2percent_to_10percent'
and I wanna know about 'port'
//////////////////////////////////////////////////////
if I run ./tools/run_al_coco.py —config ./al_configs/coco/ppal_retinanet_coco.py —model retinanet command in Terminal,
its print this: (ppal) D:\Workspace\PPAL>tools\run_al_coco.py --config ./al_configs/coco/ppal_retinanet_coco.py --model retinanet
(ppal) D:\Workspace\PPAL> [main 2023-01-30T06:19:35.953Z] update#setState idle [main 2023-01-30T06:19:36.681Z] Starting extension host with pid 19264 (fork() took 12 ms). [main 2023-01-30T06:20:05.963Z] update#setState checking for updates [main 2023-01-30T06:20:07.381Z] update#setState idle [9676:0130/152135.996:ERROR:gpu_init.cc(481)] Passthrough is not supported, GL is disabled, ANGLE is
@kdh-awraw1019 i do have the same error and how to solve it? the checkpoint file has not key of dict 'bbox_head.class_quality'.
I dont know what is class_quality
code : mmdet\ppal\sampler\difficulty_calibrated_uncertainty_sampler.py line : 41 class_qualities = ckpt['state_dict']['bbox_head.class_quality'].numpy() in def _get_classwise_weight(self, results_json):
I did load checkpoint file retinanet_r50_caffe_fpn_mstrain_1x_coco-586977a0.pth from https://mmdetection.readthedocs.io/en/stable/model_zoo.html
but, the checkpoint file has not key of dict 'bbox_head.class_quality'.
so I cannot run this command python tools/run_al_coco.py --config ./al_configs/coco/ppal_retinanet_coco.py --model retinanet
And, when I run this command in anaconda prompt ternimal this error occured..
obviously, I did installation with your guide
python tools/run_al_coco.py --config al_configs/coco/ppal_retinanet_coco.py --model retinanet Traceback (most recent call last): File "tools/run_al_coco.py", line 5, in
from mmdet.ppal.sampler import *
ModuleNotFoundError: No module named 'mmdet.ppal'
My environments
RTX3060 anaconda3 pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 mmcv-full==1.5.0 mmdet==2.27.0