UTokyo-FieldPhenomics-Lab / DODA

Diffusion for Object-detection Domain Adaptation in Agriculture
MIT License
11 stars 0 forks source link

Can't generate images base on images correct #3

Open illrayy opened 1 week ago

illrayy commented 1 week ago

Originally posted by @yangjie1874 in https://github.com/UTokyo-FieldPhenomics-Lab/DODA/issues/2#issuecomment-2209887718

Hello, as shown in the figure, in the image generated by generate_data_for_target_domain.py, the label position I want is very random and almost wrong. I want to know the reason dce3b4ab28a1d22d611633314237da2d fc5746b9270ee68ed77d1b3334268fd1

illrayy commented 1 week ago

@yangjie1874 It seems that your controlnet has not converged, or the Control Strength is set too small. This is the image I got with the pre-trained DODA. For controlnet, how many iterations did you train? image

yangjie1874 commented 1 week ago

sorry, I using ldm, I have no training controlnet,

yangjie1874 commented 1 week ago

just train ldm in the same way as #2

illrayy commented 1 week ago

DODA uses label (layout images in paper) to control the image generation, and the control achieved through controlnet(cldm), so if you only use ldm, it won't use layout images to control the generation, and the label won't match the image.

Training cldm requires boxes annotation, if you don't have the annotation, you can directly use the pre-trained weight to generate data. OR mix your data with GWHD to train the ldm first, then use the annotation from GWHD to train the cldm. As show in Table 3 and Figure 5 of the paper, although there is no annotation from the target domain, this training method can still improve the quality of the generated target domain data.

yangjie1874 commented 1 week ago

Thank you very much for your patient answer. You mean I will now use the trained ldm as pre-trained weights to train cldm?

illrayy commented 1 week ago

for your dataset, do you have annotation?

yangjie1874 commented 1 week ago

yes!

yangjie1874 commented 1 week ago

The ldm I trained is unlabeled, but when I use the weights of ldm to train cldm, an error occurs. what should i do ? /(ㄒoㄒ)/~~ 0d2968cc40139d1149d64be2a3e714c6

yangjie1874 commented 1 week ago

Or maybe I didn't notice some problems when I was training ldm?

illrayy commented 1 week ago

yes!

This work is designed for unlabeled scenarios, and given the size of your dataset, I'm not sure if it would serve your purpose

The ldm I trained is unlabeled, but when I use the weights of ldm to train cldm, an error occurs. what should i do ? /(ㄒoㄒ)/~~ 0d2968cc40139d1149d64be2a3e714c6

DId you run tool_add_wheat_control.py to add the controlnet? If not, please change the input_path and output_path in the file, then run the file