SpectacularAI / sdk-examples

Spectacular AI SDK examples
Apache License 2.0
202 stars 35 forks source link

After processing, only one or zero image can be obtained. #112

Closed bigpo closed 8 months ago

bigpo commented 8 months ago

Thank you for developing such a great tool. I encountered some issues while converting the images, and I would appreciate your guidance. I followed the process shown in this video. Below is the workflow I used for data processing:

I recorded approximately one minute of data using Spectacular Rec and imported the data onto my computer. After installing the SpectacularAI SDK, I ran the command sai-cli process {data directory} --preview3d --key_frame_distance=0.05 {output directory}

Here is the output log:

Selected device type: ios-tof
parameterSets: ["wrapper-base", "offline-base", "ios-tof"]
{'maxMapSize': 0, 'useSlam': True, 'passthroughColorImages': True, 'keyframeDecisionDistanceThreshold': 0.05, 'icpVoxelSize': 0.05, 'mapSavePath': '/home/songpo/projects/sdk-examples/python/mapping/tmp_data/points.sparse.csv', 'maxKeypoints': 1000, 'optimizerMaxIterations': 30}

I have checked that ffmpeg is working properly, but I'm still unsure about the source of the problem. Could you please provide some guidance?

Here are the original files. https://drive.google.com/file/d/1heyIrhDXy-qnlseIzMKvaXSIB9YVk9km/view?usp=sharing

oseiskar commented 8 months ago

Thank you for reporting. Currently, the method can fail your object is too close. You should film it from a distance of at least 30 centimeters.

We will improve the error handling related to this in future versions.

oseiskar commented 8 months ago

This has been improved in the new 1.26.2 release (run pip install -U spectacularAI to update):

Another tip: On iPhone, especially with close object scans, it also makes sense to try mapping without LiDAR. This is possible by adding a --mono fla to sai-cli process, e.g.,

sai-cli process /path/to/recording_XXXX /path/to/output --mono

In any case, it is still recommended to film objects from a minimum distance of 30 centimeters