Giter Club home page Giter Club logo

Comments (3)

LZHgrla avatar LZHgrla commented on August 17, 2024

Hi! @gongyan1
We use the same loss from yolov7, and do not involve seg labels.

Could you show the related code about the seg labels?

from dynamicdet.

gongyan1 avatar gongyan1 commented on August 17, 2024

@LZHgrla
Dear Lin,

Thank you for reaching out. However, when I downloaded the COCO labels mentioned in your readme, I found that they are not stored as four values of x, y, w, h as expected but rather as many values, and the number of values per line is inconsistent. Therefore, my question is, given that one txt file corresponds to one image and each line corresponds to one object, if these are bounding boxes, they should all be in the common format of class_id x y w h.

5001b5b8-9470-48a6-8325-2e9d4e6b4cd2

from dynamicdet.

LZHgrla avatar LZHgrla commented on August 17, 2024

@gongyan1
The COCO labels mentioned in our README are for downloading segmentation labels. However, during the training process, the segmentation labels will be processed into bounding box labels.

with open(lb_file, 'r') as f:
l = [x.split() for x in f.read().strip().splitlines()]
if any([len(x) > 8 for x in l]): # is segment
classes = np.array([x[0] for x in l], dtype=np.float32)
segments = [np.array(x[1:], dtype=np.float32).reshape(-1, 2) for x in l] # (cls, xy1...)
l = np.concatenate((classes.reshape(-1, 1), segments2boxes(segments)), 1) # (cls, xywh)
l = np.array(l, dtype=np.float32)
if len(l):
assert l.shape[1] == 5, 'labels require 5 columns each'

You can also directly download bounding box labels here, https://github.com/ultralytics/yolov5/releases/download/v1.0/coco2017labels.zip

from dynamicdet.

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.