SkalskiP / make-sense

Free to use online tool for labelling photos. https://makesense.ai
GNU General Public License v3.0
3.12k stars 514 forks source link

YOLO export doesn't include label file #330

Open lawrencehook opened 1 year ago

lawrencehook commented 1 year ago

Great tool, thanks for making it!

I'd like to save my annotations by exporting then importing again later. However the YOLO zip export doesn't include a labels.txt file which is required when importing annotations.

github-actions[bot] commented 1 year ago

👋 Hello @lawrencehook, thank you for your interest in make-sense - free to use online tool for labelling photos! 🏷️

🐞 Bug reports

If you noticed that make-sense is not working properly, please provide us with as much information as possible. To make your life easier, we have prepared a bug report template containing all the relevant details. We know, we ask for a lot... However, please believe that knowing all that extra information - like the type of browser you use or the version of node you have installed - really helps us to solve your problems faster and more efficiently. 😉

💬 Get in touch

If you've been trying to contact us but for some reason we haven't responded to your issue yet, don't hesitate to get back to us on Gitter or Twitter.

💻 Local setup

# clone repository
git clone https://github.com/SkalskiP/make-sense.git

# navigate to main dir
cd make-sense

# install dependencies
npm install

# serve with hot reload at localhost:3000
npm start

To ensure proper functionality of the application locally, an npm 8.x.x and node.js v16.x.x versions are required. More information about this problem is available in the #16 issue.

Devaryalakhanpal commented 11 months ago

You can export the .csv file and write a code which reads the label_names column unique names to get a label.txt file

iDeaLMine commented 1 month ago

/make-sense/src/logic/export/RectLabelsExporter.ts you can change this method like this: public static wrapRectLabelIntoYOLO(labelRect: LabelRect, labelNames: LabelName[], imageSize: ISize): string { const snapAndFix = (value: number) => NumberUtil.snapValueToRange(value,0, 1).toFixed(6) const labelName = findLast(labelNames, { id: labelRect.labelId }).name; const classIdx: string = findIndex(labelNames, {id: labelRect.labelId}).toString() ... .... return [classIdx, ...processedBBox].join(' ') } then you can return [labelName, ...processedBBox].join(' ')

when you use labels ,need convert labelName to classId