Giter Club home page Giter Club logo

ieee_tip_uiu-net's Issues

test.py代码的问题

你好,因为test输出的结果中平均值只有零点零几,所以我发现了几个问题:

   if IoU > best_iou:
        best_iou = IoU
    if nIoU > best_nIoU:
        best_nIoU = nIoU

    total_iou = total_iou + IoU
    total_niou = total_niou + nIoU`

这一部分代码是不是应该放到for循环里呀。
还有

IoU=total_iou/20
nIoU=total_niou/20

用新的名字结果就对了:

avg_IoU=total_iou/20
avg_nIoU=total_niou/20

关于传统算法指标计算问题

您好,我在计算红外小目标检测传统算法IPI的时候遇到了问题。
我利用混淆矩阵计算指标,发现计算出来的IoU与nIoU是一样。因为IoU=tp/(fn+fp+tp),nIoU=tp/(t+p-tp)。公式表示是一样的,我感觉我算出来的是nIoU。
请问您可以教教我,如何计算红外小目标检测传统算法的IoU与nIoU吗?

Provide tutorial

Can you please provide tutorial for training and testing the model on custom dataset

RuntimeError: torch.cat(): input types can't be cast to the desired output type Byte

您好,我在使用其它两种数据集训练时,在一个epoch下,不同批次会出现报错
l0: 0.010986, l1: 0.011472, l2: 0.014452, l3: 0.004034, l4: 0.004883, l5: 0.013490, l6: 0.004046

[epoch: 1/500, batch: 45/ 213, ite: 15] train loss: 0.884871, tar: 0.183994
Traceback (most recent call last):
File "D:\contrast-methods\IEEE_TIP_UIU-Net-main\train.py", line 139, in
for i, data in enumerate(salobj_dataloader):
File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data\dataloader.py", line 630, in next
data = self._next_data()
^^^^^^^^^^^^^^^^^
File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data\dataloader.py", line 1345, in _next_data
return self._process_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data\dataloader.py", line 1371, in _process_data
data.reraise()
File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch_utils.py", line 694, in reraise
raise exception
RuntimeError: Caught RuntimeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data_utils\worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data_utils\fetch.py", line 54, in fetch
return self.collate_fn(data)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data_utils\collate.py", line 265, in default_collate
return collate(batch, collate_fn_map=default_collate_fn_map)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data_utils\collate.py", line 127, in collate
return elem_type({key: collate([d[key] for d in batch], collate_fn_map=collate_fn_map) for key in elem})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data_utils\collate.py", line 127, in
return elem_type({key: collate([d[key] for d in batch], collate_fn_map=collate_fn_map) for key in elem})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data_utils\collate.py", line 119, in collate
return collate_fn_map[elem_type](batch, collate_fn_map=collate_fn_map)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hp-\AppData\Roaming\Python\Python311\site-packages\torch\utils\data_utils\collate.py", line 162, in collate_tensor_fn
return torch.stack(batch, 0, out=out)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: torch.cat(): input types can't be cast to the desired output type Byte。
请问这种错误有解决方案吗?

train_data问题

你好,提供的train_data是空的,但是train.py包含如下:
tra_image_dir = os.path.join('DUTS', 'DUTS-TR', 'DUTS-TR', 'im_aug' + os.sep)
tra_label_dir = os.path.join('DUTS', 'DUTS-TR', 'DUTS-TR', 'gt_aug' + os.sep)
我应该从哪里下载'DUTS', 'DUTS-TR','im_aug' 'gt_aug' 这些

requirements and IoU values

i want to ask if there are any precise versions of the requirements (specially for torch, torchvision) because it didn't work for me without specifying it . I'm looking for a quick response please. and if you can help me with any information about the metrics because the way you coded  IoU and nIoU have a really small value0.000xx even if there is an intersection (visually noticed) . I tried to print the intersection to check, and it is = 0 and the comparison of the label and predicted mask shows the opposite (a good result).

建议requirements中依赖包的版本指明

您好,我这里尝试了多次配置uiunet的相关环境,但requirements的部分依赖包版本未指明,导致都未能成功,我也只是一个初学者,但我个人感觉确实这个环境的配置成功的难度较大,所以提一个小建议

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.