-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to generate pseudo labels from baseline detection model #7
Comments
Hi, The pseudo-labels are generated by first running a detector on every frame of a video, then keeping the high-confidence detections (threshold 0.8 on detector confidence score). And yes, as you said, we filter out the subset of images. However, because this process in quite involved and time-consuming, we have the video frames we used, as well as annotations, available for download: https://github.com/AruniRC/detectron-self-train#bdd-hard-examples I think it will be easier because of engineering/implementation issues to simply download that data, instead of the process of generating the pseudo-labels on BDD (it took us about a week on a GPU cluster). thanks for your interest in this project and hope this helped. |
Thanks for you reply. I think generating pseudo labels is the key point of this paper. I can understand the high level idea but I do need to run some code to verify my understanding. I'm still a little new to detectron code. Actually I have no idea how to generate a json file with you code. Could you provide some sample code to do that? I understand your code is based on your machine. But is that possible to share some to me to help me have a better understand the whole project? I have another question about file of 'bdd_distill100_track100.yaml'. In this file, you use the following hyperparameters: |
Hi,
I realize this can be confusing -- based on your feedback, I will write these details into the README. Apologies for the confusion. |
Thanks for you considerable reply. I have one more question. In the readme , the mIoU for HP-constrained is more than 29. But in the paper, it is 28.43 (table 4). When you change the value for Lambda, you can achieve different results. It seems that when Lambda=0.3, the best performance can be got. Is that always true or it won't make a big difference when you change the value for Lambda. |
You're welcome -- hopefully next user will find this easier to use in their research! |
I find a bug when I try to evaluate the model with multiple GPUs. In the file "detectron-self-train/lib/nn/parallel/data_parallel.py" line 82 (mini_kwargs = dict([(k, v[i]) for k, v in kwargs.items()])), I get the error of "IndexError: list index out of range". It seems that i could only be equal to 0. Another weird thing is, when I run test_net.py with --multi_gpu_testing, I always have the following assert error: |
Could you try using single GPU and confirm if it is working? (@PCJohn for comments too) |
single gpu is fine. |
@liyunsheng13 can you share the command you're using for the evaluation? Also, make sure that multiple GPUs are visible (as you may have set CUDA_VISIBLE_DEVICES to 1 for training the model). An additional note about generating the pseudo-labels: |
Thanks for your response. I can use single GPU to evaluate the results. But I still have trouble in generating pseudo labels. In the file threshold_search.py, it seems that file needs the ground truth and is not the one to generate the pseudo labels. I try to generate by myself with the test_net.py to get detection results and set the threshold to 0.8 to save the bounding boxes with the detection model I have. But the result is far away from the results reported in the paper. I also take a look at the json file "bdd_dets18k.json", and I found the id for annotations is not continuous. I guess you might use other techniques to filter the false positive detections. Could you take a look at my question? |
Hi @liyunsheng13 , can you provide details on what you are doing? Are the following steps what you are doing, and not being able to match our reported numbers?
|
@liyunsheng13 you're right, I was a little confused about what exactly the question was. The pseudo labels are created during training and we don't explicitly create separate jsons with the pseudo labels as scores. The answer above by @AruniRC is pretty comprehensive. About the attempt to generate the pseudo labels for bdd_dets18k: |
I find a problem I might have when I test the model. Could you let me know what is the test set you use to get the results in the paper? In the eval file, it seems that the json file is bdd_ped_val, but it only contains ~1700 images. I think it has the same domain as bdd_ped. In the paper, you mentioned the BDD-Target-Test has 8236 images. I though I might use a wrong val test. Could you give me some advice? |
The correct dataset for BDD-Target-Test is: "bdd_peds_not_clear_any_daytime_val" (see this script) The json file corresponding to this dataset: bdd_peds_not_clear_any_daytime_train.json (see here in the dataset catalog) |
So I think the result you show in the README file is based on BDD-Target-Test. But the link for the eval file shows that the val dataset you use is bdd_ped_val. Is that wrong? I thought it might be reason I kept getting different results than you can get. |
There are multiple eval scripts for each setting (see the folder with all of them). For example, consider using distill with lambda=0.3. There are 3 scripts evaling the same setting on bdd_peds_val, bdd_peds_full and bdd_target_peds |
But I think different setting has different domain. In the table 4 of your paper, which validation set do you use? |
I think for domain adaptation problem, the validation set should have the same domain as the target training set. Correct? |
The results in Table 4. use "bdd_peds_not_clear_any_daytime_val" (the complement of the source domain in the BDD dataset). This is the BDD(Rest) dataset described in section 4.1 of the paper. |
I see. I think the model you release in the github is based on the test set of bdd_peds_not_clear_any_daytime_val not bdd_peds_val which is shown in the eval file. I think you might need to change it. |
That's correct. Those models were tested on bdd_peds_not_clear_any_daytime_val. |
Haha, thanks for your confirmation. I will test my model again with the correct test set. |
I have one more question. For the baseline result which is around ~15. I think you use bdd_peds_train.json file to train the model and use bdd_peds_val.json to test. However, I think both of them are from the source domain. If I'm correct, the results should not only around 15, it should be some results around ~30. Do I miss something? |
Hi, we report the ~15 AP by evaluation on the *Target* domain test/val set,
which is the usual procedure of evaluating domain adaptation methods.
Please note, the eval scripts will be updated to show the correct eval
dataset names.
…On Tue, Jul 16, 2019, 10:59 AM Yunsheng Li ***@***.***> wrote:
I have one more question. For the baseline result which is around ~15. I
think you use bdd_peds_train.json file to train the model and use
bdd_peds_val.json to test. However, I think both of them are from the
source domain. If I'm correct, the results should not only around 15, it
should be some results around ~30. Do I miss something?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7?email_source=notifications&email_token=AAIBQT2IC7JWKTREKNYIN43P7YD7LA5CNFSM4H56L7H2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2BVAPQ#issuecomment-511922238>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIBQT2LYLVHO3SOIOSAMBDP7YD7LANCNFSM4H56L7HQ>
.
|
@liyunsheng13 you're right about the json: bdd_peds_val.json is the val set on the source domain. We did test the model on this, which is why the script is in the eval folder (this is not the reported number. The reported number is on the target domain). When you eval the baseline on the bdd_peds_val.json, you're getting 30 mAP? Re-iterating some points: The 15 mAP results is on the target domain, which is bdd_peds_not_clear_any_daytime_val.json (as @AruniRC mentioned). The README is misleading, as it has links to the eval script on the source domain, but we will update that (again, mentioned in @AruniRC s answer above) |
@liyunsheng13 @AruniRC @PCJohn hi, I think that the gzipped tarball which |
Yes, that is correct |
@PCJohn thanks for your reply However, the error occured: "00000f77c-62c2a288_00000067.jpg" not found. I checked the images in bdd_peds_HP18k, and found the first image is '_00000096.jpg'. However, the first in 'bdd_HP18k.json' is "_00000067.jpg". Did I do something wrong? |
Hi
I think the the bdd_peds+DETS18k means using bboxes from the source dataset (bdd_peds) and the pseudo labels generated by the baseline detection model for target dataset. Could you let me know how to generate the pseudos labels for this part? Do you run the baseline model on all the training sample in the target dataset and filter ~100000 images?
The text was updated successfully, but these errors were encountered: