Lilytopia / WakeNet

A CNN-based optical image ship wake detector.
MIT License
47 stars 11 forks source link

According to the instructions in the README, I encountered a ValueError: Buffer dtype mismatch, expected 'int' but got 'long' in train.py at the 20th epoch. #4

Open Leelibrary opened 7 months ago

Leelibrary commented 7 months ago

Traceback (most recent call last): File "/home/lab/libr/WakeNet/eval.py", line 100, in evaluate(arg.target_size, File "/home/lab/libr/WakeNet/eval.py", line 85, in evaluate results = data_evaluate(model, target_size, test_path, conf, dataset) File "/home/lab/libr/WakeNet/eval.py", line 43, in data_evaluate dets = im_detect(model, im, target_sizes=target_size, conf=conf) File "/home/lab/libr/WakeNet/utils/detect.py", line 12, in im_detect return single_scale_detect(model, src, target_size=target_sizes[0], use_gpu=use_gpu, conf=conf) File "/home/lab/libr/WakeNet/utils/detect.py", line 36, in single_scale_detect scores, classes, boxes, landmarks = model(im, test_conf=conf) File "/opt/anaconda3/envs/libr/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/lab/libr/WakeNet/models/WakeNet.py", line 106, in forward return self.decoder(imgs, anchors_list[-1], cls_score, bbox_pred, land_pred, test_conf=test_conf) File "/home/lab/libr/WakeNet/models/WakeNet.py", line 124, in decoder anchors_nms_idx = nms(torch.cat([bboxes.float(), scores.float()], dim=2)[0, :, :], nms_thresh) File "/home/lab/libr/WakeNet/utils/nms_wrapper.py", line 13, in nms return cpu_nms(dets, thresh) # 加了个int File "cpu_nms.pyx", line 153, in cpu_nms.cpu_nms ValueError: Buffer dtype mismatch, expected 'int' but got 'long'

hl-gl commented 2 months ago

How to solve this error? Traceback (most recent call last): File "train.py", line 12, in from models.WakeNet import WakeNet File "/data/l/lh/wake_detection/coda/WakeNet-main/models/WakeNet.py", line 6, in from models.MultiHeads import CLSHead, REGHead, LDMHead File "/data/l/lh/wake_detection/coda/WakeNet-main/models/MultiHeads.py", line 4, in from models.RT import RT File "/data/l/lh/wake_detection/coda/WakeNet-main/models/RT.py", line 2, in from utils._cdht.dht_func import C_dht File "/data/l/lh/wake_detection/coda/WakeNet-main/utils/_cdht/dht_func.py", line 2, in import deep_hough as dh ModuleNotFoundError: No module named 'deep_hough'