![]() I can’t recommend REMBG enough, it’s awesome, and is going to be amazingly useful for digitizing specimens in the future. There’s a few dark polygons seperate from the main bone mesh, but otherwise, no background in sight, and Metashape assumed the object was floating in space. The sparse cloud had some errant points here and there: However, running the new background-removed set with the same settings, almost every single camera matched, resulting in an amazing reconstruction. If we hide the cameras, you can see that it’s just each orientation overlain, a common issue with datasets where the object moves but the background doesn’t: So what difference did it make to photogrammetry? Well, if I run the original photos – where there’s a nice contrast and patterned stone background, and the object isn’t constent – through Metashape, on high, then… The cameras have all been aligned above the bone, and instead the background has remained constant. There were some minor errors – a couple of images had a little trouble, either too much was removed or not enough: I’m genuinely shocked how well it identified the object of interest in nearly all these photos, given it’s unlikely to have been trained on an image like this. The outputted files are PNGs, which they need to be because the background is transparent, not just a solid colour. I also found slightly better results using: rembg -a -ae 15 -p It took about 10 seconds per image (26mp images), but of course it’s all automated and chuggs away in the background, so that’s fine with me. You can click the images to see them fullsize This is what a sample look like:Īnd this is the output for those exact same images: ![]() I took 300 images of an Ostrich tarsometatarsus on a rocky background, moving the bone between sets of about 50 photos. You can probably tell from the title of this post that the results were good, but how good exactly? It’ll then take all the images in the input directory, and remove the background from them, placing the new images in the output directory. Once it’s installed using pip, you just have to type into your terminal: rembg -p I do happen to have a laptop running Windows 11 developer build, and I didn’t notice any speed up or GPU usage on that, so maybe I need to have a play with how I’m installing and running REMBG.Īnyway… It’s dead easy to run. The downside here is that it looks like REMBG can be GPU accelerated, but currently WSL doesn’t support CUDA and GPU compute in production builds. However, I did get it going in Windows Subsystem for Linux. I followed the installation instructions on the github page, but could not for the life of me get it running in Windows Powershell. It’s a python tool, and it all runs from the command line. It’s available on GitHub here: GitHub – danielgatis/rembg: Rembg is a tool to remove images background. Didn't had time to test this but may be its something you want to take a look at it - El Datavizzardo July 9, 2021
0 Comments
Leave a Reply. |