User talk:Lucas Werkmeister/Wikidata Image Positions

From Wikidata
Jump to navigation Jump to search

Two objects of same type[edit]

On Portrait of a Woman with a Squirrel (Q17335769), only one of the two earrings is detected. This is a great tool, nonetheless. Thank you! Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 21:11, 21 October 2018 (UTC)

@Pigsonthewing: ah, I see. If it was two separate statements (same value, different qualifiers), I think the tool would pick them up correctly… do you know if this way of modeling (multiple relative position within image (P2677) qualifiers + quantity (P1114)) is common? --Lucas Werkmeister (talk) 11:08, 23 October 2018 (UTC)
I don't, but I can't see any reason why it's not valid. Consider an item which has the quantity as a qualifier, but not the position values; I believe that method may be common. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 11:17, 23 October 2018 (UTC)

Ease of area selection[edit]

Thank you for adding editing capability.

I tied using that functionality today, using a trackpad, and found it hard to be precise; especially where the image was large enough to require vertical scrolling.

Compare this tool with the crop tool on Commons, where one can drag edges and review the selection, before committing an edit (or even before selecting "preview", which would be unnecessary here). Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 21:58, 23 October 2018 (UTC)

@Pigsonthewing: at long last, I’ve implemented this (using the same library as CropTool), if you’re still interested :) --Lucas Werkmeister (talk) 22:50, 25 October 2019 (UTC)
That's great; thank you! Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 12:42, 26 October 2019 (UTC)

Restrict to images[edit]

Would it be possible to restrict this tool to 2-d items? I keep finding cases [1][2][3] where it is being used to describe the location of items depicted in an arbitrary photo of a 3-d item. See also Property_talk:P2677#Use_on_3-d_art. Cheers, Bovlb (talk) 18:41, 13 March 2019 (UTC)

@Bovlb: I agree that’s a misuse of the property (that kind of information belongs on the individual file, using Structured Data on Commons), but I don’t really see what I can do about that in this tool, to be honest. --Lucas Werkmeister (talk) 21:05, 13 March 2019 (UTC)
Yes, I see your problem. The ontology does not distinguish well between 2-d and 3-d objects. Neither does the image property distinguish between arbitrarily composed images and canonical images. If I might suggest, perhaps if the tool showed the description and type (P31) of the item, then people might be less likely to confuse, say, a statue with a photograph of a statue. Cheers, Bovlb (talk) 23:51, 13 March 2019 (UTC)
@Bovlb: Isn’t it pretty obvious when you’re looking at a photograph of a statue? I feel like the issue here isn’t confusion about the type of an item, but about where relative position within image (P2677) is and isn’t appropriate to use. (Or are there really items for individual photograph of statues, where relative position within image (P2677) is appropriate again?) --Lucas Werkmeister (talk) 12:56, 16 March 2019 (UTC)
Yes, you're right. I am sure there are reified photographs, but it must be rare. (Uh, there seem to be about 20k.) You could preclude self-depiction. (No instances of droste effect (Q1766263).) Maybe, as you say, the best solution is to educate users. I think it is more a problem of knowing when depicts (P180) is appropriate before we get to relative position within image (P2677). Bovlb (talk) 17:43, 16 March 2019 (UTC)

Support for has part[edit]

Would it be possible to add support for the property "has part", in addition to "depicts"? I'd like to show that this biological pathway diagram includes the gene CD19, but the Wikidata entry uses "has part" instead of "depicts".  – The preceding unsigned comment was added by Ariutta (talk • contribs) at 21:49, 14 October 2019‎ (UTC).

@Ariutta: Hm, doesn’t that kind of information belong on the image (in Structured Data on Commons), rather than in Wikidata? Overview of leukocyte-intrinsic Hippo pathway functions (Q66104607) could also be represented by a differently arranged image, I would assume. --Lucas Werkmeister (talk) 22:03, 14 October 2019 (UTC)
Fair point. Have you seen a way to visualize the Structured Data on Commons? --Ariutta (talk) 22:05, 14 October 2019 (UTC)
@Ariutta: sorry for the late reply, I didn’t to give away my present too early :D but you can now annotate images on Commons using the same tool! --Lucas Werkmeister (talk) 22:49, 25 October 2019 (UTC)
@Lucas Werkmeister: That's awesome! Thank you for the present! :-) --Ariutta (talk) 18:44, 28 October 2019 (UTC)

WM Commons Notes/Annotations vs. Wikidata Image Positions[edit]

I started this discussion at WM Commons regarding the relationship between the Notes/Annotations tool and the Wikidata Image Positions tool. I'd support augmenting or replacing the Notes/Annotations tool with the Wikidata Image Positions tool. --Ariutta (talk) 18:55, 28 October 2019 (UTC)

500 server error[edit]

Hi @Lucas Werkmeister:. I have a small team of volunteers using this awesome tool to work through about 10k of our images but im getting reports of occasional errors when confirming a tag. I'm sure if this is down to the tool or servers but thought i would let you know. The error message is as follows.

500 internal servor error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application

Thanks! Jason.nlw (talk) 09:28, 7 February 2020 (UTC)

@Jason.nlw: As far as I can tell from the logs, that happened when files were requested that didn’t exist. That should be handled better now – thanks! --Lucas Werkmeister (talk) 14:30, 21 March 2020 (UTC)

rotated image[edit]

@Lucas Werkmeister: I'd like use this tool for commons:File:Stolpersteine Familie Hirsch.jpg. The photo is rotated through its meta data. The Wikidata Image Positions tool displays it this way correctly oriented until the mode of selecting a region is entered the frame stays correctly oriented, the image gets rotated back to its original orientation without adhering the meta data, so that it fits the frame with a correct aspect ratio, so empty space above and below the photo starts to appear. The selected region however does not get rotated, but stretched as if only the aspect ratio had changed by a power of minus one. Is this an expected behavior and if so, why? -- CamelCaseNick (talk) 18:27, 22 March 2020 (UTC)

@CamelCaseNick: Thanks for the report – hopefully this should be fixed now (you may have to force-reload the page), can you try it out? (By the way, pings only send a notification if a signature is added in the same edit, so I only found this through my watchlist – sorry for the slightly delayed response.) --Lucas Werkmeister (talk) 14:28, 28 March 2020 (UTC)
@Lucas Werkmeister: Thanks! I've tried it out. The image is rotated correctly now, but the positions are distorted as if scaled by a factor of the aspect ratio along the height axis. (And thanks for the info about pinging, that might explain some things for me now.) --CamelCaseNick (talk) 17:05, 28 March 2020 (UTC)
@CamelCaseNick: Right, that should be fixed as well now (might need another force-reload), sorry about that :) --Lucas Werkmeister (talk) 20:49, 28 March 2020 (UTC)

user script not loading in foreground[edit]

@Lucas Werkmeister: Your user script seems to not run properly when the File tab is in the foreground. I cannot see any modifications made to the DOM. If I open it in the background it works. I suspect that wikibase.entityPage.entityLoaded might not be fired, after the user script registered its handler? It's just my intuition and I haven't had worked with user scripts before (other than using them) and I couldn't find anything to check whether the wikibase entity was loaded and to access it, to verify this idea. Do you know anything about this? -- CamelCaseNick (talk) 00:19, 18 April 2020 (UTC)

@CamelCaseNick: That’s strange, it works for me in Firefox and Chromium (I’m testing on commons:File:CSD Berlin 2019 - Lucas Werkmeister - 24 - Bi, Pan, Ace Flags.jpg). Which browser do you use? Are there any errors in the console? --Lucas Werkmeister (talk) 18:26, 18 April 2020 (UTC)
@Lucas Werkmeister: I am using a Firefox 75.0 with Minerva Neue. After looking into it: The DOM gets manipulated actually. The first child for me is an <a>. That's only this way with Minerva Neue. I assume you are using Vector. There apparently it works. The first child is a bit different, when I have it in the background though, then the anchor is surrounded by <div style="float: left; width: 799px; position: relative;"><div style="position: relative; width: 799px;">HERE THE LINK WITH THE IMAGE AND THE DEPICTION DIVs</div></div><div style="clear: left;"></div>. It works in Vector and Timeless, but not in Minerva Neue, unless it is in the background. I cannot make sense of this. Do you know, how the anchor gets embedded into the divs? Looking into the original HTML served, those are not there. Maybe there's a script interfering with it only in Minerva Neue. --CamelCaseNick (talk) 20:16, 18 April 2020 (UTC)
@CamelCaseNick: Oh, right… those <div> surrounding the file are added by ImageAnnotator, and without them, the areas which the user script adds aren’t positioned correctly. (They’re still there in the DOM, but without an appropriate relatively-positioned parent, their position is all wrong.) I guess ImageAnnotator isn’t loaded on Minerva :/ --Lucas Werkmeister (talk) 20:34, 18 April 2020 (UTC)
Yes, thanks. I had mistakenly assumed your DOM manipulations didn't work, because they looked differently, and that is not far from the truth, it's just the wrong DOM manipulation, that does not work. Sorry, for bothering you with a problem, that's somewhere else. --CamelCaseNick (talk) 20:43, 18 April 2020 (UTC)
Well, the bug report is valid, ideally the script would work in Minerva… I’m just not sure how to do that. (It wouldn’t be terribly hard to add the wrapping divs myself, but I think if I do that before ImageAnnotator loads then the end result will be broken, so I need to distinguish between “ImageAnnotator hasn’t loaded yet” and “ImageAnnotator will never load”.) I’ve documented the restriction for now :/ --Lucas Werkmeister (talk) 20:48, 18 April 2020 (UTC)

Widget for Wikimedia Commons[edit]

I find this tool very cool. I've created a small JS widget for Commons which create a direct link in the sidebox of the Timeless interface to annotate a file : Commons:User:PAC2/Rock your side box. This is very experimental but I hope it may be useful, at least for my ;). --PAC2 (talk) 05:36, 30 May 2020 (UTC)

@PAC2: Hm, are you aware of this user script (documented here)? As far as I can tell, it serves the same purpose (plus additional features), except that it places the link elsewhere, as a button below the image. --Lucas Werkmeister (talk) 14:11, 7 June 2020 (UTC)
oh it's great. Thank you - - PAC2 (talk) 06:19, 8 June 2020 (UTC)