New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save x,y coordinates of the landmarks #5
Comments
Hello, thanks for your interest in this project!
When you download this repository, it comes with an Images_Points folder that will store whatever this program works with (if this folder gets deleted or moved, it is remade on startup). Currently, if you want to upload a points list, it must be done manually by placing a correctly named text file into Images_Points. Below is an example of an image and it's corresponding text file (with points): There is no way of doing this with the GUI currently, but since I have been slowly working on a larger update for the project, I may consider adding that to the list of things to do.
PIM automatically creates and updates text files in Images_Points as points are placed on images in the GUI, so unless I am misunderstanding what you mean, there is no need for a button like this. :) |
Hi @ddowd97, thanks a lot for your answer. I somehow missed this folder :). No, you didn't miss anything, it was exactly about getting the points out and back in, if the only thing needed is to have them in the directory and get them from there, then it's perfect. I understood that you have to manually locate the files which you want to add. |
Hi @ddowd97 once again, I have now checked it out and I have some issues with it. When you say correctly named, it does not mean (at least in my case) that the name is the same as the picture name. When I tried putting the dog picture together with the txt file into the Image_Points, it did not recognised it. I had to manually rename the file to Then I have another question. If I put two images and marked the points, only one coordinates were saved, ie. only one file was created. My feeling is that it's because of the aforementioned issue, ie. that both are created but one is being overwritten by the other since they have the same name (since the name of the image does not matter and they're the same, ie. png or jpg). Is it the case? If not, how can I load/add/export them separately? |
Hello again! Regarding your first point:When PIM creates text files for your images, it will always use the format [filename]-[extension].txt to play nicely with images that share the same filename but have different extensions. This is why Dog1.jpg is paired with Dog1-jpg.txt, for example.
If this is the case, then yes, this is unexpected behavior. Would I be wrong in assuming that your machine is named "janka" since that is a part of your GitHub username? If so, what is the OS that you are running PIM on? I have not been able to test this program on Mac/Linux for any incompatibilities or unexpected file behavior, so there may be an issue with the following line:
Regarding your second point:If you are loading two separate image sources (e.g. Dog1.jpg and Dog2.jpg), then again yes, this is unexpected behavior for what appears to be the same reason as the aforementioned issue. I will have to look more into this later today - thank you for bringing this issue to my attention. |
Following up. When this project began in early 2019 - when I was first learning Python - I wrote my own regex implementation for catching file names since I didn't know much about the os library. After two years, I believe you have identified an issue with this implemention where, if a file path contains a period before the filename, the regex will trip earlier than intended. Example: I have created a hotfixed release to hopefully correct this issue - you can find that release here. My development branch is messy right now so I can't deploy these changes to the repository, but this hotfix will be included in the next feature update and onwards. Please let me know if I hit the nail on the head with this analysis and the program works as intended for you. |
Yes, indeed you did (or at least I think so). This was on my computer at work and for some reason, we have there a folder named I will have a look, hopefully later today, and let you know. |
I have another issue, I guess very related, this time on Mac. If I load images on Mac, the corresponding files with coordinates which are created are called |
And here I thought I had a working project! ;) |
Hi, first of all, it's an amazing project of yours. I was reading your documentation and you write there that the user should be also able to upload the (x,y) coordinates of the landmark points. I have not found the option in your GUI. Is it already implemented? And more importantly, would it be possible to add a button for exporting the points into a txt file?
Thanks a lot.
The text was updated successfully, but these errors were encountered: