alicevision / Meshroom

3D Reconstruction Software
http://alicevision.org
Other
11.21k stars 1.09k forks source link

Reconstruction fails: "Sensor width doesn't exist in the database" #179

Closed steren closed 6 years ago

steren commented 6 years ago

I get this error at the CameraInit step:

[21:11:02.213413][error] Sensor width doesn't exist in the database for image(s) : [21:11:02.214411][error] image: 'MVIMG_20180809_200420.jpg'

  • camera brand: Google
  • camera model: Pixel XL

[21:11:02.214411][error] Please add camera model(s) and sensor width(s) in the database.

Do you know how I can add to the database?

simogasp commented 6 years ago

According to your settings (using binaries or bravely building from scratch) you should have a file named cameraSensors.db. Despite the extension, it is just a plain text (csv) containing the information of different cameras/devices. The format is (semicolon is the separator):

camera brand;camera model;sensorWidth_mm

According to this https://www.devicespecifications.com/en/model/a95e3ed6 the Google Pixel XL sensor width is 6.25mm

So you just need to add the following line to your file using your preferred text editor (vim, emacs, sublime, atom, notepad, notepad++ whatever...)

Google;Google Pixel XL;6.25

possibly in alphabetical order, so after the line GE;GE X600;6.16.

steren commented 6 years ago

Thanks. Is there a way to add this data to the file itself distributed with Meshroom so that the next users do not have to do this manually? I could not find this file on GitHub

simogasp commented 6 years ago

It's in AliceVision https://github.com/alicevision/AliceVision/tree/develop/src/aliceVision/sensorDB

I will update the file with your sensor (BTW did it work?). To date, the only way to keep it updated is for people to pull request the values of missing devices. It would be nice to have a script that periodically harvests websites like https://www.digicamdb.com/ or https://www.devicespecifications.com/en where all info are stored.

steren commented 6 years ago

Thanks. I will let you know if it worked later today.

I tried to look for this file but did not find it, mainly because it does not have the same extension as the distributed file. I recommend renaming in I your repo to match the name of the distributed file. Also, I recommend adding this information somewhere in your docs.

On Fri, Aug 10, 2018, 07:51 Simone Gasparini notifications@github.com wrote:

It's in AliceVision

https://github.com/alicevision/AliceVision/tree/develop/src/aliceVision/sensorDB

I will update the file with your sensor (BTW did it work?). To date, the only way to keep it updated is for people to pull request the values of missing devices. It would be nice to have a script that periodically harvests websites like https://www.digicamdb.com/ or https://www.devicespecifications.com/en where all info are stored.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alicevision/meshroom/issues/179#issuecomment-412106585, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWBv8gDQwQ4FFjagpiU1xkGz7qxox8kks5uPZ4OgaJpZM4V3kFA .

simogasp commented 6 years ago

What's the name on your version? It has been renamed in the rush for generating the binaries and maybe there is an incongruence.

steren commented 6 years ago

Sorry, I should have been clearer: I did not find this file in the repository, thus I did not know how to send a Pull Request to this file.

On Fri, Aug 10, 2018, 08:16 Simone Gasparini notifications@github.com wrote:

What's the name on your version? It has been renamed in the rush for generating the binaries and maybe there is an incongruence.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alicevision/meshroom/issues/179#issuecomment-412114288, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWBvwPnNsJSUE_-5kTZQvR3NZCtgwEqks5uPaPpgaJpZM4V3kFA .

steren commented 6 years ago

It worked like a charm with this value. (see model)

Sarngond commented 6 years ago

I got this same error but my camera is in the db file. I don't know how to fix this. This is my error:

_[23:12:08.278957][error] Sensor width doesn't exist in the database for image(s) : [23:12:08.281958][error] image: 'DSC02752.JPG'

simogasp commented 6 years ago

@Sarngond from this page https://www.digicamdb.com/specs/sony_cybershot-dsc-hx7v/ the sensor width is 6.16 mm. So add the following line to your cameraSensor.db

Sony;Sony DSC-HX7V;6.16
Urdwex commented 6 years ago

Hi, I got the same error, the camera is already in the db file and I additionally added it to the db file.

[11:19:59.770947][error] Sensor width doesn't exist in the database for image(s) : [11:19:59.771946][error] image: '14_05.jpg'

Canon;Canon EOS 1200D;22.3

simogasp commented 6 years ago

did u add it just after Canon;Canon EOS 1000D;22.2?

Urdwex commented 6 years ago

No, I added it between.

Canon;Canon EOS 1100D;22.2
Canon;Canon EOS 1300D;22.3

It doesn't work either when adding it after Canon;Canon EOS 1000D;22.2

Sarngond commented 6 years ago

@simogasp the line is already in the code. It looks like this though: Sony;Sony Cybershot DSC HX60;6.16 Sony;Sony CyberShot DSC HX7V;6.16 Sony;Sony CyberShot DSC HX9V;6.16

simogasp commented 6 years ago

@Sarngond sorry i read your message too quickly... I guess you need to add that '-' so that the line reads

Sony;Sony CyberShot DSC-HX7V;6.16

The comparisons are case insensitive but they are not smart enough to catch these subtle variations and it really depends on each model what is written in the EXIF.

simogasp commented 6 years ago

@Urdwex I tested on AliceVision and it works fine for me with that line. Can you share just one image taken with that camera so I can test it?

Sarngond commented 6 years ago

@simogasp dsc02707

Sarngond commented 6 years ago

@simogasp I added the ' - ' to where it looks like: Sony;Sony Cybershot DSC HX60;6.16 Sony;Sony CyberShot DSC-HX7V;6.16 Sony;Sony CyberShot DSC HX9V;6.16 but it still doesn't work. Also, when you say Alicevision, you are including Meshroom right?

peter-vasut commented 6 years ago

Today I have downloaded Meshroom and I have problem with Sony DCS-HX9V. When I selected model number in Meshroom log window, I noticed bunch of spaces after model name. I inserted following line to model database:

SONY;DSC-HX9V               ;6.16

and it works. Seems like image attached above contains those spaces too. (I have also sorted lines using sort utility, just in case, but that alone won't help. I don't even know if it's necessary.)

simogasp commented 6 years ago

@Sarngond i tried with your picture and the database with the dash ('-') and it works fine... Meshroom uses AliceVision executables to run the pipeline, that's why I was talking about that. Did u build meshroom and alicevision yourself or are u using the provided binary?

simogasp commented 6 years ago

@peto2006 thanks for noticing that! @Sarngond while we try to find a solution to this problem you can try to modify the line with the spaces

Sony;Sony CyberShot DSC-HX7V               ;6.16

(I hope I inserted the exact numeber of spaces, anyway from your log you can select with the mouse the number of spaces and correct in case)

Just to have all the info, which system are you working on? Windows, Mac, linux, versions etc?

Sarngond commented 6 years ago

@simogasp I am using Windows 10. I downloaded the Meshroom zip folder. Thanks for trying to figure out my problem!

Sarngond commented 6 years ago

@simogasp @peto2006 The space trick worked for me, thanks!

Urdwex commented 6 years ago

@simogasp
x_04_

simogasp commented 6 years ago

@Urdwex can you please check in the log if there are spaces after the model, ie

[11:19:59.770947][error] Sensor width doesn't exist in the database for image(s) :
[11:19:59.771946][error] image: '14_05.jpg'
- camera brand: Canon
- camera model: Canon EOS 1200D
                               ^^^^^ are there spaces after?

As you see from the discussion above that could be the issue. in that case u can add the spaces to the line (at least for now, while we investigate and figure out the issue).

Urdwex commented 6 years ago

@simogasp there are no spaces after the model, but a whole line missing before the next log entry. Could this cause the error?

`[11:23:35.251994][error] image: 'X20.jpg'

[11:23:35.252992][error] Please add camera model(s) and sensor width(s) in the database. `

simogasp commented 6 years ago

no the empty line is always there (but we should maybe remove it from the code) As a Hail Mary (today it's her holyday after all... :-) ) you can try this anyway

 Canon;Canon EOS 1200D              ;22.2

btw, in order to have all the info, are u using the provided binary or did you build it from scratch yourself? which OS and version?

Urdwex commented 6 years ago

Still won't work. I'm using the provided binary, using Windows 10 pro version 10.0.17.134 build 17134.

After checking the Images I noticed that all 1200D images have a yellow aperture icon, that they have no intrinsic parameters. But in the information panel in the image viewer, they have Exif data.

peter-vasut commented 6 years ago

@simogasp to provide more info: I have encountered problem on Windows 10, now I'm testing on Linux Mint 18.3, I'm using Meshroom build downloaded yesterday, Version 2018.1.0, with everything bundled.

this string seems to work:

Sony;Sony CyberShot DSC-HX9V               ;6.16

also this string works:

SONY;DSC-HX9V               ;6.16

@Urdwex try restarting program after you correctly change and save cameraSensors.db. (In my case it ignored changes until restart.) If I don't have my sensor size in database, I also get yellow aperture icon, even if images contain some EXIF data. After I put my camera in database (and restart program), this icon disappears. If I put this Canon;Canon EOS 1200D;22.2 into cameraSensors.db, it properly loads your image.

Urdwex commented 6 years ago

@peto2006 I did resart the program after all the changes. After reading your strings I also tried it like this and now it works. CANON;EOS 1200D;22.2

Thank you for helping.

tobyplowy commented 6 years ago

EDIT I fixed the problem by restarting the program.

@simogasp I also have the problem, and I can't seem to get it working using what you did. I added this asus;Nexus 7;2.74 to my database but it is not working :/

Here's my tablet that I used to take the pictures. https://www.devicespecifications.com/en/model/5aac2958 The camera is bad but I do not own a good camera, I plan on buying one if this program works well.

Also I put the asus;Nexus 7;2.74 at the complete top just above Acer;Acer CE-5330;5.75 not sure if it matters.

Please if someone knows how I can get this working that would be amazing.

tobyplowy commented 6 years ago

Oh it seems to work after restarting the program, nevermind sorry.

nickdiamant commented 6 years ago

Hey everyone, I have a fix to a similar error. I had the following error:

[error] Sensor width doesn't exist in the database for image(s) :
[error] image: 'IMG_2455'

camera brand: Canon
camera model: Canon EOS Rebel T6
[21:11:02.214411][error] Please add camera model(s) and sensor width(s) in the database.

I modified the file Meshroom-2018.1.0/aliceVision/share/aliceVision/cameraSensors.db so that it had the line "Canon;Canon EOS Rebel T6;22.3" in it (in the appropriate alphabetical location), and it worked.

MuskofEphesus commented 6 years ago

I have a Canon EOS Digital Rebel XTi and adding (Canon;Canon EOS DIGITAL REBEL XTI;22.2) under (Canon;Canon EOS Rebel T6s / 760D;22.3) seems to fix the error; although I've yet to pass the FeatureExtraction phase. I'm running Meshroom with a GeForce GTX 745 (388.13) on Windows 7.

polynaught commented 6 years ago

Hi, I'd like to see the sensor width of the Motorola G5 added to the database. I cannot find it online (neither devicespecifications.com nor wikipedia state anything relevant) - the only thing one can find is the MP of the G5. G5S, G5S Plus, G5 Plus seem to use totally different CMOS... :( Any ideas where to find this data?

ChemicalXandco commented 6 years ago

@polynaught see my comment on #262

polynaught commented 6 years ago

@ChemicalXandco thx for the quick reply. I'm definitely going to use a better camera for future trips to the woods. But that calibration feature you mentioned sounds nice!

eMPee584 commented 6 years ago

Any ideas where to find this data?

There's an Android API SENSOR_INFO_PHYSICAL_SIZE; several apps displaying that info exist here on github...

natowi commented 6 years ago

@polynaught If you don´t want to wait for the next release, you can search for camera replacement parts on Aliexpress for Motorola Moto G5 and maybe a reseller like this one (you can contact the store) can give you the sensor information.

mj1911 commented 6 years ago

Natowi, good idea. I tried Meshroom with my low-end LG Tribute 5 phone on an AMD Kabini-core (open-CL) CPU on Win7x64... no go. Nothing lists the sensor size anywhere. Checked eBay for replacements; only finding no-spec ones. So researched low-cost 5MP CMOS camera sensors with similar resolutions. They had pixel-widths ranging from 1.12µm to 2.2µm... times 2592 pixels = 2.9 to 5.7mm. Assume 1% more physical. Plugged 3.5mm into the CSV file, and well, it's been running for over a day now on step 4. Total CPU time used by Meshroom: 4h 33m. Maybe this would work with a better camera, and better computer.

natowi commented 6 years ago

@mj1911 A minimum resolution of 8-10MP is recommended. Anything less will be hard to compute as you can see. You can try to add AKAZE as a Describer Type in the FeatureExtraction Node and set the Describer Preset to high or ultra.

lilithebowman commented 6 years ago

Where is the camera sensor database to contribute to on GitHub? I tried searching for the file name both in Alicevision and Meshroom repositories and found nothing. :|

cameraSensors.db is what I searched for but I only found references to it...

natowi commented 6 years ago

@eanbowman The sensordatabase.db is a copy of https://github.com/openMVG/CameraSensorSizeDatabase https://github.com/openMVG/CameraSensorSizeDatabase/wiki

It is located for this project in https://github.com/alicevision/AliceVision/tree/develop/src/aliceVision/sensorDB

AncientWire commented 6 years ago

Thank you for this post. I have a Google Pixel 2 XL.
https://www.devicespecifications.com/en/model/231a461a does not show a sensor width, so I used 6.25 that the previous Pixel has. I looked at the EXIF data from my images and found the way the phone is named, plugged all of that into the db as suggested and it worked perfectly. Thank you! Google;Pixel 2 XL;6.25

natowi commented 6 years ago

@AncientWire The Pixel 2 uses the IMX179. It has a Type 1/3.2" sensor -> ~4.5mm width.

frydzielson commented 6 years ago

I confirm that whitespaces are the reason for this issue. The easiest way to check that is to just view the file exif data and check how many spaces are there. I recommend Exif pilot or similar program for this. In windows 10 file properties white spaces are not visible.

tegbrookes commented 5 years ago

Does anyone have the correct database information for an Olympus OM-D EM-1 Mark II, please? I've tried adding the information obtained from the EXIF file, but it throws up an error (not found in the camera database). This is what I added: Olympus;E-M1markII;17.3

This is what was shown in the error message:

    - camera brand: OLYMPUS CORPORATION
    - camera model: E-M1MarkII

I have tried as many variationson this as I could think of, but none have worked. Many thanks.

natowi commented 5 years ago

@tegbrookes did you try OLYMPUS CORPORATION;E-M1MarkII;17.3 ?

tegbrookes commented 5 years ago

@tegbrookes did you try OLYMPUS CORPORATION;E-M1MarkII;17.3 ?

Hi natowi, yes we tried that, plus variations with spacing between the EM-1 and MarkII, but nothing worked.

tegbrookes commented 5 years ago

Hi natowi,

here is an example image with the EXIF data

pa041992

natowi commented 5 years ago

@tegbrookes there is some error with the EXIF data of your image. Create a copy of your image dataset, remove Exif data from your images and add OLYMPUS CORPORATION for make and E-M1MarkII for model. newexif I assume this problem is related to additional Exif-field values (lens model or camera id,...).