Commit Graph
73 Commits
Author SHA1 Message Date
Justin Kerr 5de83ac50a Circle crop to images processing pipeline (#2341)
add circle crop to images data processing pipeline
2023-08-15 14:32:44 +09:00
Frederik WarburgandEthan Weber 9b03299d40 Train and eval data splits (Nerfbusters) (#2207)
* nerfbusters dataparser

* nerfbuster dataparser and visualization of eval views

* resolved some errors from  pyright

* enable ns-process-data to take two videos as input and use one for eval and the other for train

* resolve some pyright issues

* instead of data being a tuple, I added eval_data as another argument

* implemented train eval split for all cases

* implemented train eval split for all cases

* reverting equi changes

* reverting reality capture changes

* raise valueerror

* revert comment

* added split override code back to dataparser

* reverted one change

* using image border now

* adding docs

---------

Co-authored-by: Ethan Weber <eweb0124@gmail.com>
2023-08-04 10:11:55 -04:00
machenmusik 388fcb09e1 convert raw to JPG not TIFF, to avoid fast-downscale ffmpeg error (#2295) 2023-08-02 09:44:35 -07:00
machenmusik 5b4abc41e6 Allow same dimensions optimizations to be disabled (#2292)
Use ns-process-data images --no-same-dimensions ... to handle images sets with different dimensions properly.  (Fast downscaling assumes image dimensions are the same.)
2023-08-01 23:35:27 -07:00
Sebastiaan 6329f53a5c Remove superfluous -r1 (fix ffmpeg/colmap video) (#2231) 2023-07-14 10:32:58 -07:00
machenmusikandSebastiaan Meijer 91291bc52c Fast downscaling for video and image processing (PR2168 plus images) (#2213)
* Merge video image extraction and downscaling

* Linting

* Fix extracting all frames, only apply vfr when thumnailing

* integrate downscale chains into image processing

* fast polycam upscale/downscale depth

* black

* black

* Update process_data_utils.py

Remove code change from other branch.

* use same suffix for downscale, don't force png

* black

---------

Co-authored-by: Sebastiaan Meijer <seb@stiaan.io>
2023-07-13 18:54:19 -04:00
machenmusik 49a4be635d Fix colmap vocab_tree_path (#2195) to work with Windows (#2204)
* Fix colmap vocab_tree_path to work with Windows

* black
2023-07-12 07:03:23 -07:00
Jan-Niklas Dihlmann 904e1352d9 Fixing Colmap VocabTreeMatching command to support spaces in Filename (#2195)
fix: colmap vocab tree file path error
2023-07-11 07:51:03 -07:00
machenmusikandMatias Turkulainen d78af5b569 allow ns-process-data to use CR2 raw images (#2119)
* allow ns-process-data to use CR2 raw images

* Update process_data_utils.py

* black wants an extra newline

---------

Co-authored-by: Matias Turkulainen <30566358+maturk@users.noreply.github.com>
2023-06-27 16:02:58 -04:00
olegpokhilchenko ef1350bd36 Fix get_num_frames_in_video (#2090)
* Fix get_num_frames_in_video

* Make sure that there is a number

* Fix output[0]
2023-06-23 08:38:16 -07:00
b747db6877 Fixing the image_dir if using skip_image_processing (#2111)
Co-authored-by: khoa <tuankhoanguyen94@gmail.com>
Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
2023-06-21 12:24:55 -04:00
Matthew Tancik 7859f19f50 Fix data downscale paths (#2071)
* Fix data downscale paths

* ruff

* format

* Update process_data_utils.py
2023-06-16 11:40:12 -07:00
henrypearce4D d01fef7650 Fix metashape multiple camera models error message (#2057)
Reverted back to the original error message with some extra clarification added.

cc #2011
2023-06-09 15:09:13 -07:00
Matias Turkulainen d4b04376ab Fix bug when copying images when input_dir = output_dir (#2041)
* fixes bug input_dir == output_dir

* reformat
2023-06-07 10:22:10 -07:00
henrypearce4D 293d8f3811 Update metashape_utils.py (#2011)
Changed the ValueError message when using a camera.xml that contains multiple sensors. Per-frame intrinsics can be defined, the previous message said that they were not supported.
2023-06-01 23:44:08 -07:00
Milan van Wouden d413ca4204 fix large number of typos in repository (#1977)
* fix large number of typos in repository

* fix typos in tests
2023-05-23 10:41:49 -07:00
Matthew TancikandBrent Yi 2b0831b6d4 Final typing fixes + add Pyright to CI (#1944)
* knocking out a couple

* Fix more errors

* Add pyright

* Remove some unnecessary cv2 type ignores, warning on missing imports
(for missing tinycudann)

* Minor annotation fixes

* Update docs

* Drop `None` from temporal distortion output

---------

Co-authored-by: Brent Yi <yibrenth@gmail.com>
2023-05-18 02:25:34 -07:00
Brent YiandMatt Tancik d542646c72 Switch to ruff (#1939)
* `isort` -> `ruff`

* `pylint` -> `ruff`

* Remove line

* More minor cleanup

* Better documentation for rules we are enabling

* Fix gitignore, run black

* vscode settings

---------

Co-authored-by: Matt Tancik <mattt4001@gmail.com>
2023-05-17 10:08:14 -07:00
Brent Yi 814db32ec4 More typing fixes (#1941)
* Fix more types

* Fix tests

* Minor cleaning

* Address comments

* Resolve linting errors

* Re-ignore pymeshlab type

* Add extra assert / error message to mipnerf model
2023-05-17 07:17:40 -07:00
Ethan Weber 13e0fce122 Update copyright (#1917)
* updated copyright

* including txt file

* updated black

* removing license

* fixing license
2023-05-12 16:16:13 -07:00
Matthew Tancik 4242a3c982 Make rich console global (#1916) 2023-05-12 14:20:40 -07:00
Aman Salykov 79b06ee2bf fix metashape_to_json() if there is no 'components' tag in .xml (#1906)
fix metashape_to_json() if no 'components' in .xml
2023-05-10 14:50:48 -07:00
Brent Yi 63c6303736 Bump minimum Python version to 3.8 (#1876)
* Bump minimum Python version to 3.8

* typing_extensions.Literal -> typing.Literal

* ns-dev-test

* typing_extensions.get_args => typing.get_args

* Format with older version of black

* Bump `black`

* Run black
2023-05-06 13:29:48 -07:00
Milan van Wouden 8030367e6b Fix images to nerfstudio filename (#1853)
fix images to nerfstudio filename
2023-05-04 10:06:52 -07:00
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