question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can't align. "Number of successfully aligned images: 0"

See original GitHub issue

I have a folder named β€œdata1” with some pictures in it, When I run

export PYTHONPATH=[...]/facenet/src
python ./src/align/align_dataset_mtcnn.py ./dataset/data1/ ./dataset/data1-aligned/ --image_size 182 --margin 44

I get

Total number of images: 0
Number of successfully aligned images: 0

data1-aligned folder is created, bounding_boxes_43723.txt and revision_info.txt are created inside that folder, the first is empty, the second one contains this text:

arguments: ./src/align/align_dataset_mtcnn.py ./dataset/data1/ ./dataset/data1-aligned/ --image_size 182 --margin 44
--------------------
tensorflow version: 1.7.0
--------------------
git hash: 096ed770f163957c1e56efa7feeb194773920f6e
--------------------

as said, no image is aligned and/or put into the created folder.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
mohammed-Emadcommented, Jun 18, 2018

Check the correct image path However, I doubt that you have a mistake in configuring your images Because he really can not see your photos

Anyhow the shape of the pictures should be this way

/dataset/data1/
β”œβ”€β”€ Colin Powell
β”‚   β”œβ”€β”€ Colin Powell_0006.png
β”‚   β”œβ”€β”€ Colin Powell_0007.png
β”‚   β”œβ”€β”€ Colin Powell_0008.png
β”‚   β”œβ”€β”€ Colin Powell_0009.png
β”‚   └── Colin Powell_0010.png
β”œβ”€β”€ Arnold_Schwarzenegger
β”‚   β”œβ”€β”€ Arnold_Schwarzenegger_0006.png
β”‚   β”œβ”€β”€ Arnold_Schwarzenegger_0007.png
β”‚   β”œβ”€β”€ Arnold_Schwarzenegger_0008.png
β”‚   β”œβ”€β”€ Arnold_Schwarzenegger_0009.png
β”‚   └── Arnold_Schwarzenegger_0010.png
β”œβ”€β”€ Lleyton Hewitt:
β”‚   β”œβ”€β”€ Lleyton Hewitt:_0006.png
β”‚   β”œβ”€β”€ Lleyton Hewitt:_0007.png
...
...etc

Also see the details of the start (align) images on here Validate-on-LFW

In the Data folder, there is a folder with the name of each person Inside each person’s folder are a set of photos of their own

The image format is important and may be different for you I do not know but I used two types of extensions and they work [.png, jpg]

But I do not think the formula has an effect because it searches for all files in all tracks This is according to this function hereget_dataset But check your files well Thanks

1reaction
clayettetcommented, Jul 13, 2018

@mohammed-Emad is right, I had the same issue and putting all my images in a class directory fixed it. If your dataset is not shaped like this you can modify it with: find . -name "*.png" -exec sh -c 'mkdir "${1%.*}" ; mv "$1" "${1%.*}" ' _ {} \; source

It basically put each image in a file named like it.

Worked fine for me!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Images in table do not align, even with cellpadding="0"
All cells have the width of the images, so we don't allow gaps between the cells. The images have inline styles with the...
Read more >
Reality Capture Alignment Settings, Tips, & Fixes
The way to fix this is to first determine which images are misaligned by using the Inspect tool (hotkey: I).
Read more >
Error in Star Alignment | PixInsight Forum
Trying to star align images of Eskimo Nebula shot with 8" f/10 SCT. The number of stars is limited but certainly there are...
Read more >
6.0 Upgrade Does Not Keep Image Alignment #41365 - GitHub
Align right works, but it does not respect images set to align center. When I update a page in 6.0 (even without changing...
Read more >
Arranging, aligning and grouping pictures - Microsoft Excel for ...
Arranging, aligning and grouping pictures in Excel - https://youtu.be/JseZkX7FpMkNeed to insert ... Your browser can't play this video.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found