[digikam] [Bug 376901] New: [GSOC2017]Face Recognition Algorithm Improvements

2017-02-24 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=376901

Bug ID: 376901
   Summary: [GSOC2017]Face Recognition Algorithm Improvements
   Product: digikam
   Version: unspecified
  Platform: Other
OS: Linux
Status: UNCONFIRMED
  Severity: normal
  Priority: NOR
 Component: Faces-Management
  Assignee: digikam-de...@kde.org
  Reporter: 1127553...@qq.com
  Target Milestone: ---

Hi,
I am interested in project "digiKam Face Management improvements" of GSOC2017.
I read the code about the face recognition part. I found that the algorithm is
based on opencv face recognition algorithm after reading the code of class
FacesDetector and OpenCVFaceDetector. I want to figure out what students should
do about the algorithm improvements: rewriting and improvement the face
algorithm in opencv or we have to implement other face recognition algorithm
which has a better performance?

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 372342] Face tag area is very short

2017-02-27 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=372342

Yingjie Liu <1127553...@qq.com> changed:

   What|Removed |Added

 CC||1127553...@qq.com

--- Comment #1 from Yingjie Liu <1127553...@qq.com> ---
Hi,
I spent about 1 day time compiling the code and installing it(failed to compile
on Ubuntu 15 because of exiv2 version problem, then succeeded on Ubuntu 16).
After compiled the code, I started to read it and trying to fix the bug.
This is the qt working flow about face tag input box: 
Face tag input box is object of class AssignNameWidget, when user clicked "show
face tags" Action, object of AssignNameWidget will be created by class
FaceGroup.
AssignNameWidget inherits QFrame, the input box is QLineEdit inside the QFrame.
QLineEdit can't be made multi line, so I changed the size of QFrame. The
attachment "before" shows the input box before I change the width of QFrame.
QFrame inherits QWidget, so it can use the method setFixedWidth to change its
width.
I add the code:
q->setFixedWidth(500);
in utilities\facemanagement\assignnamewidget.cpp void updateLayout()
The input box has been enlarged in width as shown in attachment "after".
There may be other solutions, I'd like to talk with you. Thanks!

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 372342] Face tag area is very short

2017-02-27 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=372342

--- Comment #2 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104253
  --> https://bugs.kde.org/attachment.cgi?id=104253&action=edit
before

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 372342] Face tag area is very short

2017-02-27 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=372342

--- Comment #3 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104254
  --> https://bugs.kde.org/attachment.cgi?id=104254&action=edit
after

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 372342] Face tag area is very short

2017-03-01 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=372342

--- Comment #5 from Yingjie Liu <1127553...@qq.com> ---
Hi,
I changed the program based on your tip.
The input box will increase by the user input, see attachment “inc1”, “inc2”,
“inc3”, “inc4”. The method is as follows:
An object of AssignNameWidget will be constructed after the user add the region
of face, and it contains an object of AddTagsComboBox. In AddTagsComboBox,
there is an AddTagsLineEdit instance “lineEdit”. When the text in lineEdit is
changed, it will emit textChanged(const QString& str), I add a slot to handle
it:
connect(this, SIGNAL(textChanged(QString)), this,
SLOT(slotTextChanged(QString)));
the slot slotTextChanged(QString) will emit another signal to AddTagsComboBox:
void AddTagsLineEdit::slotTextChanged(const QString& txt)
{
emit textEditChanged(txt);
}
The AddTagsComboBox class will catch the signal and handle it by sending
another signal to AssignNameWidget to tell it the text in lineEdit has changed:
connect(d->lineEdit, SIGNAL(textEditChanged(QString)), this,
SLOT(slotLineEditTextChanged(QString)));
void AddTagsComboBox::slotLineEditTextChanged(const QString& txt)
{
emit textEditChanged(txt);
}
In the function void AssignNameWidget::Private::setupAddTagsWidget(T* const
widget) of class AssignNameWidget it will handle the signal, I add a line of
connect in this function:
q->connect(widget, SIGNAL(textEditChanged(QString)), q,
SLOT(slotSetLineNumber(QString)));
the slot void slotSetLineNumber(const QString & str) will increase the size of
input box based on the size of str:
void AssignNameWidget::slotSetLineNumber(const QString & str)
{
int new_width = fontMetrics().width(str);
int line_width, del_width = 35;

if(d->comboBox)
{
line_width = d->comboBox->getlineWidth();
}
else if(d->lineEdit)
{
line_width = d->lineEdit->width();
}
else
{
return ;
}
if(line_width>new_width+del_width)
{
return ;
}
else
{
d->q->setFixedWidth(d->q->width()+new_width-(line_width-del_width));
}
}

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 372342] Face tag area is very short

2017-03-01 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=372342

--- Comment #7 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104294
  --> https://bugs.kde.org/attachment.cgi?id=104294&action=edit
inc2

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 372342] Face tag area is very short

2017-03-01 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=372342

--- Comment #6 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104293
  --> https://bugs.kde.org/attachment.cgi?id=104293&action=edit
inc1

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 372342] Face tag area is very short

2017-03-01 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=372342

--- Comment #8 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104295
  --> https://bugs.kde.org/attachment.cgi?id=104295&action=edit
inc3

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 372342] Face tag area is very short

2017-03-01 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=372342

--- Comment #9 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104296
  --> https://bugs.kde.org/attachment.cgi?id=104296&action=edit
inc4

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 372342] Face tag area is very short

2017-03-02 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=372342

--- Comment #11 from Yingjie Liu <1127553...@qq.com> ---
Hi,
I tested the code I add, then I find that the width of input box should change
only in the FaceItem class. While in the AssignNameOverlay class, it has to be
unchanged. So I the connect of signal textEditChanged and slot
slotSetLineNumber can only be added in FaceItem class. So I add a function void
addTagsChangeSignal() for adding the connect, and it will be invoked in
FaceItem class.
I commited the code and made a pull request to github, but I did not figure out
how to add the patch in this bug entry, should I post some files or use
different way to call a pull request?

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 372342] Face tag area is very short

2017-03-02 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=372342

--- Comment #12 from Yingjie Liu <1127553...@qq.com> ---
Oh, I know. I should use "git format-patch" to generate the patch file after I
commit, sorry for less experience. I will take care of it next time.

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 372342] Face tag area is very short

2017-03-02 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=372342

--- Comment #14 from Yingjie Liu <1127553...@qq.com> ---
Hi Gilles,
I cloned the repository from KDE server, added my code, compiled it and
committed it. However, I can't push it to the server using git. So I do as the
tutorial said:
https://techbase.kde.org/Development/Tutorials/Git/GitQuickStart#Tell_ssh_to_use_this_key
But I can't find a place in my kde account to edit the public ssh keys, so I
still can't push the code. Then I read this tutorial:
https://community.kde.org/Infrastructure/Get_a_Developer_Account#How_to_get_read-write_access_to_git.2Fsvn
As it said, I applied for the KDE developer access (uploaded the ssh keys in
applying page) and I set your name as Supporter.
Is it necessary to have the KDE developer access to push the code to server? If
so, please help my account to have the access. If not, can you tell me another
way of how to set to push the code. Thanks!
Yingjie Liu

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 372342] Face tag area is very short

2017-03-03 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=372342

--- Comment #16 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104335
  --> https://bugs.kde.org/attachment.cgi?id=104335&action=edit
local code patch for the bug

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 372342] Face tag area is very short

2017-03-05 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=372342

--- Comment #18 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104396
  --> https://bugs.kde.org/attachment.cgi?id=104396&action=edit
code modified and comment added

Hi, 
I modified the code based on your suggestion: connection signal with signal,
not through a slot. I will remember this feature.
I commented the code for readability.
If there are problems or somewhere confusing, I will explain it or change the
code.

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 351866] Make focus to input field after adding a face rectangle as an option and not by default

2017-03-06 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=351866

--- Comment #3 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104402
  --> https://bugs.kde.org/attachment.cgi?id=104402&action=edit
icon

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 351866] Make focus to input field after adding a face rectangle as an option and not by default

2017-03-06 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=351866

Yingjie Liu <1127553...@qq.com> changed:

   What|Removed |Added

 CC||1127553...@qq.com

--- Comment #2 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104401
  --> https://bugs.kde.org/attachment.cgi?id=104401&action=edit
Action added for controlling the focus in the text field

Hi,
I add a QAction in the toolbar beside the "Show Fullscreen" action, which is
shown in attachment "icon". I added a flag in FaceGroup class which can be
changed by toggling the new action. The value of the flag will be conveyed to
class AssignNameWidget, and a flag called noFocus will have the same value.
Then in function showEvent(QShowEvent* e), if noFocus is true, the function
will return with no focus in the text field.
If user click the new action, there will be no focus in the text field after he
draw a new face rectangle, as shown in attachment "no_focus".
If user click the new action again, there will be focus in the text field after
he draw a new face rectangle, as shown in attachment "has_focus".
I commented the patch for readability.
If there are more easier method, I will try it and change the code.

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 351866] Make focus to input field after adding a face rectangle as an option and not by default

2017-03-06 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=351866

--- Comment #5 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104404
  --> https://bugs.kde.org/attachment.cgi?id=104404&action=edit
has focus

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 351866] Make focus to input field after adding a face rectangle as an option and not by default

2017-03-06 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=351866

--- Comment #4 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104403
  --> https://bugs.kde.org/attachment.cgi?id=104403&action=edit
no focus

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 351866] Make focus to input field after adding a face rectangle as an option and not by default

2017-03-06 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=351866

--- Comment #7 from Yingjie Liu <1127553...@qq.com> ---
(In reply to Wolfgang Scheffner from comment #6)
> (In reply to Yingjie Liu from comment #2)
> > Created attachment 104401 [details]
> > Action added for controlling the focus in the text field
> > 
> > Hi,
> > I add a QAction in the toolbar beside the "Show Fullscreen" action, ...
> 
> Just something about usability / GUI: I don't like the idea of having that
> action in the Main Toolbar. Should be better somewhere in the Left Sidebar
> so that it disappears once you leave People View.
> 
> Wolfgang Scheffner (documenter)

Hi, Wolfgang,
I added the action in the people's view which is shown in attachment "which
region", and it will disappear when user leave people view. Do you mean that I
have to add the action in region A (which is able to add a left sidebar) I
circled in attachment "which region"? Thanks.
Yingjie Liu

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 351866] Make focus to input field after adding a face rectangle as an option and not by default

2017-03-06 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=351866

--- Comment #8 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104423
  --> https://bugs.kde.org/attachment.cgi?id=104423&action=edit
which region

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 376681] Region Coordinates Are Sometimes inf / Large Numbers

2017-03-12 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=376681

Yingjie Liu <1127553...@qq.com> changed:

   What|Removed |Added

 CC||1127553...@qq.com

--- Comment #4 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104531
  --> https://bugs.kde.org/attachment.cgi?id=104531&action=edit
The metadata did not show

Hi,
Could you please tell me how to open the metadata region in the last two
attachment which shows the parameters about the region? After draw a face
region, I clicked metadata action in the right-side bar, but I did not find the
parameters about name and other parameters, show in this attachment. (Tracking
the code is a good way, I tracked it but the code is a bit huge..)

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 376681] Region Coordinates Are Sometimes inf / Large Numbers

2017-03-15 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=376681

--- Comment #8 from Yingjie Liu <1127553...@qq.com> ---
Hi Gilles,
I set the filter as you said, click the tags filters, and turn on all in the
Views and Behavior, as shown in the Attachment "filter1" and "filter2".
Then I installed mysql for the db reading and writing.
But I met three problems.
The first is some pictures have XMP metadata (see attachment "has metadata", I
closed some filters in it, just left the useful ones), and some pictures have
no XMP and other metadata (see attachment "has no metadata").
The second problem is that the XMP metadata about face tags is unavaliable, as
shown in attachment "has metadata".
The third problem is that I installed 5.5.0 in windows, the "Last Keyword XMP"
will show the face tag's name after I draw the box and click "Album->Write
Metadata to Images", as shown in attachment "windows5.5.0 version". However, in
ubuntu, I compiled the latest code and installed the software, draw the box,
click "Album->Write Metadata to Images", the face tag's name still not shows in
"Last Keyword XMP" view, the attachment "has metadata" shows the result.

I read the method storing the metadata that you posted two days ago:

https://cgit.kde.org/digikam.git/tree/libs/dmetadata/dmetadata.cpp#n1659

This method add the metadata of "Area","Regions" and "Region List" to XMP view.
I found that the method is invoked by:

https://cgit.kde.org/digikam.git/tree/libs/fileactionmanager/metadatahub.cpp#n271

Then I debuged the program, and I found that the operations like create/modify
face tags, write/read metadata from database or write/read tags from database,
they all did not invoke the write method, therefore the setImageFacesMap can't
be executed, so the XMP view has no data.

I don't know whether I missed some configurations of the software, if so,
please indicate it for me. If there are some mistakes in my operations or I did
not see the right code, please indicate it too. Thanks.

Yingjie Liu

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 376681] Region Coordinates Are Sometimes inf / Large Numbers

2017-03-15 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=376681

--- Comment #9 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104577
  --> https://bugs.kde.org/attachment.cgi?id=104577&action=edit
filter1

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 376681] Region Coordinates Are Sometimes inf / Large Numbers

2017-03-15 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=376681

--- Comment #10 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104578
  --> https://bugs.kde.org/attachment.cgi?id=104578&action=edit
filter2

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 376681] Region Coordinates Are Sometimes inf / Large Numbers

2017-03-15 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=376681

--- Comment #11 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104579
  --> https://bugs.kde.org/attachment.cgi?id=104579&action=edit
has metadata

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 376681] Region Coordinates Are Sometimes inf / Large Numbers

2017-03-15 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=376681

--- Comment #12 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104580
  --> https://bugs.kde.org/attachment.cgi?id=104580&action=edit
has no metadata

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 376681] Region Coordinates Are Sometimes inf / Large Numbers

2017-03-15 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=376681

--- Comment #13 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104581
  --> https://bugs.kde.org/attachment.cgi?id=104581&action=edit
windows5.5.0 version

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 376681] Region Coordinates Are Sometimes inf / Large Numbers

2017-03-18 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=376681

--- Comment #16 from Yingjie Liu <1127553...@qq.com> ---
Hi Gilles,
I tested Maik's patch under Ubuntu 16.04(x64). It solves the problem of writing
metadata in image after applying face tag. The metadata shows in the right
sidebar after I clicked "Album->Write Metadata to Images".
These days, I am looking at the "Unavailable" problem: The parameters in
"Metadata Working Group Regions" such as "Area", "Name", "Region List" shows
"Unavailable" even after drawing a tag box. I think, metadata part in digikam
is a bigger part than the last two bugs(372342 and 351866). So far, I have read
the code of how to show the metadata in XMP view, includes the class
MetadataWidget, MetadataListView which showing the metadata, class SetUp,
SetupMetadata, and MetadataPanel which is created after user click the button
to setup tags filters, and these classes decide which item of metadata to show
in the MetadataWidget. Next step, I think I have to look at the code which set
the concrete parameters of "Area", "Name" and "Region List", and how they
worked. I think this will find the reason why they shows "Unavailable".

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 376681] Region Coordinates Are Sometimes inf / Large Numbers

2017-03-18 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=376681

--- Comment #18 from Yingjie Liu <1127553...@qq.com> ---
Created attachment 104631
  --> https://bugs.kde.org/attachment.cgi?id=104631&action=edit
parameters shown using exiv2

Hi Gilles,
It shows the XMP tags after using "exiv2 -px file.jpg", as you can see in this
attachment. But the parameters did not show in digikam(It is still
Unavaliable). Is it because of my OS or some other reasons

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 384401] Various recognition algorithm improvements for face detection

2017-09-06 Thread Yingjie Liu
https://bugs.kde.org/show_bug.cgi?id=384401

Yingjie Liu  changed:

   What|Removed |Added

 CC||yingjiew...@gmail.com

--- Comment #1 from Yingjie Liu  ---
Hi,
1. The face detection algorithm can not detect faces which is rotated 90
degree. I think you can rotate the picture , then detect the face, and rotate
the picture back. Since the face tag coordination is synchronized between
database and metadata, the new face tag will in the right position after rotate
the picture back.
2. The wrong face position is not remembered in metadata. So, it will be
detected again  even it is deleted.
3. There exists such situation that the same face appear more than once in a
picture. In our latest version of digiKam, face recognition accuracy can reach
99%, which means the face can be recognized truly most of time, and it won't
mistake face 'A' for face 'B'
4. This suggestion is admissible. We can add such function in dk and ask user
whether to use it after he updated a face tag.

-- 
You are receiving this mail because:
You are watching all bug changes.