HonglinChu / SiamTrackers

(2020-2022)The PyTorch version of SiamFC,SiamRPN,DaSiamRPN, UpdateNet , SiamDW, SiamRPN++, SiamMask, SiamFC++, SiamCAR, SiamBAN, Ocean, LightTrack , TrTr, NanoTrack; Visual object tracking based on deep learning
Apache License 2.0
1.33k stars 268 forks source link

NanoTrack为什么要将训练数据裁剪为271而不是pysot通用的511? #123

Closed Jontyshaw closed 1 year ago

Jontyshaw commented 1 year ago

NanoTrack为什么要将训练数据裁剪为271而不是pysot通用的511?使用大一些的图像会对训练精度有影响吗,是否可以通过代码改成使用原生pysot裁剪成511的数据集?

HonglinChu commented 1 year ago

NanoTrack的训练数据使用的是pysot通用的511

Jontyshaw commented 1 year ago

试着直接加载先前pysot使用的数据集,没有对数据集重新裁剪,结果报错

Traceback (most recent call last): File "C:\Users\xyz\PycharmProjects\NanoTrack\bin\train.py", line 301, in main() File "C:\Users\xyz\PycharmProjects\NanoTrack\bin\train.py", line 297, in main train(train_loader, dist_model, optimizer, lr_scheduler, tb_writer) File "C:\Users\xyz\PycharmProjects\NanoTrack\bin\train.py", line 165, in train for idx, data in enumerate(train_loader): File "C:\Users\xyz\Anaconda3\envs\tracking\lib\site-packages\torch\utils\data\dataloader.py", line 633, in next data = self._next_data() File "C:\Users\xyz\Anaconda3\envs\tracking\lib\site-packages\torch\utils\data\dataloader.py", line 1345, in _next_data return self._process_data(data) File "C:\Users\xyz\Anaconda3\envs\tracking\lib\site-packages\torch\utils\data\dataloader.py", line 1371, in _process_data data.reraise() File "C:\Users\xyz\Anaconda3\envs\tracking\lib\site-packages\torch_utils.py", line 644, in reraise raise exception ValueError: Caught ValueError in DataLoader worker process 0. Original Traceback (most recent call last): File "C:\Users\xyz\Anaconda3\envs\tracking\lib\site-packages\torch\utils\data_utils\worker.py", line 308, in _worker_loop data = fetcher.fetch(index) File "C:\Users\xyz\Anaconda3\envs\tracking\lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\Users\xyz\Anaconda3\envs\tracking\lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\Users\xyz\PycharmProjects\NanoTrack\nanotrack\datasets\dataset.py", line 268, in getitem cls, delta = self.point_target(bbox, cfg.TRAIN.OUTPUT_SIZE, neg) File "C:\Users\xyz\PycharmProjects\NanoTrack\nanotrack\datasets\point_target.py", line 43, in call delta[0] = points[0] - target[0] ValueError: could not broadcast input array from shape (16,16) into shape (25,25)

HonglinChu commented 1 year ago

训练的时候输入的是255不是271

dengxiongshi commented 7 months ago

训练的时候输入的是255不是271

@HonglinChu 你好,训练输入的大小可以替换成256吗,在模型推理阶段换成256和128的输入,这样会有什么影响吗