DeepForest
DeepForest copied to clipboard
Multi Class Training not working.
RuntimeError: Error(s) in loading state_dict for RetinaNet: size mismatch for head.classification_head.cls_logits.weight: copying a param with shape torch.Size([9, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([18, 256, 3, 3]). size mismatch for head.classification_head.cls_logits.bias: copying a param with shape torch.Size([9]) from checkpoint, the shape in current model is torch.Size([18]).
When m.use_release()
If I use label_dict = {Tree:0}, this no happened. But If I use label_dict={"Dead":0,"Alive":1} This issue happened.
Solved
How did you solve this issue ? Kindly explain
I would love to know as well.
@Mashood3624 or @victoic - can you provide a reproducible examples along with information on operating system, python version, etc. so that we can look into this. We are running multi-class models without issues so we need additional details to try to figure out the issues you are having. We are hoping to add better support for these models more broadly over the summer.
@Smart133594 what was your solution?
That was my code issue, all is fine.
I have this problem now, how did you solve it?
I added some codes and that working now fully for the training.. All of trees detecting with tree names. What is your email?
No
On Tue, Jul 12, 2022 at 11:43 AM Bozsoki Levente @.***> wrote:
Hi Do you receive this email?
On Tue, Jul 12, 2022, 17:37 Smart Dev @.***> wrote:
I added some codes and that working now fully for the training.. All of trees detecting with tree names. What is your email?
— Reply to this email directly, view it on GitHub < https://github.com/weecology/DeepForest/issues/231#issuecomment-1181922617 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AOJSPAR72LW2DREGQ24H2CTVTWGMRANCNFSM5BHB42JA
. You are receiving this because you commented.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/weecology/DeepForest/issues/231#issuecomment-1181928894, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQP5L7ZFINBTUZWSGN7C7T3VTWHCNANCNFSM5BHB42JA . You are receiving this because you were mentioned.Message ID: @.***>
Please contact me at @.*** !
Smart Dev @.***> ezt írta (időpont: 2022. júl. 12., K, 17:44):
No
On Tue, Jul 12, 2022 at 11:43 AM Bozsoki Levente @.***> wrote:
Hi Do you receive this email?
On Tue, Jul 12, 2022, 17:37 Smart Dev @.***> wrote:
I added some codes and that working now fully for the training.. All of trees detecting with tree names. What is your email?
— Reply to this email directly, view it on GitHub <
https://github.com/weecology/DeepForest/issues/231#issuecomment-1181922617
, or unsubscribe <
https://github.com/notifications/unsubscribe-auth/AOJSPAR72LW2DREGQ24H2CTVTWGMRANCNFSM5BHB42JA
. You are receiving this because you commented.Message ID: @.***>
— Reply to this email directly, view it on GitHub < https://github.com/weecology/DeepForest/issues/231#issuecomment-1181928894 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AQP5L7ZFINBTUZWSGN7C7T3VTWHCNANCNFSM5BHB42JA
. You are receiving this because you were mentioned.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/weecology/DeepForest/issues/231#issuecomment-1181930299, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJSPAXMHB2MHS6YRCS4ST3VTWHHBANCNFSM5BHB42JA . You are receiving this because you commented.Message ID: @.***>
good morning. to the date, i have the same problem.
the model structure is the next.
the result of the model is the next.
@bzsklvnt @ethanwhite
I am trying to test the multi class training and so far get no predictions using the provided testfile_multi.csv data. If I place "fast_dev_run" to False to train for more than one epoch, I get the following error:
"Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor"
Any insight as to how you solved this or what I'm doing incorrectly would be appreciated.
Solved this error. Need to push the training to the GPU for second iteration. m.config['gpus'] = '1'
I still get terrible results on the provided test data and no predictions unless I use m.config["score_thresh"] = 0.01. Should this be the case (I understand its a tiny training set), but not sure if this is the result I should expect?
Thanks for any tips!
@j-la-haye We haven't actively explored multi-class modeling with trees using DeepForest and definitely not with tiny training sets. In general that would be a difficult problem. My one suggestion is that it looks like you aren't using the existing backbone and regression head (the parts of the model that help construct the bounding boxes around trees) and I suspect that is why the crown detection results are so bad.
I'm closing this since we've let it sit for too long (sorry about that) and since we're not actively supporting multi-class work yet, but feel free to open a new issue if you have additional questions.