Comments (10)
按照之前的步骤操作,可以训练,但是将要训练下一轮的时候出现如下错误: 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.
hello,I'm doing the same research.
Have you ever solved the problem?
please help me.
from yolop.
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.
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.
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.
这个是因为YOLOP.py搭建网络里面nc默认设置成了1,需要改为我们自己的nc(例如41)
from yolop.
like this!
from yolop.
按照之前的步骤操作,可以训练,但是将要训练下一轮的时候出现如下错误:
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.
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.
I created a fork and updated the code for BDD's 13 classes. Check it out here.
from yolop.
Related Issues (20)
- Can I run on RTX 4070 ? HOT 8
- How to view image result in opencv HOT 1
- 单独训练车道线检测的话,需要如何修改代码呢 HOT 1
- How do I need to change the code to train only lane detection?
- Bug: Input is in RGB format, but augment_hsv() assumes BGR format
- Hardware question HOT 1
- Training error HOT 4
- Bug: Setting TRAIN.DET_ONLY to True updates encoder as well
- how to train the single task?
- multi task training discuss
- train 3 tasks but detection result are very bad
- bdd 100k labels
- 请问common的detect部分怎么改才有五个output #3
- How train it for single detection task on custom dataset in pascalvoc format
- Is `demo.py` supposed to work with *ONNX* models ?
- how to add cutout() in AutoDriveDataset.py ?
- 训练时随着epoch的增加,占用的内存越来越多,直到报错
- images HOT 3
- I want to detect objects of different categories
- Training error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolop.