Giter VIP home page Giter VIP logo

Comments (10)

Lucas-TY avatar Lucas-TY commented on August 24, 2024 1

按照之前的步骤操作,可以训练,但是将要训练下一轮的时候出现如下错误: Epoch: [1][1340/1342] Time 396.972s (200.944s) Speed 0.0 samples/s Data 396.692s (200.649s) Loss 0.69399 (0.75016) 0%| | 0/146 [00:00<?, ?it/s]F:\Anaconda\envs\yoloair\lib\site-packages\torch\nn\functional.py:3060: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn("Default upsampling behavior when mode={} is changed " 0%| | 0/146 [00:01<?, ?it/s] Traceback (most recent call last): File "tools/train.py", line 395, in main() File "tools/train.py", line 330, in main da_segment_results,ll_segment_results,detect_results, total_loss,maps, times = validate( File "D:\YOLOP\YOLOP-main\lib\core\function.py", line 301, in validate label_det_pred = f'{names[int(cls)]} {conf:.2f}' KeyError: 35

search for nc = 1 change them to your class number

from yolop.

xinshoushangludd avatar xinshoushangludd commented on August 24, 2024

hello,I'm doing the same research.
Have you ever solved the problem?
please help me.

from yolop.

PigLogic-Cyber avatar PigLogic-Cyber commented on August 24, 2024

hello,I'm doing the same research. Have you ever solved the problem? please help me.

Try to modify the dict parameters in convert.py file, works for me, good luck, have fun : - )

from yolop.

Nanjiangang avatar Nanjiangang commented on August 24, 2024

Hello, what do you mean by “Try to modify the dict parameters in convert.py file”?
Can you tell us more about it?Thanks!

from yolop.

Nanjiangang avatar Nanjiangang commented on August 24, 2024

I set up :
model.nc=41 in train.py,
single_cls = False in bdd.py,
id_dict = {'xx':0, 'xx': 1,…… 'xx': 40} in convert.py
but still I got the error said:
Traceback (most recent call last):
File "tools/train.py", line 395, in
main()
File "tools/train.py", line 323, in main
epoch, num_batch, num_warmup, writer_dict, logger, device, rank)
File "F:\yoloppp\YOLOP-main\lib\core\function.py", line 77, in train
total_loss, head_losses = criterion(outputs, target, shapes,model)
File "D:\anaconda\envs\yolop\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "F:\yoloppp\YOLOP-main\lib\core\loss.py", line 50, in forward
total_loss, head_losses = self._forward_impl(head_fields, head_targets, shapes, model)
File "F:\yoloppp\YOLOP-main\lib\core\loss.py", line 107, in _forward_impl
t[range(n), tcls[i]] = cp
IndexError: index 26 is out of bounds for dimension 1 with size 1

from yolop.

hetao828 avatar hetao828 commented on August 24, 2024

这个是因为YOLOP.py搭建网络里面nc默认设置成了1,需要改为我们自己的nc(例如41)

from yolop.

hetao828 avatar hetao828 commented on August 24, 2024

A@OP2I}OVFQY2F 9)X~TJCV
5NQ LX1)4``GQY_NAI(X0EI

like this!

from yolop.

wangshichang-726 avatar wangshichang-726 commented on August 24, 2024

按照之前的步骤操作,可以训练,但是将要训练下一轮的时候出现如下错误:
Epoch: [1][1340/1342] Time 396.972s (200.944s) Speed 0.0 samples/s Data 396.692s (200.649s) Loss 0.69399 (0.75016)
0%| | 0/146 [00:00<?, ?it/s]F:\Anaconda\envs\yoloair\lib\site-packages\torch\nn\functional.py:3060: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
warnings.warn("Default upsampling behavior when mode={} is changed "
0%| | 0/146 [00:01<?, ?it/s]
Traceback (most recent call last):
File "tools/train.py", line 395, in
main()
File "tools/train.py", line 330, in main
da_segment_results,ll_segment_results,detect_results, total_loss,maps, times = validate(
File "D:\YOLOP\YOLOP-main\lib\core\function.py", line 301, in validate
label_det_pred = f'{names[int(cls)]} {conf:.2f}'
KeyError: 35

from yolop.

L1NINE avatar L1NINE commented on August 24, 2024

could you tell me more detail about it plz?I have no idea on where I can find nc=1 except model.nc in train.py...

from yolop.

RahulRewale avatar RahulRewale commented on August 24, 2024

I created a fork and updated the code for BDD's 13 classes. Check it out here.

from yolop.

Related Issues (20)

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.