Comments (22)
So, for those who have similar questions, footage processing pipeline:
-
Create new project in COLMAP
-
Start autoreconstruction
and go watch film or something -
run colmap2adop tool:
./build/bin/colmap2adop --sparse_dir <sparse/0 in your project folder> --image_dir <your original footage dir> --point_cloud_file <find fused.ply in your project folder> --scale_intrinsics 1 --render_scale 1 --output_path <ADOP dir>/scenes/<your scene name>
-
Note, that you want to set render_scale to <1 to fit images to gpu memory, but value depends on initial images scale and your gpu
-
@darglein could you explain what scale_intrinsics does, please
-
you can train ADOP on your data now!
from adop.
So the .ply point cloud from COLMAP does not have normals?
from adop.
It doesn't
from adop.
This is weird. The dense point cloud from COLMAP does usually have normals. Do you run an old version maybe? Or did you export the sparse point cloud by accident?
from adop.
I installed it literally yesterday from the last release in their github (So don't be surprized about stupid questions)
I did Undistortion, Stereo, Fusion steps in Dense reconstruction window, and chose latest model, so it should be dense model, right?
from adop.
I opened fused.ply and it contains nx, ny, nz values it looks like normals, but previous time I tried to set point_cloud_file in comap2adop to fusion result it went to endless loop
from adop.
Yes fused.ply
is the correct file you should use. What do you mean by endless loop? At which point does it get stuck? For large point clouds colmap2adop converter can take a few minutes to complete.
from adop.
At removing duplicate points
ADOP/src/lib/data/SceneData.cpp
Line 80 in 51fbf9e
I waited for more than 30 mins... I tried to run it on some of example scenes and it really took minute or so. So I thought I use wrong file.
I'll try with my new cloud, then.
from adop.
UPD: fixed it by passing path to original images directory to --image_dir.
I found this in output of colmap2adop:
Num Point3D 68762
Num = [116]
Min,Max = [-nan,-nan]
Mean,Median,Rms = [-nan,-nan,-nan]
sdev,var = [-nan,-nan]
dynamic range: -nan
Is it ok?
from adop.
So, now the problem is that for some reason RemoveDoubles function takes a lot more time than on example scenes.
It also worth noting that my scene is 5 times smaller than yours.
from adop.
I would like to take a look at your fused.ply
point cloud and see why preprocessing it takes so long. Can you upload it somewhere and send me the link?
from adop.
UPD: fixed it by passing path to original images directory to --image_dir.
I found this in output of colmap2adop:
Num Point3D 68762 Num = [116] Min,Max = [-nan,-nan] Mean,Median,Rms = [-nan,-nan,-nan] sdev,var = [-nan,-nan] dynamic range: -nan
Is it ok?
Thanks for pointing that out. This was a bug and is now fixed in the latest commit.
from adop.
In meantime, in UnifiedMesh.cpp, in RemoveDoubles function I printed the size of vector, returned from RadiusSearch.
It is equal to 272339 sometimes, so I guess it causes O(n^2) complexity.
https://github.com/darglein/saiga/blob/0d6d033bf88a01ca674c15fb5907d6f5346fa12e/src/saiga/core/model/UnifiedMesh.cpp#L439-L484
from adop.
I made a work-around for this issue. I'd ask you to check that I haven't broken anything 👀
std::vector<int> to_merge(NumVertices());
std::vector<bool> processed(NumVertices(), false);
std::vector<int> to_erase;
std::vector<int> valid(NumVertices(), 0);
KDTree<3, vec3> tree(position);
for (int i = 0; i < position.size(); ++i)
{
if (processed[i]) {
continue;
}
auto ps = tree.RadiusSearch(position[i], distance);
bool found = false;
to_merge[i] = i;
for (auto pi : ps)
{
if (valid[pi])
{
to_erase.push_back(i);
to_merge[i] = pi;
found = true;
break;
}
}
if (!found)
{
valid[i] = true;
// all points in radius will find that point i is valid and do the same
for (auto pi : ps)
{
if (!processed[pi] && pi != i) {
to_erase.push_back(pi);
to_merge[pi] = i;
processed[pi] = true;
}
}
}
processed[i] = true;
}
It is quite strange that from 1955964 points I get 23659, but there really might be a lot of duplicates
from adop.
It looks like remove doubles
is not broken.
The problem is that Assimp is not able to load your point cloud correctly. A simple workaround for now is to open the pointcloud with meshlab and select File -> export mesh -> Select Color, Normal, Binary Encoding -> Ok
After that Assimp is able to read it correctly.
I have added some debug checks in this commit f360201 to ensure the input point cloud is read correctly.
from adop.
Great thanks! It finally works, I managed to start training 😎
from adop.
@DenShlk Thanks for the instructions. I will add this those to the readme once all bugs are fixed.
I have just updated to use the latest saiga+assimp version a1f0219. @DenShlk could you please check if colmap2adop
can process the raw COLMAP point cloud now?
(make sure to do a recursive submodule update after the pull)
scale_intrinsics
is another way to increase training speed and reduce memory consumption. Let's say COLMAP was run on 2000x1000 images then the intrinsic parameters from colmap fit to this image size. If you set scale_intrinsics=0.5
then the intrinsic parameters will be scaled to fit images of 1000x500. Therefore you also have to downscale the images by a factor of 2 and then pass the downscaled images to colmap2adop
. In some cases this is better than render_scale
because the DataLoader has to read less bytes from disk and needs to do less processing.
from adop.
Hi! Sorry for delay.
@DenShlk could you please check if
colmap2adop
can process the raw COLMAP point cloud now?
I checked it, it works perfectly. Thanks!
I'd also asked you to consider using optimization for RemoveDuplicates
function I suggested above, because at the moment computing time of it depends on how close are points relatively to distance
parameter. (e.g. if you pass distance=1000
so almost all points should be deleted, it will do number_of_points^2
steps).
from adop.
Hi! I try to build my scenes with COLMAP,but when i run colmap2adop,it said "Assertion 'std::filesystem::exists(img_file)' failed!"
but i check the path,the image files are existence,and the path is also correct,how can i solve this problem?
from adop.
The converter did not find images.bin
in the sparse directory. Please check if this file exists on your provided path.
from adop.
the images.bin is exsist in the sparse directory,but i copy the image directory and sparse directory from another computer,does this matter ?
from adop.
I find it was caused by a Wrong file organization,thank you !
from adop.
Related Issues (20)
- doubt about the point cloud in demo video HOT 3
- failed to build with ffmpeg in Ubuntu 18.04
- updated src/readme HOT 1
- Can not train
- Train issue: point_cloud_cuda->t_normal.defined()
- Silent Crash without EXIF Data HOT 2
- Update src/Readme with system requirements
- Training and inference script in python
- install pytorch source
- make -j10 Failed
- ./install_pytorch.sh这条命令,在源码中没有install_pytorch.sh,怎么进行?
- python setup.py install gives us an error
- modelsimpl.h compability issue HOT 1
- fail to run ./build/bin/adop_viewer --scene_dir scenes/boat HOT 1
- can't move in vr_viewer using oculus quest 2 HOT 1
- How to use the mask function?
- exception_handler.cc
- `GLIBCXX_3.4.30' not found HOT 2
- Loading images failed
- If you REALLY want to run this code HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adop.