Closed youngdjn closed 1 year ago
This has been fixed, but please notice, the camera label will become "100MEDIA-DJI_0001" rather than "DJI_0001"
Thank you! This works now for the example project I provided -- great!
However, I tested this for a more common use case for me -- multiple layers of nested folders -- and it didn't work (same error as before). Here is an example folder structure:
images/
├── 80m/
│ ├── n-s/
│ │ ├── card01/
│ │ │ ├── 100MEDIA/
│ │ │ │ ├── DJI_0001.jpg
│ │ │ │ └── DJI_0002.jpg
│ │ │ └── 101MEDIA/
│ │ │ ├── DJI_0001.jpg
│ │ │ └── DJI_0002.jpg
│ │ └── card02/
│ │ ├── 100MEDIA/
│ │ │ ├── DJI_0001.jpg
│ │ │ └── DJI_0002.jpg
│ │ └── 101MEDIA/
│ │ ├── DJI_0001.jpg
│ │ └── DJI_0002.jpg
│ └── e-w/
│ ├── 100MEDIA/
│ │ ├── DJI_0001.jpg
│ │ └── DJI_0002.jpg
│ └── 101MEDIA/
│ ├── DJI_0001.jpg
│ └── DJI_0002.jpg
└── 120m/
├── 100MEDIA/
│ ├── DJI_0001.jpg
│ └── DJI_0002.jpg
└── 101MEDIA/
├── DJI_0001.jpg
└── DJI_0002.jpg
To reproduce it, you can use this example metashape project file (which is based on this image set).
If you have time, I wonder if you would consider updating the method to tolerate an arbitrary level of nesting (or at least 5 levels).
Actually, what I did for this fix, it just supported an extra layer about the "camera group" in the metashape (the previous version did not support camera group)
project without camera group | project with camera group |
```xml
|
```xml
|
the EasyIDP package doesn't care about how the raw image folder is structured, it just read the path data stored in metashape project (*.files/chunk_id/frame.zip/doc.xml
).
<?xml version="1.0" encoding="UTF-8"?>
<frame version="1.2.0">
<cameras>
<camera camera_id="0">
<photo path="../../../../../../tnc-yuba-2021/example-nested-folders/80m/e-w/card01/100MEDIA/DJI_0001.JPG">
And parse the relative path to absolute path.
The reason why you got the "same" (actually not exactly the same) error is that in your given project:
The camera-group name and image name are duplicated, hence the later image label will overwrite the previous image label, and cause the image-id not matching the total number.
In this 211f185 updates, I handled such case, if the project has the duplicated camera-group name, it will return the label like [0]100MEDIA-DJI_0001
Hoping this fix helps for your project.
Thank you! This works now and it allows me to process my projects. I really appreciate you building in this tolerance for nested folder structures.
Most of my photogrammetry (Metashape) projects involve processing photos that are nested within subfolders; for example:
But when I try to load such a Metashape project in EasyIDP, I get:
IndexError: Index [0] out of range (0, 0)
.To reproduce it, you can download this example metashape project file (which is based on this image set) and run:
The full error returned is:
The error occurs even if the photo file names are not duplicated across the folders (which is true of the example I ran and linked to here). Ideally, EasyIDP would tolerate multiple subfolders and an arbitrary folder nesting depth (at least to 5 levels).