This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Need help developing tools for machine learning projects

Tags: None
(comma "," separated)
shussain
Registered Member
Posts
3
Karma
0
Hi,
I am currently developing some tools to aid a machine learning phd project. I am using Krita as a base to create some tools/software for my project.

Currently I am focusing on developing a kind of artistic saliency. To generate my training data I have to get an artist to sit down with krita and draw over some photographs. For each stroke the artist makes I need to record it.

So far I have done this by adding a line to KisToolFreehandHelper::paintLine and KisToolFreehandHelper::paintBezierCurve which outputs the data in the stroke strategy (see code)
Code: Select all
dbgInput << "STROKE;" << pi1.pos().x()<<";"<< pi1.pos().y()<<";"<< pi2.pos().x()<<";"<< pi2.pos().y()<<";"<<control1.x()<<";"<<control1.y()<<";"<<control2.x()<<";"<<control2.y();


This method is okay for now but I want to be able to do this "properly" as in have a docker where the user can press a button to start/stop recording and output the data to a file. Making the docker shouldn't be too complicated, I can use what is in "plugins/dockers" in the repository to figure that out. However, I don't know how I would interface with the tool to access the stroke strategy data. I was thinking that I could set a signal in KisToolFreehandHelper and connect to it in the docker plugin but I don't know how I would get access to the object or if that is possible.

In addition to extracting strokes, I will need to take in data and generate strokes on a canvas as if they were inputted by a user. I'd have to emulate the behaviour in KisToolFreehandHelper which seems quite straightforward. The data that is being provided is already smoothed so I can ignore that. I think I can get all the objects needed to be able to do this but I am not that familiar with Krita's source code.

I'd really appreciate the help with getting this done.
User avatar
TheraHedwig
KDE Developer
Posts
1794
Karma
10
OS
Weren't you before suggested to just use the tablet log, which already has shortcuts on ctrl+shift+t, and is an action that can be assigned to a qtoolbutton in a potential docker? What was wrong with this?
shussain
Registered Member
Posts
3
Karma
0
What was wrong with this?

The logger is practically useless for what I need. It provides coordinates in the window space whereas I need canvas coordinates (I have to allow the artists to be able to zoom/rotate the canvas). I did mean to reply to that response but I've been a bit caught up in things.
shussain
Registered Member
Posts
3
Karma
0
it provides coordinates in the window space

I just realised it only does this if you are just hovering. However, the smoothing and conversion to piecewise curves done by Krita is actually much more useful than the raw inputs.
lionelkrumson
Registered Member
Posts
1
Karma
0
The intricate task of data annotation can present a significant hurdle for any business, necessitating an expert touch. Fortunately, there are outsourcing services that specialize in NLP annotations, offering viable solutions. Within this realm, one service stands out, providing access to a team of accomplished NLP experts who can assist you in leveraging machine learning and guide your project every step of the way. Source: https://www.nlpannotation.com/


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]