Commit Graph
49 Commits
Author SHA1 Message Date
Frédéric DevernayandFrédéric Devernay 9a0ecb6fd7 Support equirectangular sensor with metashape (#1841)
* Document how to use equirectangular sensor with metashape

* equirectangular sensor is actually supported by nerfstudio!

* Update custom_dataset.md

* equirectangular: fix COLMAP workflow

* metashape_utils.py: black

---------

Co-authored-by: Frédéric Devernay <f-dy@users.noreply.github.com>
2023-05-01 14:44:00 -07:00
Malcolm MielleandBrent Yi 3d2e62a480 Refactor of image and video dataset conversion (#1690)
* Refactor of image and video dataset conversion

The classes to convert images and video to a NerfStudio
dataset are moved to the main repo and refactor:
* Code duplications are removed
* Import of the class is now done from nerfstudio package instead of
  scripts

* Doc formatting nits

* Doc formatting

---------

Co-authored-by: Brent Yi <yibrenth@gmail.com>
2023-04-26 10:30:01 -07:00
Jackson Waschuraandjackson-waschura 4564ade1fe Exposed number of actual frames to extract with ffmpeg for more transparency (#1683)
* Exposed number of actual frames to extract for more transparency

* Fixed off-by-one error in calculation of frames to extract.

* Added math import

* Switched print statements to CONSOLE.print

---------

Co-authored-by: jackson-waschura <jwaschur@calpoly.edu>
2023-04-01 16:29:33 -07:00
henrypearce4D 35cd06ef36 Update realitycapture_utils.py (#1663)
corrected the description from polycam data to reality capture data
2023-03-27 07:26:13 -07:00
Pythonix Huang 4145f010d2 Update pixsfm with better param (#1661)
Previous setting will easily go to oom
2023-03-26 20:33:54 -07:00
machenmusik 83d0d75635 realitycapture nerfacto variable resolution (#1651)
* allow periods within filename, not only for file extension

* don't assume all images are the same resolution

* black reformatting

* Move variable resolution collate logic into vanilla datamanager

* good catch pylint

* now that vanilla supports variable resolution, remove VariableResDataManager

* remove comment

* CONSOLE.print

* avoid `IndexError: tensors used as indices must be long, byte or bool tensors`

* use large dataset parameters for phototourism
2023-03-23 21:45:40 -04:00
machenmusik 2c79d9fe52 realitycapture: allow periods within filename, not only for file extension (#1649)
allow periods within filename, not only for file extension
2023-03-22 22:03:23 -04:00
Matt Tancik 3ec8c06e83 Cleanup 2023-03-22 14:37:05 -07:00
Jackson Waschuraandjackson-waschura c65760121f Fixed incorrect ffmpeg command construction (#1645)
Co-authored-by: jackson-waschura <jwaschur@calpoly.edu>
2023-03-21 11:48:43 -07:00
81e39cb276 improve metashape data import (#1605)
* improve metashape data import

- support multiple sensors
- support fisheye and equirectangular sensors
- support multiple components with transforms
- fix bug when image name has a '.' in it, excluding the prefix separator

* metashape_util: fix string formatting

---------

Co-authored-by: Frédéric Devernay <f-dy@users.noreply.github.com>
Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
2023-03-19 10:21:57 -07:00
Rohan MathurandMatthew Tancik ea9a066f8f Removed deprecated insta360 (#1621)
* removed insta360 and also updated equirect images docs to include cropping

* removed unused import

---------

Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
2023-03-17 12:54:45 -07:00
Matthew Tancik f58aa9348e Prevent colmap from opening (#1627) 2023-03-17 11:03:13 -07:00
Rohan Mathur 2838cfc8a5 Adding the crop code made for videos to images (#1598)
* added equirect support

* added cropping for planar image input

* random comment

* bug fix and running command

* added crop-factor to docstrings
2023-03-14 12:04:28 -07:00
Pablo Vela 630babacd6 Add option to use Pixel Perfect SFM (#1554)
add pixsfm option when using hloc
2023-03-12 16:32:33 -04:00
Jonáš Kulhánek 2b8d5a9e5c Adds ns-process-data images tests and fixes #1586 (#1591)
* Adds ns-process-data images tests and fixes #1586

* Fix missing colmap and ffmpeg in github actions
2023-03-12 00:12:14 +01:00
Jonáš Kulhánek d9a391f79a Fixed: MinimalDataParser add options, allow Nerfstudio data format to specify test indices (#1586)
* MinimalDataParser add options, allow Nerfstudio data format to specify test indices

* Switch from indices to filenames and add tests

* Fix  #1581

* Fix changed interface
2023-03-11 22:14:45 +01:00
Matthew Tancik 510188b1e6 Revert "MinimalDataParser add options, allow Nerfstudio data format to specify test indices" (#1583)
Revert "MinimalDataParser add options, allow Nerfstudio data format to specify test indices (#1541)"

This reverts commit c61d3e9387.
2023-03-10 10:23:17 -08:00
Rohan Mathur 403ab26f0c Changed percent-crop to crop-factor so it's less confusing (#1575)
* changed percent-crop arg to crop-factor so it's more clear that it's a float

* added error if crop values are less than 0 or more than 1

* added value hint and changed error to console thing

* added imports

* fixed linter issues

* refixed linter issues
2023-03-09 12:23:50 -08:00
Jonáš Kulhánek c61d3e9387 MinimalDataParser add options, allow Nerfstudio data format to specify test indices (#1541)
* MinimalDataParser add options, allow Nerfstudio data format to specify test indices

* Switch from indices to filenames and add tests
2023-03-09 19:14:24 +01:00
Rohan Mathur 982e527bee Added video cropping for equirectangular and made it independent of mask in normal videos (#1542)
* started bottom crop functionality

* first draft of cropping

* cleaned up and debugged cropping equirectangular and re added mask stuff just without percent crop

* added nonequirectangular video crop

* added left right crop for equirectangular

* shortened equirect utils

* finished regular video cropping

* removed print, added underscores, changed type to List[float]
2023-03-02 18:24:59 -08:00
Jonáš Kulhánek 7309273d92 Add support for more colmap camera models in ns-process-data (#1500)
* Add support for more colmap camera models in ns-process-data

* Fix bugs introduced in #1457
2023-02-26 18:53:08 +01:00
Matthew Tancik 3e005815cc Check that video path is correct (#1513) 2023-02-25 22:54:49 -08:00
Paul Wais 5c73766653 SFM: sfm-based depth, some breadcrumbs for pycolmap (#1457)
* save

* save

* more cleanup

* save

* save

* update phototourism

* save

* works

* works

* cleanup

* cleanup

* lint

* python3 default

* cleanup
2023-02-25 21:10:53 -08:00
Jonáš Kulhánek 7e9af33c03 ns-process-data: fix image renaming for the --skip-colmap case (#1459)
* Fix ns-process-data with skip colmap

* Fix docstring

* Fix pylint problem

* Change OrderedDict to dict
2023-02-24 20:40:52 -08:00
Matthew Tancik a3a1b1f667 Fix relative argument (#1487) 2023-02-23 09:31:24 -08:00
796fad8bcb Equirectangular input (#1446)
* started adding equirectangular to process_data

* was multiplying frame by 255 twice

* added equi2planar configs for the 3 presets

* fixed presets

* setup process data

* changed variable name and comment

* fixed middle preset

* removed third preset

* added progress bar and fixed video for equirectangular input

* fixed whitespace stuff

* added pyequilib dependencey

* Updated for JPG support for equirectangular image input

Updated process_data_utils for JPG support for equirectangular image input, since even though .jpg images worked, .JPG images (output from 360 camera software) were not working.

* changed file type matching

* added equirect utils

* added license header

* added docstring on equirect utils

* added heuristic for image size

* added heuristic for videos

* fixed linty stuff

* shortened code

* raised error if no ims in directory

* Updated ProcessVideo for fixing directories for equirectangular input

Updated the ProcessVideo for equirectangular input to make the image directory have the correct perspective projections. The original equirectangular images are copied into a temp_images folder which also holds the perspective projections. This folder is deleted once the perspective projections are copied into the process data images folder.

---------

Co-authored-by: cvachha <cyrus.vachha@yahoo.com>
Co-authored-by: cvachha <cvachha549@gmail.com>
2023-02-20 10:58:42 -08:00
Matthew Tancik e89d113ddc Fix colmap bug when not all images are matched (#1454)
Fix colmap when not 100 matching
2023-02-19 14:48:31 -08:00
Jonáš KulhánekandMatthew Tancik 2ff1d3b19e Improve ns-process-data images when using existing COLMAP model (#1371)
* Allow skipping copy+downscale of images in ns-process-data, fix bug when using --skip-colmap on images.bin with non-standard image names

* Rename flags and improve error messages

---------

Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
2023-02-07 13:08:14 -08:00
Francisca T. Gil Uretaandgilureta 2ffe4f9036 Handle uncalibrated Metashape sensor (#1359)
This fix allows loading Metashape XML files which
contain an additional uncalibrated sensor.

Metashape XML format keeps unmatched images but
assignes a dummy sensor to them. The sensor has
no calibration data.

Co-authored-by: gilureta <gilureta@amazon.com>
2023-02-06 10:22:19 -08:00
ManuConcepBrito cddf6a6569 Consistent naming for depth maps in Polycam (#1352) 2023-02-05 11:04:53 -08:00
machenmusik fad5a839aa double-quote filenames in process-data commands so that on Windows, paths with spaces don't fail (#1347)
* double-quote filenames in commands so that on Windows, paths with spaces don't fail

* reformatting by black
2023-02-03 21:01:37 -05:00
heymarcell f0c102ca58 Remove bracket from ffmpeg command's crop filter (#1294)
remove bracket from ffmpeg command's crop filter

Using bracket's in this situation causing syntax errors:
/bin/sh: 1: Syntax error: "(" unexpected
2023-01-26 14:22:14 -08:00
Dmytro KorolovandDmytro Korolov 80ae933811 Fix the issue with missing images in the Reality Capture data. (#1285)
* Fix issue with missing images in Reality Capture data

* remove comment

Co-authored-by: Dmytro Korolov <dmytro.korolov@gmail.com>
2023-01-25 17:47:15 -08:00
ManuConcepBrito 828d6bc893 Depth data loading for Polycam LiDAR data (#1253)
* Add depth data loading for polycam datasets

* misc: missing arguments in process_data_utils.downscale_images

* Move processing to polycam_utils

* delete unused imports

* process_data_utils: patch for frame%05d issue

* accidentally deleted neighbor flag from ffmpeg

* wrong ffmpeg command

* upscale directly

* redundant comment

* remove unused imports

* black formatting
2023-01-24 14:45:13 -08:00
Matthew Tancik af41819611 Add support for RealityCapture (#1055)
* Add support for RealityCapture

* Fix coordinate bug

* Remove transform

* Update focal lengths

* isort
2023-01-19 20:50:02 -08:00
machenmusik b1da94c9e6 use -noautorotate option to avoid discrepancies (fixes #1260) (#1261)
use -noautorotate option to avoid discrepancies
2023-01-19 20:54:41 -05:00
machenmusik 7466788b2e downsample all images (#1259)
CottageMiniature sample dataset was only downsampling first image correctly prior to this fix.
2023-01-19 13:02:43 -05:00
Matthew Tancik 5b50740f45 Add cropping options to data processing (#1236) 2023-01-16 15:34:20 -08:00
matsurenandMatthew Tancik 408ab709ec Fix typo (#1231)
* Fix typo COLAMP->COLMAP

* Fix more typo

Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
2023-01-16 12:12:55 -08:00
Matthew Tancik 0d6117d32c Force 8 bit output from ffmpeg (#1180)
Output 8 bit from ffmpeg video-> image conversion
2022-12-27 11:10:08 -07:00
Matthew Tancik c8daa1a1d7 Missing images error warning (#1122) 2022-12-13 13:24:22 -08:00
Matthew Tancik 7265cb63af Metashape parsing fix (#1084) 2022-12-04 16:47:52 -08:00
RandomPrototypesandRandomPrototypes 740cdebbb5 WIP : support for hloc toolbox (superpoint, superglue, netvlad,...) (#1026)
* basic support for hloc (includes netvlad, super point, superglue in colmap), just a first test, not ready yet

* add exhaustive match option for hloc

* add command line option to choose the type of feature, matcher,...

* make hloc an optional dependency, update doc, and small bug fixes

* fix missing imports

* fix warnings, pylint,...

* fix overwrite previous commits

* fix import order from isort

* move find_tool_feature_matcher_combination to process_data_utils, add type hints and Args/Returns doc

* error message when no valid combination of sfm tool, feature type, and matcher

Co-authored-by: RandomPrototypes <delmotte_ar@yahoo.fr>
2022-12-03 22:45:48 -08:00
Matthew Tancik 4f1319fde4 Fix metashape labels (#1060) 2022-11-30 12:14:11 -08:00
Matthew Tancik 7280541350 Add per frame polycam intrinsics (#1050)
Add per frame polycam intrinsincs
2022-11-28 22:24:35 -08:00
cnsumnerandMatthew Tancik 3d70b4e614 Add support for insta360 single-file format (#1024)
* Add support for insta360 single-file format

* Improve some variable names

* Add documentation for crop_percentage parameter

Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
2022-11-28 13:00:10 -08:00
Matthew Tancik 2c64ba5b6a Handle missing metashape data (#1015)
* Handle missing metashape data

* lint
2022-11-23 16:21:36 -08:00
Matthew Tancik 4065bb4733 Add Metashape support (#989)
Add metashape support
2022-11-20 14:55:41 -08:00
Matthew Tancik 532f8067fd Refactor process data (#976) 2022-11-18 09:19:44 -08:00