1. 14 Jun, 2023 1 commit
  2. 24 Mar, 2023 1 commit
    • Emilien Garreau's avatar
      Add the OverfitModel · 813e941d
      Emilien Garreau authored
      Summary:
      Introduces the OverfitModel for NeRF-style training with overfitting to one scene.
      It is a specific case of GenericModel. It has been disentangle to ease usage.
      
      ## General modification
      
      1. Modularize a minimum GenericModel to introduce OverfitModel
      2. Introduce OverfitModel and ensure through unit testing that it behaves like GenericModel.
      
      ## Modularization
      
      The following methods have been extracted from GenericModel to allow modularity with ManyViewModel:
      - get_objective is now a call to weighted_sum_losses
      - log_loss_weights
      - prepare_inputs
      
      The generic methods have been moved to an utils.py file.
      
      Simplify the code to introduce OverfitModel.
      
      Private methods like chunk_generator are now public and can now be used by ManyViewModel.
      
      Reviewed By: shapovalov
      
      Differential Revision: D43771992
      
      fbshipit-source-id: 6102aeb21c7fdd56aa2ff9cd1dd23fd9fbf26315
      813e941d
  3. 16 Jan, 2023 1 commit
    • Jeremy Reizenstein's avatar
      rendered_mesh_dataset improvements · b7e3b7b1
      Jeremy Reizenstein authored
      Summary: Allow choosing the device and the distance
      
      Reviewed By: shapovalov
      
      Differential Revision: D42451605
      
      fbshipit-source-id: 214f02d09da94eb127b3cc308d5bae800dc7b9e2
      b7e3b7b1
  4. 02 Nov, 2022 1 commit
    • David Novotny's avatar
      CO3Dv2 multi-category extension · e4a32981
      David Novotny authored
      Summary:
      Allows loading of multiple categories.
      Multiple categories are provided in a comma-separated list of category names.
      
      Reviewed By: bottler, shapovalov
      
      Differential Revision: D40803297
      
      fbshipit-source-id: 863938be3aa6ffefe9e563aede4a2e9e66aeeaa8
      e4a32981
  5. 31 Oct, 2022 1 commit
  6. 23 Oct, 2022 3 commits
    • Jeremy Reizenstein's avatar
      yaml test fix · ca588633
      Jeremy Reizenstein authored
      Summary: Yaml bool case fix
      
      Reviewed By: shapovalov
      
      Differential Revision: D40623031
      
      fbshipit-source-id: 29b2fba171c2cbebfa03834e38b614d07275c997
      ca588633
    • Jeremy Reizenstein's avatar
      voxel_grid_implicit_function · 74754bbf
      Jeremy Reizenstein authored
      Reviewed By: shapovalov
      
      Differential Revision: D40622304
      
      fbshipit-source-id: 277515a55c46d9b8300058b439526539a7fe00a0
      74754bbf
    • Jeremy Reizenstein's avatar
      replicate_last_interval in raymarcher · 611aba9a
      Jeremy Reizenstein authored
      Summary: Add option to flat pad the last delta. Might to help when training on rgb only.
      
      Reviewed By: shapovalov
      
      Differential Revision: D40587475
      
      fbshipit-source-id: c763fa38948600ea532c730538dc4ff29d2c3e0a
      611aba9a
  7. 18 Oct, 2022 1 commit
    • Jeremy Reizenstein's avatar
      different learning rate for different parts · fe5bdb2f
      Jeremy Reizenstein authored
      Summary:
      Adds the ability to have different learning rates for different parts of the model. The trainable parts of the implicitron have a new member
      
             param_groups: dictionary where keys are names of individual parameters,
                  or module’s members and values are the parameter group where the
                  parameter/member will be sorted to. "self" key is used to denote the
                  parameter group at the module level. Possible keys, including the "self" key
                  do not have to be defined. By default all parameters are put into "default"
                  parameter group and have the learning rate defined in the optimizer,
                  it can be overriden at the:
                      - module level with “self” key, all the parameters and child
                          module s parameters will be put to that parameter group
                      - member level, which is the same as if the `param_groups` in that
                          member has key=“self” and value equal to that parameter group.
                          This is useful if members do not have `param_groups`, for
                          example torch.nn.Linear.
                      - parameter level, parameter with the same name as the key
                          will be put to that parameter group.
      
      And in the optimizer factory, parameters and their learning rates are recursively gathered.
      
      Reviewed By: shapovalov
      
      Differential Revision: D40145802
      
      fbshipit-source-id: 631c02b8d79ee1c0eb4c31e6e42dbd3d2882078a
      fe5bdb2f
  8. 03 Oct, 2022 1 commit
    • Darijan Gudelj's avatar
      Enable mixed frame raysampling · c311a4cb
      Darijan Gudelj authored
      Summary:
      Changed ray_sampler and metrics to be able to use mixed frame raysampling.
      
      Ray_sampler now has a new member which it passes to the pytorch3d raysampler.
      If the raybundle is heterogeneous metrics now samples images by padding xys first. This reduces memory consumption.
      
      Reviewed By: bottler, kjchalup
      
      Differential Revision: D39542221
      
      fbshipit-source-id: a6fec23838d3049ae5c2fd2e1f641c46c7c927e3
      c311a4cb
  9. 22 Sep, 2022 1 commit
    • Jeremy Reizenstein's avatar
      foreach optimizers · 209c160a
      Jeremy Reizenstein authored
      Summary: Allow using the new `foreach` option on optimizers.
      
      Reviewed By: shapovalov
      
      Differential Revision: D39694843
      
      fbshipit-source-id: 97109c245b669bc6edff0f246893f95b7ae71f90
      209c160a
  10. 07 Sep, 2022 1 commit
    • Jeremy Reizenstein's avatar
      hydra fix · 90b758f7
      Jeremy Reizenstein authored
      Summary: Workaround for oddity with new hydra.
      
      Reviewed By: davnov134
      
      Differential Revision: D39280639
      
      fbshipit-source-id: 76e91947f633589945446db93cf2dbc259642f8a
      90b758f7
  11. 30 Aug, 2022 1 commit
    • David Novotny's avatar
      CO3Dv2 trainer configs · 1163eaab
      David Novotny authored
      Summary:
      Adds yaml configs to train selected methods on CO3Dv2.
      
      Few more updates:
      1) moved some fields to base classes so that we can check is_multisequence in experiment.py
      2) skip loading all train cameras for multisequence datasets, without this, co3d-fewview is untrainable
      3) fix bug in json index dataset provider v2
      
      Reviewed By: kjchalup
      
      Differential Revision: D38952755
      
      fbshipit-source-id: 3edac6fc8e20775aa70400bd73a0e6d52b091e0c
      1163eaab
  12. 15 Aug, 2022 1 commit
  13. 10 Aug, 2022 1 commit
    • Jeremy Reizenstein's avatar
      LinearExponential LR · a39cad40
      Jeremy Reizenstein authored
      Summary: Linear followed by exponential LR progression. Needed for making Blender scenes converge.
      
      Reviewed By: kjchalup
      
      Differential Revision: D38557007
      
      fbshipit-source-id: ad630dbc5b8fabcb33eeb5bdeed5e4f31360bac2
      a39cad40
  14. 09 Aug, 2022 1 commit
    • Krzysztof Chalupka's avatar
      Mods and bugfixes for LLFF and Blender repros · c83ec355
      Krzysztof Chalupka authored
      Summary:
      LLFF (and most/all non-synth datasets) will have no background/foreground distinction. Add support for data with no fg mask.
      
      Also, we had a bug in stats loading, like this:
        * Load stats
        * One of the stats has a history of length 0
        * That's fine, e.g. maybe it's fg_error but the dataset has no notion of fg/bg. So leave it as len 0
        * Check whether all the stats have the same history length as an arbitrarily chosen "reference-stat"
        * Ooops the reference-stat happened to be the stat with length 0
        * assert (legit_stat_len == reference_stat_len (=0)) ---> failed assert
      
      Also some minor fixes (from Jeremy's other diff) to support LLFF
      
      Reviewed By: davnov134
      
      Differential Revision: D38475272
      
      fbshipit-source-id: 5b35ac86d1d5239759f537621f41a3aa4eb3bd68
      c83ec355
  15. 05 Aug, 2022 1 commit
    • Jeremy Reizenstein's avatar
      more globalencoder followup · 02c0254f
      Jeremy Reizenstein authored
      Summary: remove n_instances==0 special case, standardise args for GlobalEncoderBase's forward.
      
      Reviewed By: shapovalov
      
      Differential Revision: D37817340
      
      fbshipit-source-id: 0aac5fbc7c336d09be9d412cffff5712bda27290
      02c0254f
  16. 03 Aug, 2022 3 commits
    • Jeremy Reizenstein's avatar
      clean IF args · 46e82efb
      Jeremy Reizenstein authored
      Summary: continued - avoid duplicate inputs
      
      Reviewed By: davnov134
      
      Differential Revision: D38248827
      
      fbshipit-source-id: 91ed398e304496a936f66e7a70ab3d189eeb5c70
      46e82efb
    • Jeremy Reizenstein's avatar
      clean renderer args · 078846d1
      Jeremy Reizenstein authored
      Summary: continued - don't duplicate inputs
      
      Reviewed By: kjchalup
      
      Differential Revision: D38248829
      
      fbshipit-source-id: 2d56418ecbec9cc597c3cf0c122199e274661516
      078846d1
    • Jeremy Reizenstein's avatar
      clean raysampler args · f45893b8
      Jeremy Reizenstein authored
      Summary: Don't copy from one part of config to another, rather do the copy within GenericModel.
      
      Reviewed By: davnov134
      
      Differential Revision: D38248828
      
      fbshipit-source-id: ff8af985c37ea1f7df9e0aa0a45a58df34c3f893
      f45893b8
  17. 02 Aug, 2022 4 commits
    • David Novotny's avatar
      Move load_stats to TrainingLoop · c3f8dad5
      David Novotny authored
      Summary:
      Stats are logically connected to the training loop, not to the model. Hence, moving to the training loop.
      
      Also removing resume_epoch from OptimizerFactory in favor of a single place - ModelFactory. This removes the need for config consistency checks etc.
      
      Reviewed By: kjchalup
      
      Differential Revision: D38313475
      
      fbshipit-source-id: a1d188a63e28459df381ff98ad8acdcdb14887b7
      c3f8dad5
    • Jeremy Reizenstein's avatar
      SimpleDataLoaderMapProvider · 3a063f59
      Jeremy Reizenstein authored
      Summary: Simple DataLoaderMapProvider instance
      
      Reviewed By: davnov134
      
      Differential Revision: D38326719
      
      fbshipit-source-id: 58556833e76fae5790d25a59bea0aac4ce046bf1
      3a063f59
    • Jeremy Reizenstein's avatar
      remove get_task · f8bf5280
      Jeremy Reizenstein authored
      Summary: Remove the dataset's need to provide the task type.
      
      Reviewed By: davnov134, kjchalup
      
      Differential Revision: D38314000
      
      fbshipit-source-id: 3805d885b5d4528abdc78c0da03247edb9abf3f7
      f8bf5280
    • Darijan Gudelj's avatar
      Add forbidden fields to map_provider_v2 · 37250a43
      Darijan Gudelj authored
      Summary:
      Added _NEED_CONTROL
       to JsonIndexDatasetMapProviderV2 and made dataset_tweak_args use it.
      
      Reviewed By: bottler
      
      Differential Revision: D38313914
      
      fbshipit-source-id: 529847571065dfba995b609a66737bd91e002cfe
      37250a43
  18. 01 Aug, 2022 2 commits
    • David Novotny's avatar
      Better seeding of random engines · 80fc0ee0
      David Novotny authored
      Summary: Currently, seeds are set only inside the train loop. But this does not ensure that the model weights are initialized the same way everywhere which makes all experiments irreproducible. This diff fixes it.
      
      Reviewed By: bottler
      
      Differential Revision: D38315840
      
      fbshipit-source-id: 3d2ecebbc36072c2b68dd3cd8c5e30708e7dd808
      80fc0ee0
    • Jeremy Reizenstein's avatar
      provide cow dataset · 14bd5e28
      Jeremy Reizenstein authored
      Summary: Make a dummy single-scene dataset using the code from generate_cow_renders (used in existing NeRF tutorials)
      
      Reviewed By: kjchalup
      
      Differential Revision: D38116910
      
      fbshipit-source-id: 8db6df7098aa221c81d392e5cd21b0e67f65bd70
      14bd5e28
  19. 30 Jul, 2022 1 commit
    • Krzysztof Chalupka's avatar
      Replace pluggable components to create a proper Configurable hierarchy. · 1b0584f7
      Krzysztof Chalupka authored
      Summary:
      This large diff rewrites a significant portion of Implicitron's config hierarchy. The new hierarchy, and some of the default implementation classes, are as follows:
      ```
      Experiment
          data_source: ImplicitronDataSource
              dataset_map_provider
              data_loader_map_provider
          model_factory: ImplicitronModelFactory
              model: GenericModel
          optimizer_factory: ImplicitronOptimizerFactory
          training_loop: ImplicitronTrainingLoop
              evaluator: ImplicitronEvaluator
      ```
      
      1) Experiment (used to be ExperimentConfig) is now a top-level Configurable and contains as members mainly (mostly new) high-level factory Configurables.
      2) Experiment's job is to run factories, do some accelerate setup and then pass the results to the main training loop.
      3) ImplicitronOptimizerFactory and ImplicitronModelFactory are new high-level factories that create the optimizer, scheduler, model, and stats objects.
      4) TrainingLoop is a new configurable that runs the main training loop and the inner train-validate step.
      5) Evaluator is a new configurable that TrainingLoop uses to run validation/test steps.
      6) GenericModel is not the only model choice anymore. Instead, ImplicitronModelBase (by default instantiated with GenericModel) is a member of Experiment and can be easily replaced by a custom implementation by the user.
      
      All the new Configurables are children of ReplaceableBase, and can be easily replaced with custom implementations.
      
      In addition, I added support for the exponential LR schedule, updated the config files and the test, as well as added a config file that reproduces NERF results and a test to run the repro experiment.
      
      Reviewed By: bottler
      
      Differential Revision: D37723227
      
      fbshipit-source-id: b36bee880d6aa53efdd2abfaae4489d8ab1e8a27
      1b0584f7
  20. 13 Jul, 2022 1 commit
    • Roman Shapovalov's avatar
      Fixes to CO3Dv2 provider. · 36ba079b
      Roman Shapovalov authored
      Summary:
      1. Random sampling of num batches without replacement not supported.
      2.Providers should implement the interface for the training loop to work.
      
      Reviewed By: bottler, davnov134
      
      Differential Revision: D37815388
      
      fbshipit-source-id: 8a2795b524e733f07346ffdb20a9c0eb1a2b8190
      36ba079b
  21. 06 Jul, 2022 2 commits
    • Jeremy Reizenstein's avatar
      extract camera_difficulty_bin_breaks · efb72132
      Jeremy Reizenstein authored
      Summary: As part of removing Task, move camera difficulty bin breaks from hard code to the top level.
      
      Reviewed By: davnov134
      
      Differential Revision: D37491040
      
      fbshipit-source-id: f2d6775ebc490f6f75020d13f37f6b588cc07a0b
      efb72132
    • Jeremy Reizenstein's avatar
      more padding options in Dataloader · 771cf8a3
      Jeremy Reizenstein authored
      Summary: Add facilities for dataloading non-sequential scenes.
      
      Reviewed By: shapovalov
      
      Differential Revision: D37291277
      
      fbshipit-source-id: 0a33e3727b44c4f0cba3a2abe9b12f40d2a20447
      771cf8a3
  22. 04 Jul, 2022 1 commit
    • David Novotny's avatar
      Refactor autodecoders · 0dce8832
      David Novotny authored
      Summary: Refactors autodecoders. Tests pass.
      
      Reviewed By: bottler
      
      Differential Revision: D37592429
      
      fbshipit-source-id: 8f5c9eac254e1fdf0704d5ec5f69eb42f6225113
      0dce8832
  23. 30 Jun, 2022 1 commit
    • Krzysztof Chalupka's avatar
      Refactor ViewMetrics · ae35824f
      Krzysztof Chalupka authored
      Summary:
      Make ViewMetrics easy to replace by putting them into an OmegaConf dataclass.
      
      Also, re-word a few variable names and fix minor TODOs.
      
      Reviewed By: bottler
      
      Differential Revision: D37327157
      
      fbshipit-source-id: 78d8e39bbb3548b952f10abbe05688409fb987cc
      ae35824f
  24. 24 Jun, 2022 1 commit
  25. 20 Jun, 2022 2 commits
    • Jeremy Reizenstein's avatar
      idr harmonic_fns and doc · 81d63c63
      Jeremy Reizenstein authored
      Summary: Document the inputs of idr functions and distinguish n_harmonic_functions to be 0 (simple embedding) versus -1 (no embedding).
      
      Reviewed By: davnov134
      
      Differential Revision: D37209012
      
      fbshipit-source-id: 6e5c3eae54c4e5e8c3f76cad1caf162c6c222d52
      81d63c63
    • Jeremy Reizenstein's avatar
      bg_color for lstm renderer · cba26506
      Jeremy Reizenstein authored
      Summary: Allow specifying a color for non-opaque pixels in LSTMRenderer.
      
      Reviewed By: davnov134
      
      Differential Revision: D37172537
      
      fbshipit-source-id: 6039726678bb7947f7d8cd04035b5023b2d5398c
      cba26506
  26. 16 Jun, 2022 1 commit
    • Jeremy Reizenstein's avatar
      loading llff and blender datasets · 65f667fd
      Jeremy Reizenstein authored
      Summary: Copy code from NeRF for loading LLFF data and blender synthetic data, and create dataset objects for them
      
      Reviewed By: shapovalov
      
      Differential Revision: D35581039
      
      fbshipit-source-id: af7a6f3e9a42499700693381b5b147c991f57e5d
      65f667fd
  27. 10 Jun, 2022 2 commits
    • Jeremy Reizenstein's avatar
      pluggable JsonIndexDataset · 62752832
      Jeremy Reizenstein authored
      Summary: Make dataset type and args configurable on JsonIndexDatasetMapProvider.
      
      Reviewed By: davnov134
      
      Differential Revision: D36666705
      
      fbshipit-source-id: 4d0a3781d9a956504f51f1c7134c04edf1eb2846
      62752832
    • Jeremy Reizenstein's avatar
      PathManagerFactory · 1d432513
      Jeremy Reizenstein authored
      Summary: Allow access to manifold internally by default.
      
      Reviewed By: davnov134
      
      Differential Revision: D36760481
      
      fbshipit-source-id: 2a16bd40e81ef526085ac1b3f4606b63c1841428
      1d432513
  28. 26 May, 2022 1 commit
    • Jeremy Reizenstein's avatar
      test runner for experiment.py · c31bf85a
      Jeremy Reizenstein authored
      Summary: Add simple interactive testrunner for experiment.py
      
      Reviewed By: shapovalov
      
      Differential Revision: D35316221
      
      fbshipit-source-id: d424bcba632eef89eefb56e18e536edb58ec6f85
      c31bf85a