Giter Club home page Giter Club logo

Comments (10)

leJson avatar leJson commented on August 17, 2024

感觉有点像没有加载对labels文件,所以没法去计算loss,你可以看看有没有加载到对应图片的labels文件

from yolov3-network-slimming.

liaoyunkun avatar liaoyunkun commented on August 17, 2024

@leJson 你是在Pascal Voc上跑这个吗?

from yolov3-network-slimming.

leJson avatar leJson commented on August 17, 2024

@leJson 你是在Pascal Voc上跑这个吗?

我跑的自己的数据,

from yolov3-network-slimming.

PiseyYou avatar PiseyYou commented on August 17, 2024

result = self.forward(*input, **kwargs)
File "/ext_data/anaconda3_before/envs/yolo/yolov3-network-slimming/yolomodel.py", line 130, in forward
loss_cls = (1 / nB) * self.ce_loss(pred_cls[mask], torch.argmax(tcls[mask], 1))
RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity

The same error happen, the original use coco dataset, run in ubuntu 16.04

have you already solve the issue?@caesar-yabo

from yolov3-network-slimming.

leJson avatar leJson commented on August 17, 2024

result = self.forward(*input, **kwargs)
File "/ext_data/anaconda3_before/envs/yolo/yolov3-network-slimming/yolomodel.py", line 130, in forward
loss_cls = (1 / nB) * self.ce_loss(pred_cls[mask], torch.argmax(tcls[mask], 1))
RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity

The same error happen, the original use coco dataset, run in ubuntu 16.04

have you already solve the issue?@caesar-yabo

楼上有答案的,你仔细看看,是不是加载图像的时候路径错了.这个报错一般是没加载到数据

from yolov3-network-slimming.

PiseyYou avatar PiseyYou commented on August 17, 2024

@leJson Thanks a lot, I solve the issue, the key point is put folder "images" and "label" at the same folder. The folder path as below:
This make clear how to solver the label issue.

.
├── 5k.part
├── 5k.txt
├── images
│   ├── train2014
│   ├── val2014
├── labels
│   ├── train2014
│   └── val2014

from yolov3-network-slimming.

Yapths avatar Yapths commented on August 17, 2024

@leJson Thanks a lot, I solve the issue, the key point is put folder "images" and "label" at the same folder. The folder path as below:
This make clear how to solver the label issue.

.
├── 5k.part
├── 5k.txt
├── images
│   ├── train2014
│   ├── val2014
├── labels
│   ├── train2014
│   └── val2014

Can you show us the VOC data? thanks

from yolov3-network-slimming.

PiseyYou avatar PiseyYou commented on August 17, 2024

I was doing the task for test coco, not VOC right now, after check this, I will these test later. As I get the information, the key point to deal with VOC data is you need to change the parse_config.py. In the code, you need to change "images" to "JPEGImages"

line 41 : (self.label_files = [path.replace('JPEGImages', 'labels').replace('.png', ........)

if this is not working, modify utils/datasets.py,‘images’ to ‘’JPEGImages is suggetion.
I don't test yet, but the information you can have a try.

from yolov3-network-slimming.

Yapths avatar Yapths commented on August 17, 2024

I have ignored parse_config.py ,thanks for your information

from yolov3-network-slimming.

Yapths avatar Yapths commented on August 17, 2024

I was doing the task for test coco, not VOC right now, after check this, I will these test later. As I get the information, the key point to deal with VOC data is you need to change the parse_config.py. In the code, you need to change "images" to "JPEGImages"

line 41 : (self.label_files = [path.replace('JPEGImages', 'labels').replace('.png', ........)

if this is not working, modify utils/datasets.py,‘images’ to ‘’JPEGImages is suggetion.
I don't test yet, but the information you can have a try.

Thanks for your information!I have solved the problem!The labels data is not loaded in!you should check your parse_config.py to see if it has loaded your labels。

from yolov3-network-slimming.

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.