Skip to content
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

ValueError: GEOSGeom_createLinearRing_r returned a NULL pointer #70

Open
Chenshuangwn opened this issue Jan 7, 2024 · 0 comments
Open

Comments

@Chenshuangwn
Copy link

Hello~
When I was running "Python train.py -- gpu_idx 0-- batch_size 4-- num_workers 8", the speed was particularly slow, and I had to wait for about five minutes before the first epoch appeared. Later, when the first epoch training reached the 16th round, an error message appeared and the operation stopped. The error message is as follows:

Traceback (most recent call last):
  File "train.py", line 250, in <module>
    main()
  File "train.py", line 52, in main
    main_worker(configs.gpu_idx, configs)
  File "train.py", line 149, in main_worker
    train_one_epoch(train_dataloader, model, optimizer, lr_scheduler, epoch, configs, logger, tb_writer)
  File "train.py", line 206, in train_one_epoch
    total_loss, outputs = model(imgs, targets)
  File "D:\Learning_Tool\AnacondaEP\envs\comyolo4\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "D:\Learning_Tool\Pycharm\Project\Complex-YOLOv4-Pytorch-master\src\models\darknet2pytorch.py", line 221, in forward
    x, layer_loss = self.models[ind](x, targets, img_size, self.use_giou_loss)
  File "D:\Learning_Tool\AnacondaEP\envs\comyolo4\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "D:\Learning_Tool\Pycharm\Project\Complex-YOLOv4-Pytorch-master\src\models\yolo_layer.py", line 197, in forward
    pred_boxes=pred_boxes, pred_cls=pred_cls, target=targets, anchors=self.scaled_anchors)
  File "D:\Learning_Tool\Pycharm\Project\Complex-YOLOv4-Pytorch-master\src\models\yolo_layer.py", line 135, in build_targets
    GIoU=self.use_giou_loss)
  File "D:\Learning_Tool\Pycharm\Project\Complex-YOLOv4-Pytorch-master\src\utils\iou_rotated_boxes_utils.py", line 119, in iou_pred_vs_target_boxes
    p_poly, t_poly = cvt_box_2_polygon(p_cons), cvt_box_2_polygon(t_cons)
  File "D:\Learning_Tool\Pycharm\Project\Complex-YOLOv4-Pytorch-master\src\utils\iou_rotated_boxes_utils.py", line 31, in cvt_box_2_polygon
    return Polygon([(box[i, 0], box[i, 1]) for i in range(len(box))]).buffer(0)
  File "D:\Learning_Tool\AnacondaEP\envs\comyolo4\lib\site-packages\shapely\geometry\polygon.py", line 243, in __init__
    ret = geos_polygon_from_py(shell, holes)
  File "D:\Learning_Tool\AnacondaEP\envs\comyolo4\lib\site-packages\shapely\geometry\polygon.py", line 509, in geos_polygon_from_py
    ret = geos_linearring_from_py(shell)
  File "shapely\speedups\_speedups.pyx", line 408, in shapely.speedups._speedups.geos_linearring_from_py
ValueError: GEOSGeom_createLinearRing_r returned a NULL pointer

I don't know the reason for this, could you please provide suggestions? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant