Open samakos opened 1 year ago
more specifically I am trying to use your code in a layout analysis dataset (document images and each image has annotations for paragraph, title, section-header, table, etc.)
The code does not work unfortunately, been debugging it for some time now, it is basically a new code at this point
hello! and amazing work!! could you please help with this error? Traceback (most recent call last): File "/home/ec2-user/SageMaker/DRL-ActiveObjectDetection/main.py", line 32, in
main()
File "/home/ec2-user/SageMaker/DRL-ActiveObjectDetection/main.py", line 28, in main
trainer.train()
File "/home/ec2-user/SageMaker/DRL-ActiveObjectDetection/utils/trainer.py", line 64, in train
detector_output = self.detector_network(images) ####I added targets)
File "/home/ec2-user/anaconda3/envs/pytorch_p39/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, *kwargs)
File "/home/ec2-user/SageMaker/DRL-ActiveObjectDetection/models/detector_network.py", line 50, in forward
detections = self.model(images)
File "/home/ec2-user/anaconda3/envs/pytorch_p39/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(input, **kwargs)
File "/home/ec2-user/anaconda3/envs/pytorch_p39/lib/python3.9/site-packages/torchvision/models/detection/generalized_rcnn.py", line 62, in forward
torch._assert(False, "targets should not be none when in training mode")
File "/home/ec2-user/anaconda3/envs/pytorch_p39/lib/python3.9/site-packages/torch/init.py", line 853, in _assert
assert condition, message
AssertionError: targets should not be none when in training mode