diff --git a/.dockerignore b/.dockerignore index e1590ed27..92619bde0 100644 --- a/.dockerignore +++ b/.dockerignore @@ -12,7 +12,7 @@ build/ develop-eggs/ dist/ downloads/ -!scripts/downloads/ +!nerfstudio/scripts/downloads/ eggs/ .eggs/ lib/ diff --git a/.github/workflows/core_code_checks.yml b/.github/workflows/core_code_checks.yml index 86ff5ccca..3e30fba7d 100644 --- a/.github/workflows/core_code_checks.yml +++ b/.github/workflows/core_code_checks.yml @@ -15,10 +15,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.7.13 + - name: Set up Python 3.8.13 uses: actions/setup-python@v4 with: - python-version: '3.7.13' + python-version: '3.8.13' - uses: actions/cache@v2 with: path: ${{ env.pythonLocation }} @@ -28,17 +28,17 @@ jobs: pip install --upgrade --upgrade-strategy eager -e .[dev] - name: Run license checks run: | - ./scripts/licensing/license_headers.sh --check + ./nerfstudio/scripts/licensing/license_headers.sh --check - name: Check notebook cell metadata run: | - python ./scripts/docs/add_nb_tags.py --check + python ./nerfstudio/scripts/docs/add_nb_tags.py --check - name: Run isort - run: isort docs/ nerfstudio/ scripts/ tests/ --profile black --check + run: isort docs/ nerfstudio/ tests/ --profile black --check - name: Run Black - run: black docs/ nerfstudio/ scripts/ tests/ --check + run: black docs/ nerfstudio/ tests/ --check - name: Python Pylint run: | - pylint nerfstudio tests scripts + pylint nerfstudio tests - name: Test with pytest run: | pytest diff --git a/.gitignore b/.gitignore index cfa4358d2..7f1688d59 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,7 @@ build/ develop-eggs/ dist/ downloads/ -!scripts/downloads/ +!nerfstudio/scripts/downloads/ eggs/ .eggs/ lib/ diff --git a/.vscode/launch.json b/.vscode/launch.json index da293a07b..6e4dc7c4a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -30,7 +30,7 @@ "name": "Python: train", "type": "python", "request": "launch", - "program": "scripts/train.py", + "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "args": [ "instant_ngp", @@ -42,7 +42,7 @@ "name": "Python: train ngp", "type": "python", "request": "launch", - "program": "scripts/train.py", + "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "args": ["instant_ngp"] }, @@ -50,7 +50,7 @@ "name": "Python: train ngp nerfstudio", "type": "python", "request": "launch", - "program": "scripts/train.py", + "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "args": [ "instant_ngp", @@ -70,7 +70,7 @@ "name": "Python: train ngp-friends", "type": "python", "request": "launch", - "program": "scripts/train.py", + "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "args": [ "instant_ngp", @@ -89,7 +89,7 @@ "name": "Python: train semantic_nerfw", "type": "python", "request": "launch", - "program": "scripts/train.py", + "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "args": ["semantic_nerf"] }, @@ -97,10 +97,10 @@ "name": "Python: NeuS on Replica", "type": "python", "request": "launch", - "program": "scripts/train.py", + "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "justMyCode": false, - "env": {"CUDA_VISIBLE_DEVICES":"0"}, + "env": { "CUDA_VISIBLE_DEVICES": "0" }, "args": [ "neus", "--pipeline.model.sdf-field.inside-outside=True", @@ -116,10 +116,10 @@ "name": "Python: NeuS-facto on Replica", "type": "python", "request": "launch", - "program": "scripts/train.py", + "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "justMyCode": false, - "env": {"CUDA_VISIBLE_DEVICES":"0"}, + "env": { "CUDA_VISIBLE_DEVICES": "0" }, "args": [ "neus-facto", "--pipeline.model.sdf-field.inside-outside=True", @@ -135,10 +135,10 @@ "name": "Python: NeuS-facto on DTU (no mono-prior)", "type": "python", "request": "launch", - "program": "scripts/train.py", + "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "justMyCode": false, - "env": {"CUDA_VISIBLE_DEVICES":"0"}, + "env": { "CUDA_VISIBLE_DEVICES": "0" }, "args": [ "neus-facto", "--pipeline.model.sdf-field.inside-outside=False", @@ -148,6 +148,6 @@ "--include_mono_prior=False", "--auto-orient=True" ] - }, + } ] } diff --git a/README.md b/README.md index d2e320041..15f8dfa46 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ You must have an NVIDIA video card with CUDA installed on the system. This libra ### Create environment -Nerfstudio requires `python >= 3.7`. We recommend using conda to manage dependencies. Make sure to install [Conda](https://docs.conda.io/en/latest/miniconda.html) before proceeding. +Nerfstudio requires `python >= 3.8`. We recommend using conda to manage dependencies. Make sure to install [Conda](https://docs.conda.io/en/latest/miniconda.html) before proceeding. ```bash conda create --name nerfstudio -y python=3.8 @@ -168,7 +168,13 @@ It is possible to load a pretrained model by running ns-train nerfacto --data data/nerfstudio/poster --load-dir {outputs/.../nerfstudio_models} ``` -This will automatically start training. If you do not want it to train, add `--viewer.start-train False` to your training command. +## Visualize existing run + +Given a pretrained model checkpoint, you can start the viewer by running + +```bash +ns-viewer --load-config {outputs/.../config.yml} +``` ## 3. Exporting Results @@ -230,9 +236,9 @@ Each model contains many parameters that can be changed, too many to list here. ns-train nerfacto --help ``` -### Tensorboard / WandB +### Tensorboard / WandB / Viewer -We support three different methods to track training progress, using the viewer, [tensorboard](https://www.tensorflow.org/tensorboard), and [Weights and Biases](https://wandb.ai/site). You can specify which visualizer to use by appending `--vis {viewer, tensorboard, wandb}` to the training command. Note that only one may be used at a time. Additionally the viewer only works for methods that are fast (ie. nerfacto, instant-ngp), for slower methods like NeRF, use the other loggers. +We support three different methods to track training progress, using the viewer, [tensorboard](https://www.tensorflow.org/tensorboard), and [Weights and Biases](https://wandb.ai/site). You can specify which visualizer to use by appending `--vis {viewer, tensorboard, wandb, viewer+wandb, viewer+tensorboard}` to the training command. Simultaneously utilizing the viewer alongside wandb or tensorboard may cause stuttering issues during evaluation steps. The viewer only works for methods that are fast (ie. nerfacto, instant-ngp), for slower methods like NeRF, use the other loggers. # Learn More diff --git a/docs/developer_guides/debugging_tools/benchmarking.md b/docs/developer_guides/debugging_tools/benchmarking.md index 5e213fb1b..b38c09277 100644 --- a/docs/developer_guides/debugging_tools/benchmarking.md +++ b/docs/developer_guides/debugging_tools/benchmarking.md @@ -9,7 +9,7 @@ To launch training jobs automatically on each of these items, you can call: ```bash -./scripts/benchmarking/launch_train_blender.sh -m {METHOD_NAME} [-s] [-v {VIS}] [{GPU_LIST}] +./nerfstudio/scripts/benchmarking/launch_train_blender.sh -m {METHOD_NAME} [-s] [-v {VIS}] [{GPU_LIST}] ``` Simply replace the arguments in brackets with the correct arguments. @@ -18,31 +18,31 @@ Simply replace the arguments in brackets with the correct arguments. - `-s`: Launch a single job per GPU. - `-v {VIS}`: Use another visualization than wandb, which is the default. Only other option is tensorboard. - `{GPU_LIST}`: (optional) Specify the list of gpus you want to use on your machine space separated. for instance, if you want to use GPU's 0-3, you will need to pass in `0 1 2 3`. If left empty, the script will automatically find available GPU's and distribute training jobs on the available GPUs. - + :::{admonition} Tip :class: info -To view all the arguments and annotations, you can run `./scripts/benchmarking/launch_train_blender.sh --help` - ::: - +To view all the arguments and annotations, you can run `./nerfstudio/scripts/benchmarking/launch_train_blender.sh --help` +::: A full example would be: - Specifying gpus - ```bash - ./scripts/benchmarking/launch_train_blender.sh -m nerfacto 0 1 2 3 - ``` + + ```bash + ./nerfstudio/scripts/benchmarking/launch_train_blender.sh -m nerfacto 0 1 2 3 + ``` - Automatically find available gpus - ```bash - ./scripts/benchmarking/launch_train_blender.sh -m nerfacto - ``` + ```bash + ./nerfstudio/scripts/benchmarking/launch_train_blender.sh -m nerfacto + ``` The script will automatically launch training on all of the items and save the checkpoints in an output directory with the experiment name and current timestamp. ## Evaluating trained Blender models -Once you have launched training, and training converges, you can test your method with `scripts/benchmarking/launch_eval_blender.sh`. +Once you have launched training, and training converges, you can test your method with `nerfstudio/scripts/benchmarking/launch_eval_blender.sh`. Say we ran a benchmark on 08-10-2022 for `instant-ngp`. By default, the train script will save the benchmarks in the following format: @@ -65,7 +65,7 @@ If we wanted to run the benchmark on all the blender data for the above example, ```bash -./scripts/benchmarking/launch_eval_blender.sh -m instant-ngp -o outputs/ -t 2022-08-10_172517 [{GPU_LIST}] +./nerfstudio/scripts/benchmarking/launch_eval_blender.sh -m instant-ngp -o outputs/ -t 2022-08-10_172517 [{GPU_LIST}] ``` The flags used in the benchmarking script are defined as follows: @@ -90,4 +90,4 @@ outputs :class: warning Since we are running multiple backgrounded processes concurrently with this script, please note the terminal logs may be messy. - ::: +::: diff --git a/docs/developer_guides/new_methods.md b/docs/developer_guides/new_methods.md index 26376d655..baafad440 100644 --- a/docs/developer_guides/new_methods.md +++ b/docs/developer_guides/new_methods.md @@ -70,6 +70,12 @@ finally run the following to register the method, pip install -e . ``` +When developing a new method you don't always want to install your code as a package. +Instead, you may use the `NERFSTUDIO_METHOD_CONFIGS` environment variable to temporarily register your custom method. +``` +export NERFSTUDIO_METHOD_CONFIGS="my-method=my_method.my_config:MyMethod" +``` + ## Running custom method After registering your method you should be able to run the method with, diff --git a/docs/extensions/blender_addon.md b/docs/extensions/blender_addon.md index 842d9bb38..8e2fa4bd2 100644 --- a/docs/extensions/blender_addon.md +++ b/docs/extensions/blender_addon.md @@ -16,7 +16,7 @@ This Blender add-on allows for compositing with a Nerfstudio render as a backgro 1. The add-on requires Blender 3.0 or newer, install Blender [here](https://www.blender.org/). -2. Download Blender Add-on Script +2. Download Blender Add-on Script 3. Install and enable the add-on in Blender in `Edit → Preferences → Add-Ons`. The add-on will be visible in the Render Properties tab on the right panel.
@@ -136,34 +136,34 @@ You can composite NeRF objects into a scene with a NeRF background by rendering 1. Import the background NeRF scene as a point cloud (or mesh, but point cloud is preferred for large scenes). 2. Export a cropped NeRF mesh of the NeRF object(s) - - Open the NeRF object from the Nerfstudio viewer and select "Crop Viewport" and accordingly adjust the Scale and Center values of the bounding box to crop the NeRF scene to around the bounds of the object of interest. -
- image -
- - - Copy over the scale and center values into the Export panel and export the NeRF object as a mesh (point cloud will also work but shadows can be rendered if the object is a mesh) + - Open the NeRF object from the Nerfstudio viewer and select "Crop Viewport" and accordingly adjust the Scale and Center values of the bounding box to crop the NeRF scene to around the bounds of the object of interest. - - Keep note of the scale and center values for the crop. This can be done by creating a new JSON camera path in the editor which will add a crop section towards the end of the file. +
+ image +
-
- image -
- + - Copy over the scale and center values into the Export panel and export the NeRF object as a mesh (point cloud will also work but shadows can be rendered if the object is a mesh) + + - Keep note of the scale and center values for the crop. This can be done by creating a new JSON camera path in the editor which will add a crop section towards the end of the file. + +
+ image +
3. Import the NeRF object representation. Rescale and position the scene and NeRF object and background environment. You can also animate either of them. 4. (Optional) To add shadows of the NeRF object(s) - - Add a plane representing the ground of the environment. In object properties, select "Shadow Catcher" under Visibility. You may have to switch to the cycles renderer to see the shadow catcher option. - - In the object properties of the NeRF object, go to the Ray Visibility section and deselect the "Camera" option. This will hide the mesh in the Blender render, but keep its shadow. - + - Add a plane representing the ground of the environment. In object properties, select "Shadow Catcher" under Visibility. You may have to switch to the cycles renderer to see the shadow catcher option. -
- image -
- - - Render the Blender animation with only the shadow of the object on the shadow catcher visible. Render with a transparent background by selecting "Transparent" under the Film Settings in the Render Properties. + - In the object properties of the NeRF object, go to the Ray Visibility section and deselect the "Camera" option. This will hide the mesh in the Blender render, but keep its shadow. + +
+ image +
+ + - Render the Blender animation with only the shadow of the object on the shadow catcher visible. Render with a transparent background by selecting "Transparent" under the Film Settings in the Render Properties. 5. Go to the Nerfstudio Add-on in Render Properties and expand the "Nerfstudio Path Generator" tab in the panel. Use the object selector to select the NeRF environment representation. Then, select the file path for the output JSON camera path file. Click "Generate JSON file". The output JSON file is named `camera_path_blender.json`. It is recommended to rename this JSON file to keep track of the multiple camera paths that will be used to construct the full render. @@ -172,29 +172,32 @@ You can composite NeRF objects into a scene with a NeRF background by rendering 7. Render the NeRF of the background environment using the generated camera path for the environment using the Nerfstudio in the command line or terminal. 8. Render the NeRF object - - Open the recently generated blender Nerfstudio JSON camera path and add the crop parameters to the camera path. This section will be placed towards the end of the Blender Nerfstudio camera path after the `is_cycle` field. This can be done by copying over the crop section from the JSON camera path with the scene crop which was exported earlier. Alternatively, you can enter the crop values manually in this format. -
- image -
- - Render the NeRF object using Nerfstudio and the edited camera path in the command line or terminal. This will be the RGB render. + - Open the recently generated blender Nerfstudio JSON camera path and add the crop parameters to the camera path. This section will be placed towards the end of the Blender Nerfstudio camera path after the `is_cycle` field. This can be done by copying over the crop section from the JSON camera path with the scene crop which was exported earlier. Alternatively, you can enter the crop values manually in this format. +
+ image +
- - Next, render the accumulation render as an alpha mask of the NeRF object by adding the command line argument `--rendered-output-names accumulation` to the render command. + - Render the NeRF object using Nerfstudio and the edited camera path in the command line or terminal. This will be the RGB render. -
- image -
+ - Next, render the accumulation render as an alpha mask of the NeRF object by adding the command line argument `--rendered-output-names accumulation` to the render command. + +
+ image +
9. Convert each of the Nerfstudio render videos into an image sequence of frames as PNG or JPG files. This will ensure that the frames will be aligned when compositing. You can convert the video mp4 to an image sequence by creating a Blender Video Editing file and rendering the mp4 as JPGs or PNGs. -10. Composite the NeRF renders in a video editing software such as Adobe Premiere Pro. +10. Composite the NeRF renders in a video editing software such as Adobe Premiere Pro. + - Place the render of the Nerfstudio background environment at the lowest layer, then place the shadow render of the NeRF object if created. - - Place the RGB NeRF render of the NeRF object over the environment (and shadow if present) layers and then place the accumulation NeRF object render over the RGB NeRF object render. + - Place the RGB NeRF render of the NeRF object over the environment (and shadow if present) layers and then place the accumulation NeRF object render over the RGB NeRF object render. - Apply a filter to use the accumulation render as an alpha mask. In Premiere Pro, apply the effect "Track Matte Key" to the RGB render and select the "Matte" as the video track of the accumulation render and under "Composite Using" select "Matte Luma". ### Additional Details + - The RGB and accumulation renders will need to be rendered for each NeRF cropped object in the scene, but not for the NeRF environment if it is not cropped. - If you will composite a shadow layer, the quality of the exported mesh of the NeRF object should have enough fidelity to cast a shadow, but the texture doesn't need to be clear. - If motion tracking or compositing over real camera footage, you can add planes or cubes to represent walls or doorways as shadow catcher or holdout objects. This will composite the shadow layer over the NeRF environment and help create alpha masks. @@ -202,6 +205,7 @@ You can composite NeRF objects into a scene with a NeRF background by rendering - A walkthrough of this section is included in the tutorial video. ### Examples +

image image diff --git a/docs/nerfology/methods/index.md b/docs/nerfology/methods/index.md index db2677524..441a6d705 100644 --- a/docs/nerfology/methods/index.md +++ b/docs/nerfology/methods/index.md @@ -33,6 +33,7 @@ The following methods are supported in nerfstudio: Instruct-NeRF2NeRF LERF Semantic NeRF-W + Tetra-NeRF ``` (own_method_docs)= diff --git a/docs/nerfology/methods/tetranerf.md b/docs/nerfology/methods/tetranerf.md new file mode 100644 index 000000000..e18163087 --- /dev/null +++ b/docs/nerfology/methods/tetranerf.md @@ -0,0 +1,77 @@ +# Tetra-NeRF + +

Tetra-NeRF: Representing Neural Radiance Fields Using Tetrahedra

+ +```{button-link} https://jkulhanek.com/tetra-nerf +:color: primary +:outline: +Paper Website +``` + +```{button-link} https://github.com/jkulhanek/tetra-nerf +:color: primary +:outline: +Code +``` + + + +**SfM input pointcloud is triangulated and resulting tetrahedra is used as the radiance field representation** + +## Installation + +First, make sure to install the following: +``` +CUDA (>=11.3) +PyTorch (>=1.12.1) +Nerfstudio (>=0.2.0) +OptiX (>=7.2, preferably 7.6) +CGAL +CMake (>=3.22.1) +``` +Follow the [installation section](https://github.com/jkulhanek/tetra-nerf/blob/master/README.md#installation) in the tetra-nerf repository + +Finally, you can install **Tetra-NeRF** by running: +```bash +pip install git+https://github.com/jkulhanek/tetra-nerf +``` + +## Running Tetra-NeRF on custom data +Details for running Tetra-NeRF can be found [here](https://github.com/jkulhanek/tetra-nerf). + +```bash +python -m tetranerf.scripts.process_images --path +python -m tetranerf.scripts.triangulate --pointcloud /sparse.ply --output /sparse.th +ns-train tetra-nerf --pipeline.model.tetrahedra-path /sparse.th minimal-parser --data +``` + +Three following variants of Tetra-NeRF are provided: + +| Method | Description | Memory | Quality | +| --------------------- | -------------------------------------- | ------- | ------- | +| `tetra-nerf-original` | Official implementation from the paper | ~18GB* | Good | +| `tetra-nerf` | Different sampler - faster and better | ~16GB* | Best | + +*Depends on the size of the input pointcloud, estimate is given for a larger scene (1M points) + +## Method +![method overview](https://jkulhanek.com/tetra-nerf/resources/overview-white.svg)
+The input to Tetra-NeRF is a point cloud which is triangulated to get a set of tetrahedra used to represent the radiance field. Rays are sampled, and the field is queried. The barycentric interpolation is used to interpolate tetrahedra vertices, and the resulting features are passed to a shallow MLP to get the density and colours for volumetric rendering.
+ +[![demo blender lego (sparse)](https://jkulhanek.com/tetra-nerf/resources/images/blender-lego-sparse-100k-animated-cover.gif)](https://jkulhanek.com/tetra-nerf/demo.html?scene=blender-lego-sparse) +[![demo mipnerf360 garden (sparse)](https://jkulhanek.com/tetra-nerf/resources/images/360-garden-sparse-100k-animated-cover.gif)](https://jkulhanek.com/tetra-nerf/demo.html?scene=360-garden-sparse) +[![demo mipnerf360 garden (sparse)](https://jkulhanek.com/tetra-nerf/resources/images/360-bonsai-sparse-100k-animated-cover.gif)](https://jkulhanek.com/tetra-nerf/demo.html?scene=360-bonsai-sparse) +[![demo mipnerf360 kitchen (dense)](https://jkulhanek.com/tetra-nerf/resources/images/360-kitchen-dense-300k-animated-cover.gif)](https://jkulhanek.com/tetra-nerf/demo.html?scene=360-kitchen-dense) + + +## Existing checkpoints and predictions +For an easier comparisons with Tetra-NeRF, published checkpoints and predictions can be used: + +| Dataset | Checkpoints | Predictions | Input tetrahedra | +| -------- | ----------- | ----------- | ---------------- | +| Mip-NeRF 360 (public scenes) | [download](https://data.ciirc.cvut.cz/public/projects/2023TetraNeRF/assets/mipnerf360-public-checkpoints.tar.gz) | [download](https://data.ciirc.cvut.cz/public/projects/2023TetraNeRF/assets/mipnerf360-public-predictions.tar.gz) | [download](https://data.ciirc.cvut.cz/public/projects/2023TetraNeRF/assets/mipnerf360-public-tetrahedra.tar.gz) | +| Blender | [download](https://data.ciirc.cvut.cz/public/projects/2023TetraNeRF/assets/blender-checkpoints.tar.gz) | [download](https://data.ciirc.cvut.cz/public/projects/2023TetraNeRF/assets/blender-predictions.tar.gz) | [download](https://data.ciirc.cvut.cz/public/projects/2023TetraNeRF/assets/blender-tetrahedra.tar.gz) | +| Tanks and Temples | [download](https://data.ciirc.cvut.cz/public/projects/2023TetraNeRF/assets/nsvf-tanks-and-temples-checkpoints.tar.gz) | [download](https://data.ciirc.cvut.cz/public/projects/2023TetraNeRF/assets/nsvf-tanks-and-temples-predictions.tar.gz) | [download](https://data.ciirc.cvut.cz/public/projects/2023TetraNeRF/assets/nsvf-tanks-and-temples-tetrahedra.tar.gz) | + diff --git a/docs/nerfology/model_components/visualize_samplers.ipynb b/docs/nerfology/model_components/visualize_samplers.ipynb index a23500d58..a91c754e2 100644 --- a/docs/nerfology/model_components/visualize_samplers.ipynb +++ b/docs/nerfology/model_components/visualize_samplers.ipynb @@ -1,7441 +1,7441 @@ { - "cells": [ - { - "attachments": {}, - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Ray Samplers\n", - "\n", - "## Overview\n", - "\n", - "Once we have a set of cameras, we want to cast camera rays associated with each pixel. \n", - "\n", - "Along these ray we will sample the _field_ and aggregate the samples to predict the pixels value (ie. color). The parameterization of the samples are described [here](./visualize_samples.ipynb) however we must decide where to place these samples along a ray. For this task we will use a [`Sampler`](../../reference/api/model_components/ray_sampler.rst).\n", - "\n", - "In the ideal world we would compute many dense samples along a ray. Unfortunatly each additional sample adds a computation cost to the system as it needs to be processed by the _field_ which is often a neural network. \n", - "\n", - "As a result it is common for NeRF methods to use on the order of 100 samples. Therefore we want to optimize where those samples are placed in the scene.\n", - "\n", - "For example, if the sene can be bounded by a box and the objects are all similar scales, uniform sampling along the ray may be a good option. On the other hand if the scene is unbounded (potential extending as far as the the eye can see) uniform sampling does not make sense as the samples would be very sparse for close objects. In this case a different sampling like _Uniform in Disparity_ may perform better.\n", - "\n", - "```{image} imgs/samplers_type-light.png\n", - ":align: center\n", - ":class: only-light\n", - "```\n", - "\n", - "```{image} imgs/samplers_type-dark.png\n", - ":align: center\n", - ":class: only-dark\n", - "```\n", - "\n", - "### Stratified Sampling\n", - "\n", - "Most samplers has the option to _stratify_ the samplers. When stratified, each sample is randomly perturbed. \n", - "\n", - "The magnitude of the pertubation is such that the sample ordering remains consistent and the overal distribution statistics are not changed. Using stratified samples during training generally improves the reconstructions as it help prevent overfitting. \n", - "\n", - "During inference stratified sampling should be disabled (nerfstudio samplers will do this) as it can cause noisy artifacts when the camera moves.\n", - "\n", - "```{image} imgs/samplers_stratified-light.png\n", - ":align: center\n", - ":class: only-light\n", - "```\n", - "\n", - "```{image} imgs/samplers_stratified-dark.png\n", - ":align: center\n", - ":class: only-dark\n", - "```\n", - "\n", - "### Hierarchical Sampling\n", - "\n", - "It is important to sample the scene where it has content otherwise the reconstruction quality will be reduced. \n", - "\n", - "One trick that is often employed in NeRF methods is to do multiple round of sampling. The first round can use a predefined sampler (ie. Uniform) to generate an image. Once the space is sampled, we have an idea which samples contributed to the final color. \n", - "\n", - "We can use this information to sample more around those regions using a `PDFSampler`. The PDF sampler is described more below." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Spaced Samplers\n", - "\n", - "These are the most basic samplers that spaces samples based on a predefined function. These samplers have all have a starting and ending distance (also known as a near/far plane). The plots below are histograms of points sampled from some predefined samplers. \n" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "tags": [ - "hide-input" - ] - }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3e6b9d9b42cb4dc89f40a570007d00ec", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Output()" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "
\n"
-                        ],
-                        "text/plain": []
-                    },
-                    "metadata": {},
-                    "output_type": "display_data"
-                },
-                {
-                    "data": {
-                        "text/html": [
-                            "        \n",
-                            "        "
-                        ]
-                    },
-                    "metadata": {},
-                    "output_type": "display_data"
-                },
-                {
-                    "data": {
-                        "application/vnd.plotly.v1+json": {
-                            "config": {
-                                "plotlyServerURL": "https://plot.ly"
-                            },
-                            "data": [
-                                {
-                                    "nbinsx": 50,
-                                    "opacity": 0.7,
-                                    "type": "histogram",
-                                    "x": [
-                                        2,
-                                        2.003000020980835,
-                                        2.00600004196167,
-                                        2.009000062942505,
-                                        2.01200008392334,
-                                        2.015000104904175,
-                                        2.0180001258850098,
-                                        2.0209999084472656,
-                                        2.0239999294281006,
-                                        2.0269999504089355,
-                                        2.0299999713897705,
-                                        2.0329999923706055,
-                                        2.0360000133514404,
-                                        2.0390000343322754,
-                                        2.0420000553131104,
-                                        2.0450000762939453,
-                                        2.0480000972747803,
-                                        2.050999879837036,
-                                        2.053999900817871,
-                                        2.056999921798706,
-                                        2.059999942779541,
-                                        2.062999963760376,
-                                        2.065999984741211,
-                                        2.069000005722046,
-                                        2.072000026702881,
-                                        2.075000047683716,
-                                        2.078000068664551,
-                                        2.0810000896453857,
-                                        2.0840001106262207,
-                                        2.0870001316070557,
-                                        2.0900001525878906,
-                                        2.0929999351501465,
-                                        2.0959999561309814,
-                                        2.0989999771118164,
-                                        2.1019999980926514,
-                                        2.1050000190734863,
-                                        2.1080000400543213,
-                                        2.1110000610351562,
-                                        2.114000082015991,
-                                        2.117000102996826,
-                                        2.119999885559082,
-                                        2.122999906539917,
-                                        2.125999927520752,
-                                        2.128999948501587,
-                                        2.131999969482422,
-                                        2.134999990463257,
-                                        2.138000011444092,
-                                        2.1410000324249268,
-                                        2.1440000534057617,
-                                        2.1469998359680176,
-                                        2.1500000953674316,
-                                        2.1529998779296875,
-                                        2.1560001373291016,
-                                        2.1589999198913574,
-                                        2.1619999408721924,
-                                        2.1649999618530273,
-                                        2.1679999828338623,
-                                        2.1710000038146973,
-                                        2.1740000247955322,
-                                        2.177000045776367,
-                                        2.180000066757202,
-                                        2.183000087738037,
-                                        2.186000108718872,
-                                        2.188999891281128,
-                                        2.191999912261963,
-                                        2.194999933242798,
-                                        2.197999954223633,
-                                        2.2009999752044678,
-                                        2.2039999961853027,
-                                        2.2070000171661377,
-                                        2.2100000381469727,
-                                        2.2130000591278076,
-                                        2.2160000801086426,
-                                        2.2190001010894775,
-                                        2.2220001220703125,
-                                        2.2249999046325684,
-                                        2.2280001640319824,
-                                        2.2309999465942383,
-                                        2.2339999675750732,
-                                        2.236999988555908,
-                                        2.240000009536743,
-                                        2.243000030517578,
-                                        2.246000051498413,
-                                        2.249000072479248,
-                                        2.252000093460083,
-                                        2.254999876022339,
-                                        2.257999897003174,
-                                        2.260999917984009,
-                                        2.2639999389648438,
-                                        2.267000198364258,
-                                        2.2699999809265137,
-                                        2.2730000019073486,
-                                        2.2760000228881836,
-                                        2.2790000438690186,
-                                        2.2820000648498535,
-                                        2.2849998474121094,
-                                        2.2880001068115234,
-                                        2.2909998893737793,
-                                        2.2939999103546143,
-                                        2.296999931335449,
-                                        2.299999952316284,
-                                        2.302999973297119,
-                                        2.305999994277954,
-                                        2.309000015258789,
-                                        2.312000036239624,
-                                        2.315000057220459,
-                                        2.317999839782715,
-                                        2.321000099182129,
-                                        2.324000120162964,
-                                        2.3269999027252197,
-                                        2.3299999237060547,
-                                        2.3329999446868896,
-                                        2.3359999656677246,
-                                        2.3389999866485596,
-                                        2.3420000076293945,
-                                        2.3450000286102295,
-                                        2.3480000495910645,
-                                        2.3510000705718994,
-                                        2.3540000915527344,
-                                        2.3569998741149902,
-                                        2.3600001335144043,
-                                        2.36299991607666,
-                                        2.366000175476074,
-                                        2.36899995803833,
-                                        2.371999979019165,
-                                        2.375,
-                                        2.378000020980835,
-                                        2.38100004196167,
-                                        2.384000062942505,
-                                        2.38700008392334,
-                                        2.390000104904175,
-                                        2.3930001258850098,
-                                        2.3959999084472656,
-                                        2.3989999294281006,
-                                        2.4019999504089355,
-                                        2.4049999713897705,
-                                        2.4079999923706055,
-                                        2.4110000133514404,
-                                        2.4140000343322754,
-                                        2.4170000553131104,
-                                        2.4200000762939453,
-                                        2.422999858856201,
-                                        2.4260001182556152,
-                                        2.428999900817871,
-                                        2.432000160217285,
-                                        2.434999942779541,
-                                        2.437999963760376,
-                                        2.440999984741211,
-                                        2.444000005722046,
-                                        2.447000026702881,
-                                        2.450000047683716,
-                                        2.453000068664551,
-                                        2.4560000896453857,
-                                        2.4590001106262207,
-                                        2.4619998931884766,
-                                        2.4650001525878906,
-                                        2.4679999351501465,
-                                        2.4709999561309814,
-                                        2.4739999771118164,
-                                        2.4769999980926514,
-                                        2.4800000190734863,
-                                        2.4830000400543213,
-                                        2.4860000610351562,
-                                        2.489000082015991,
-                                        2.492000102996826,
-                                        2.494999885559082,
-                                        2.498000144958496,
-                                        2.500999927520752,
-                                        2.504000186920166,
-                                        2.506999969482422,
-                                        2.509999990463257,
-                                        2.513000011444092,
-                                        2.5160000324249268,
-                                        2.5190000534057617,
-                                        2.5220000743865967,
-                                        2.5250000953674316,
-                                        2.5280001163482666,
-                                        2.5310001373291016,
-                                        2.5339999198913574,
-                                        2.5370001792907715,
-                                        2.5399999618530273,
-                                        2.5429999828338623,
-                                        2.5460000038146973,
-                                        2.5490000247955322,
-                                        2.552000045776367,
-                                        2.555000066757202,
-                                        2.558000087738037,
-                                        2.561000108718872,
-                                        2.564000129699707,
-                                        2.566999912261963,
-                                        2.570000171661377,
-                                        2.572999954223633,
-                                        2.5759999752044678,
-                                        2.5789999961853027,
-                                        2.5820000171661377,
-                                        2.5850000381469727,
-                                        2.5880000591278076,
-                                        2.5910000801086426,
-                                        2.5939998626708984,
-                                        2.5970001220703125,
-                                        2.5999999046325684,
-                                        2.6030001640319824,
-                                        2.6059999465942383,
-                                        2.6090002059936523,
-                                        2.611999988555908,
-                                        2.615000009536743,
-                                        2.618000030517578,
-                                        2.620999813079834,
-                                        2.624000072479248,
-                                        2.627000093460083,
-                                        2.630000114440918,
-                                        2.632999897003174,
-                                        2.635999917984009,
-                                        2.6389999389648438,
-                                        2.642000198364258,
-                                        2.6449999809265137,
-                                        2.6480000019073486,
-                                        2.6510000228881836,
-                                        2.6540000438690186,
-                                        2.6570000648498535,
-                                        2.6599998474121094,
-                                        2.6630001068115234,
-                                        2.6659998893737793,
-                                        2.6690001487731934,
-                                        2.671999931335449,
-                                        2.674999952316284,
-                                        2.677999973297119,
-                                        2.681000232696533,
-                                        2.684000015258789,
-                                        2.687000036239624,
-                                        2.690000057220459,
-                                        2.692999839782715,
-                                        2.696000099182129,
-                                        2.6989998817443848,
-                                        2.702000141143799,
-                                        2.7049999237060547,
-                                        2.7080001831054688,
-                                        2.7109999656677246,
-                                        2.7139999866485596,
-                                        2.7170000076293945,
-                                        2.7200000286102295,
-                                        2.7230000495910645,
-                                        2.7260000705718994,
-                                        2.7290000915527344,
-                                        2.7319998741149902,
-                                        2.7350001335144043,
-                                        2.73799991607666,
-                                        2.741000175476074,
-                                        2.74399995803833,
-                                        2.747000217437744,
-                                        2.75,
-                                        2.753000020980835,
-                                        2.75600004196167,
-                                        2.759000062942505,
-                                        2.76200008392334,
-                                        2.765000104904175,
-                                        2.7680001258850098,
-                                        2.7709999084472656,
-                                        2.7740001678466797,
-                                        2.7769999504089355,
-                                        2.7800002098083496,
-                                        2.7829999923706055,
-                                        2.7860002517700195,
-                                        2.7890000343322754,
-                                        2.7919998168945312,
-                                        2.7950000762939453,
-                                        2.797999858856201,
-                                        2.8010001182556152,
-                                        2.803999900817871,
-                                        2.807000160217285,
-                                        2.809999942779541,
-                                        2.812999963760376,
-                                        2.815999984741211,
-                                        2.819000005722046,
-                                        2.822000026702881,
-                                        2.825000047683716,
-                                        2.828000068664551,
-                                        2.8309998512268066,
-                                        2.8340001106262207,
-                                        2.8369998931884766,
-                                        2.8400001525878906,
-                                        2.8429999351501465,
-                                        2.8460001945495605,
-                                        2.8489999771118164,
-                                        2.8519999980926514,
-                                        2.8550000190734863,
-                                        2.8580000400543213,
-                                        2.8610000610351562,
-                                        2.864000082015991,
-                                        2.867000102996826,
-                                        2.869999885559082,
-                                        2.873000144958496,
-                                        2.875999927520752,
-                                        2.879000186920166,
-                                        2.881999969482422,
-                                        2.885000228881836,
-                                        2.888000011444092,
-                                        2.8909997940063477,
-                                        2.8940000534057617,
-                                        2.8969998359680176,
-                                        2.9000000953674316,
-                                        2.9029998779296875,
-                                        2.9060001373291016,
-                                        2.9089999198913574,
-                                        2.9120001792907715,
-                                        2.9149999618530273,
-                                        2.9180002212524414,
-                                        2.9210000038146973,
-                                        2.9240002632141113,
-                                        2.927000045776367,
-                                        2.930000066757202,
-                                        2.933000087738037,
-                                        2.935999870300293,
-                                        2.939000129699707,
-                                        2.941999912261963,
-                                        2.945000171661377,
-                                        2.947999954223633,
-                                        2.9509999752044678,
-                                        2.9539999961853027,
-                                        2.9570000171661377,
-                                        2.9600000381469727,
-                                        2.9630000591278076,
-                                        2.9660000801086426,
-                                        2.9689998626708984,
-                                        2.9720001220703125,
-                                        2.9749999046325684,
-                                        2.9780001640319824,
-                                        2.9809999465942383,
-                                        2.9840002059936523,
-                                        2.986999988555908,
-                                        2.990000009536743,
-                                        2.993000030517578,
-                                        2.996000051498413,
-                                        2.999000072479248,
-                                        3.002000093460083,
-                                        3.005000114440918,
-                                        3.007999897003174,
-                                        3.011000156402588,
-                                        3.0139999389648438,
-                                        3.017000198364258,
-                                        3.0199999809265137,
-                                        3.0230002403259277,
-                                        3.0260000228881836,
-                                        3.0290000438690186,
-                                        3.0320000648498535,
-                                        3.0349998474121094,
-                                        3.0380001068115234,
-                                        3.0409998893737793,
-                                        3.0440001487731934,
-                                        3.046999931335449,
-                                        3.0500001907348633,
-                                        3.052999973297119,
-                                        3.056000232696533,
-                                        3.059000015258789,
-                                        3.062000274658203,
-                                        3.065000057220459,
-                                        3.068000078201294,
-                                        3.071000099182129,
-                                        3.074000120162964,
-                                        3.077000141143799,
-                                        3.0799999237060547,
-                                        3.0830001831054688,
-                                        3.0859999656677246,
-                                        3.0889999866485596,
-                                        3.0920000076293945,
-                                        3.0950000286102295,
-                                        3.0980000495910645,
-                                        3.1010000705718994,
-                                        3.1040000915527344,
-                                        3.1069998741149902,
-                                        3.1100001335144043,
-                                        3.11299991607666,
-                                        3.116000175476074,
-                                        3.11899995803833,
-                                        3.122000217437744,
-                                        3.125,
-                                        3.128000020980835,
-                                        3.13100004196167,
-                                        3.134000062942505,
-                                        3.13700008392334,
-                                        3.140000104904175,
-                                        3.1430001258850098,
-                                        3.1459999084472656,
-                                        3.1490001678466797,
-                                        3.1519999504089355,
-                                        3.1549999713897705,
-                                        3.1579999923706055,
-                                        3.1610000133514404,
-                                        3.1640000343322754,
-                                        3.1669998168945312,
-                                        3.1700000762939453,
-                                        3.172999858856201,
-                                        3.1760001182556152,
-                                        3.178999900817871,
-                                        3.182000160217285,
-                                        3.184999942779541,
-                                        3.188000202178955,
-                                        3.190999984741211,
-                                        3.194000244140625,
-                                        3.197000026702881,
-                                        3.200000047683716,
-                                        3.2029998302459717,
-                                        3.2059998512268066,
-                                        3.2089998722076416,
-                                        3.2119998931884766,
-                                        3.2150001525878906,
-                                        3.2180001735687256,
-                                        3.2210001945495605,
-                                        3.2240002155303955,
-                                        3.2269999980926514,
-                                        3.2300000190734863,
-                                        3.2330000400543213,
-                                        3.2360000610351562,
-                                        3.239000082015991,
-                                        3.242000102996826,
-                                        3.244999885559082,
-                                        3.247999906539917,
-                                        3.250999927520752,
-                                        3.254000186920166,
-                                        3.256999969482422,
-                                        3.260000228881836,
-                                        3.263000011444092,
-                                        3.2660000324249268,
-                                        3.2690000534057617,
-                                        3.2720000743865967,
-                                        3.2750000953674316,
-                                        3.2780001163482666,
-                                        3.2809998989105225,
-                                        3.2839999198913574,
-                                        3.2869999408721924,
-                                        3.2899999618530273,
-                                        3.2930002212524414,
-                                        3.2960000038146973,
-                                        3.2990000247955322,
-                                        3.302000045776367,
-                                        3.304999828338623,
-                                        3.308000087738037,
-                                        3.310999870300293,
-                                        3.314000129699707,
-                                        3.317000150680542,
-                                        3.319999933242798,
-                                        3.323000192642212,
-                                        3.3259999752044678,
-                                        3.3289999961853027,
-                                        3.332000255584717,
-                                        3.3350000381469727,
-                                        3.3380002975463867,
-                                        3.3410000801086426,
-                                        3.3439998626708984,
-                                        3.3469998836517334,
-                                        3.3499999046325684,
-                                        3.3530001640319824,
-                                        3.3560001850128174,
-                                        3.3590002059936523,
-                                        3.3620002269744873,
-                                        3.365000009536743,
-                                        3.368000030517578,
-                                        3.371000051498413,
-                                        3.374000072479248,
-                                        3.377000093460083,
-                                        3.380000114440918,
-                                        3.382999897003174,
-                                        3.386000156402588,
-                                        3.3889999389648438,
-                                        3.392000198364258,
-                                        3.3949999809265137,
-                                        3.3980002403259277,
-                                        3.4010000228881836,
-                                        3.4040000438690186,
-                                        3.4070000648498535,
-                                        3.4100000858306885,
-                                        3.4130001068115234,
-                                        3.4160001277923584,
-                                        3.4189999103546143,
-                                        3.421999931335449,
-                                        3.424999952316284,
-                                        3.427999973297119,
-                                        3.431000232696533,
-                                        3.434000253677368,
-                                        3.437000274658203,
-                                        3.440000057220459,
-                                        3.442999839782715,
-                                        3.446000099182129,
-                                        3.4489998817443848,
-                                        3.452000141143799,
-                                        3.455000162124634,
-                                        3.4579999446868896,
-                                        3.4610002040863037,
-                                        3.4639999866485596,
-                                        3.4670000076293945,
-                                        3.4700002670288086,
-                                        3.4730000495910645,
-                                        3.4760003089904785,
-                                        3.4790000915527344,
-                                        3.4820001125335693,
-                                        3.4850001335144043,
-                                        3.48799991607666,
-                                        3.491000175476074,
-                                        3.494000196456909,
-                                        3.497000217437744,
-                                        3.5,
-                                        3.503000020980835,
-                                        3.50600004196167,
-                                        3.509000062942505,
-                                        3.5119998455047607,
-                                        3.5149998664855957,
-                                        3.5179998874664307,
-                                        3.5209999084472656,
-                                        3.5239996910095215,
-                                        3.5269997119903564,
-                                        3.5299997329711914,
-                                        3.5329999923706055,
-                                        3.5360000133514404,
-                                        3.5390000343322754,
-                                        3.5419998168945312,
-                                        3.544999837875366,
-                                        3.547999858856201,
-                                        3.550999879837036,
-                                        3.553999900817871,
-                                        3.557000160217285,
-                                        3.559999942779541,
-                                        3.562999725341797,
-                                        3.565999746322632,
-                                        3.569000005722046,
-                                        3.572000026702881,
-                                        3.575000047683716,
-                                        3.578000068664551,
-                                        3.5809998512268066,
-                                        3.5839998722076416,
-                                        3.5869998931884766,
-                                        3.5899999141693115,
-                                        3.5930001735687256,
-                                        3.5960001945495605,
-                                        3.5989999771118164,
-                                        3.6019997596740723,
-                                        3.6050000190734863,
-                                        3.607999801635742,
-                                        3.610999822616577,
-                                        3.613999843597412,
-                                        3.617000102996826,
-                                        3.619999885559082,
-                                        3.622999668121338,
-                                        3.625999689102173,
-                                        3.628999948501587,
-                                        3.631999969482422,
-                                        3.634999990463257,
-                                        3.638000011444092,
-                                        3.6409997940063477,
-                                        3.6439998149871826,
-                                        3.6469998359680176,
-                                        3.6499998569488525,
-                                        3.6530001163482666,
-                                        3.6560001373291016,
-                                        3.6589999198913574,
-                                        3.6619997024536133,
-                                        3.6649999618530273,
-                                        3.6679999828338623,
-                                        3.6710000038146973,
-                                        3.6740000247955322,
-                                        3.677000045776367,
-                                        3.679999828338623,
-                                        3.682999849319458,
-                                        3.685999870300293,
-                                        3.689000129699707,
-                                        3.692000150680542,
-                                        3.695000171661377,
-                                        3.697999954223633,
-                                        3.7009999752044678,
-                                        3.7039997577667236,
-                                        3.7069997787475586,
-                                        3.7099997997283936,
-                                        3.7130000591278076,
-                                        3.7160000801086426,
-                                        3.7189998626708984,
-                                        3.7219996452331543,
-                                        3.7249999046325684,
-                                        3.7279999256134033,
-                                        3.7309999465942383,
-                                        3.7339999675750732,
-                                        3.736999988555908,
-                                        3.739999771118164,
-                                        3.742999792098999,
-                                        3.745999813079834,
-                                        3.749000072479248,
-                                        3.752000093460083,
-                                        3.755000114440918,
-                                        3.757999897003174,
-                                        3.760999917984009,
-                                        3.7639999389648438,
-                                        3.7669999599456787,
-                                        3.7699999809265137,
-                                        3.7730002403259277,
-                                        3.7760000228881836,
-                                        3.7789998054504395,
-                                        3.7819998264312744,
-                                        3.7850000858306885,
-                                        3.7880001068115234,
-                                        3.7910001277923584,
-                                        3.7940001487731934,
-                                        3.796999931335449,
-                                        3.799999713897705,
-                                        3.80299973487854,
-                                        3.805999755859375,
-                                        3.809000015258789,
-                                        3.812000036239624,
-                                        3.815000057220459,
-                                        3.817999839782715,
-                                        3.82099986076355,
-                                        3.8239998817443848,
-                                        3.8269999027252197,
-                                        3.8299999237060547,
-                                        3.8330001831054688,
-                                        3.8359999656677246,
-                                        3.8389997482299805,
-                                        3.8419997692108154,
-                                        3.8450000286102295,
-                                        3.8480000495910645,
-                                        3.8510000705718994,
-                                        3.8540000915527344,
-                                        3.8569998741149902,
-                                        3.859999895095825,
-                                        3.86299991607666,
-                                        3.865999937057495,
-                                        3.869000196456909,
-                                        3.871999979019165,
-                                        3.875,
-                                        3.877999782562256,
-                                        3.880999803543091,
-                                        3.883999824523926,
-                                        3.8869998455047607,
-                                        3.8899998664855957,
-                                        3.8930001258850098,
-                                        3.8959999084472656,
-                                        3.8989996910095215,
-                                        3.9019997119903564,
-                                        3.9049999713897705,
-                                        3.9079999923706055,
-                                        3.9110000133514404,
-                                        3.9140000343322754,
-                                        3.9169998168945312,
-                                        3.919999837875366,
-                                        3.922999858856201,
-                                        3.925999879837036,
-                                        3.92900013923645,
-                                        3.932000160217285,
-                                        3.934999942779541,
-                                        3.937999725341797,
-                                        3.940999984741211,
-                                        3.944000005722046,
-                                        3.947000026702881,
-                                        3.950000047683716,
-                                        3.953000068664551,
-                                        3.9559998512268066,
-                                        3.9589998722076416,
-                                        3.9619998931884766,
-                                        3.9650001525878906,
-                                        3.9679999351501465,
-                                        3.9709999561309814,
-                                        3.9739999771118164,
-                                        3.9769997596740723,
-                                        3.9799997806549072,
-                                        3.982999801635742,
-                                        3.985999822616577,
-                                        3.989000082015991,
-                                        3.992000102996826,
-                                        3.994999885559082,
-                                        3.997999668121338,
-                                        4.000999927520752,
-                                        4.003999710083008,
-                                        4.006999969482422,
-                                        4.010000228881836,
-                                        4.013000011444092,
-                                        4.015999794006348,
-                                        4.019000053405762,
-                                        4.021999835968018,
-                                        4.025000095367432,
-                                        4.0279998779296875,
-                                        4.031000137329102,
-                                        4.033999919891357,
-                                        4.036999702453613,
-                                        4.039999961853027,
-                                        4.043000221252441,
-                                        4.046000003814697,
-                                        4.049000263214111,
-                                        4.052000045776367,
-                                        4.054999828338623,
-                                        4.057999610900879,
-                                        4.060999870300293,
-                                        4.064000129699707,
-                                        4.066999912261963,
-                                        4.069999694824219,
-                                        4.072999954223633,
-                                        4.075999736785889,
-                                        4.0789995193481445,
-                                        4.081999778747559,
-                                        4.085000038146973,
-                                        4.088000297546387,
-                                        4.091000080108643,
-                                        4.093999862670898,
-                                        4.0970001220703125,
-                                        4.099999904632568,
-                                        4.102999687194824,
-                                        4.105999946594238,
-                                        4.109000205993652,
-                                        4.111999988555908,
-                                        4.114999771118164,
-                                        4.118000030517578,
-                                        4.121000289916992,
-                                        4.124000072479248,
-                                        4.126999855041504,
-                                        4.130000114440918,
-                                        4.132999897003174,
-                                        4.13599967956543,
-                                        4.138999938964844,
-                                        4.142000198364258,
-                                        4.145000457763672,
-                                        4.148000240325928,
-                                        4.151000022888184,
-                                        4.1539998054504395,
-                                        4.1570000648498535,
-                                        4.159999847412109,
-                                        4.163000106811523,
-                                        4.165999889373779,
-                                        4.169000148773193,
-                                        4.171999931335449,
-                                        4.174999713897705,
-                                        4.177999496459961,
-                                        4.180999755859375,
-                                        4.184000015258789,
-                                        4.187000274658203,
-                                        4.190000057220459,
-                                        4.192999839782715,
-                                        4.196000099182129,
-                                        4.198999881744385,
-                                        4.201999664306641,
-                                        4.204999923706055,
-                                        4.208000183105469,
-                                        4.210999965667725,
-                                        4.2139997482299805,
-                                        4.2170000076293945,
-                                        4.220000267028809,
-                                        4.2230000495910645,
-                                        4.22599983215332,
-                                        4.229000091552734,
-                                        4.23199987411499,
-                                        4.234999656677246,
-                                        4.23799991607666,
-                                        4.241000175476074,
-                                        4.24399995803833,
-                                        4.246999740600586,
-                                        4.25,
-                                        4.252999782562256,
-                                        4.255999565124512,
-                                        4.258999824523926,
-                                        4.26200008392334,
-                                        4.265000343322754,
-                                        4.26800012588501,
-                                        4.270999908447266,
-                                        4.2739996910095215,
-                                        4.2769999504089355,
-                                        4.279999732971191,
-                                        4.2829999923706055,
-                                        4.2860002517700195,
-                                        4.289000034332275,
-                                        4.291999816894531,
-                                        4.295000076293945,
-                                        4.297999858856201,
-                                        4.301000118255615,
-                                        4.303999900817871,
-                                        4.307000160217285,
-                                        4.309999942779541,
-                                        4.312999725341797,
-                                        4.315999984741211,
-                                        4.319000244140625,
-                                        4.322000026702881,
-                                        4.325000286102295,
-                                        4.328000068664551,
-                                        4.330999851226807,
-                                        4.3339996337890625,
-                                        4.336999893188477,
-                                        4.340000152587891,
-                                        4.3429999351501465,
-                                        4.345999717712402,
-                                        4.348999977111816,
-                                        4.351999759674072,
-                                        4.354999542236328,
-                                        4.357999801635742,
-                                        4.361000061035156,
-                                        4.36400032043457,
-                                        4.367000102996826,
-                                        4.369999885559082,
-                                        4.373000144958496,
-                                        4.375999927520752,
-                                        4.378999710083008,
-                                        4.381999969482422,
-                                        4.385000228881836,
-                                        4.388000011444092,
-                                        4.390999794006348,
-                                        4.394000053405762,
-                                        4.397000312805176,
-                                        4.400000095367432,
-                                        4.4029998779296875,
-                                        4.405999660491943,
-                                        4.409000396728516,
-                                        4.411999702453613,
-                                        4.414999961853027,
-                                        4.417999744415283,
-                                        4.4210004806518555,
-                                        4.423999786376953,
-                                        4.426999568939209,
-                                        4.429999828338623,
-                                        4.432999610900879,
-                                        4.435999870300293,
-                                        4.438999652862549,
-                                        4.441999912261963,
-                                        4.444999694824219,
-                                        4.447999954223633,
-                                        4.451000213623047,
-                                        4.4539995193481445,
-                                        4.457000255584717,
-                                        4.460000038146973,
-                                        4.463000297546387,
-                                        4.465999603271484,
-                                        4.469000339508057,
-                                        4.4720001220703125,
-                                        4.474999904632568,
-                                        4.478000164031982,
-                                        4.480999946594238,
-                                        4.483999729156494,
-                                        4.486999988555908,
-                                        4.490000247955322,
-                                        4.493000030517578,
-                                        4.495999813079834,
-                                        4.499000072479248,
-                                        4.501999855041504,
-                                        4.505000114440918,
-                                        4.508000373840332,
-                                        4.51099967956543,
-                                        4.513999938964844,
-                                        4.517000198364258,
-                                        4.519999980926514,
-                                        4.5229997634887695,
-                                        4.525999546051025,
-                                        4.529000282287598,
-                                        4.531999588012695,
-                                        4.534999847412109,
-                                        4.537999629974365,
-                                        4.5410003662109375,
-                                        4.543999671936035,
-                                        4.546999931335449,
-                                        4.550000190734863,
-                                        4.552999973297119,
-                                        4.556000232696533,
-                                        4.559000015258789,
-                                        4.562000274658203,
-                                        4.565000057220459,
-                                        4.568000316619873,
-                                        4.571000099182129,
-                                        4.573999881744385,
-                                        4.577000141143799,
-                                        4.579999923706055,
-                                        4.5829997062683105,
-                                        4.585999965667725,
-                                        4.5889997482299805,
-                                        4.5920000076293945,
-                                        4.59499979019165,
-                                        4.5980000495910645,
-                                        4.60099983215332,
-                                        4.604000091552734,
-                                        4.607000350952148,
-                                        4.609999656677246,
-                                        4.613000392913818,
-                                        4.615999698638916,
-                                        4.61899995803833,
-                                        4.621999740600586,
-                                        4.625,
-                                        4.628000259399414,
-                                        4.630999565124512,
-                                        4.633999824523926,
-                                        4.63700008392334,
-                                        4.640000343322754,
-                                        4.642999649047852,
-                                        4.645999908447266,
-                                        4.64900016784668,
-                                        4.6519999504089355,
-                                        4.65500020980835,
-                                        4.6579999923706055,
-                                        4.660999774932861,
-                                        4.664000034332275,
-                                        4.6670002937316895,
-                                        4.670000076293945,
-                                        4.672999858856201,
-                                        4.676000118255615,
-                                        4.678999900817871,
-                                        4.681999683380127,
-                                        4.685000419616699,
-                                        4.688000202178955,
-                                        4.690999984741211,
-                                        4.693999767303467,
-                                        4.697000026702881,
-                                        4.699999809265137,
-                                        4.702999591827393,
-                                        4.705999851226807,
-                                        4.7089996337890625,
-                                        4.711999893188477,
-                                        4.714999675750732,
-                                        4.7179999351501465,
-                                        4.720999717712402,
-                                        4.723999977111816,
-                                        4.7270002365112305,
-                                        4.729999542236328,
-                                        4.7330002784729,
-                                        4.736000061035156,
-                                        4.73900032043457,
-                                        4.741999626159668,
-                                        4.74500036239624,
-                                        4.748000144958496,
-                                        4.750999927520752,
-                                        4.754000186920166,
-                                        4.756999969482422,
-                                        4.759999752044678,
-                                        4.763000011444092,
-                                        4.766000270843506,
-                                        4.769000053405762,
-                                        4.771999835968018,
-                                        4.775000095367432,
-                                        4.7779998779296875,
-                                        4.781000137329102,
-                                        4.783999919891357,
-                                        4.7870001792907715,
-                                        4.789999961853027,
-                                        4.792999744415283,
-                                        4.796000003814697,
-                                        4.798999786376953,
-                                        4.801999568939209,
-                                        4.805000305175781,
-                                        4.807999610900879,
-                                        4.810999870300293,
-                                        4.813999652862549,
-                                        4.817000389099121,
-                                        4.819999694824219,
-                                        4.822999954223633,
-                                        4.826000213623047,
-                                        4.828999996185303,
-                                        4.832000255584717,
-                                        4.835000038146973,
-                                        4.838000297546387,
-                                        4.841000080108643,
-                                        4.844000339508057,
-                                        4.8470001220703125,
-                                        4.849999904632568,
-                                        4.853000164031982,
-                                        4.855999946594238,
-                                        4.858999729156494,
-                                        4.861999988555908,
-                                        4.864999771118164,
-                                        4.868000030517578,
-                                        4.870999813079834,
-                                        4.874000072479248,
-                                        4.876999855041504,
-                                        4.87999963760376,
-                                        4.882999897003174,
-                                        4.886000156402588,
-                                        4.888999938964844,
-                                        4.8919997215271,
-                                        4.894999980926514,
-                                        4.8979997634887695,
-                                        4.901000022888184,
-                                        4.904000282287598,
-                                        4.906999588012695,
-                                        4.909999847412109,
-                                        4.913000106811523,
-                                        4.9160003662109375,
-                                        4.918999671936035,
-                                        4.921999931335449,
-                                        4.925000190734863,
-                                        4.927999973297119,
-                                        4.931000232696533,
-                                        4.934000015258789,
-                                        4.936999797821045,
-                                        4.940000057220459,
-                                        4.943000316619873,
-                                        4.946000099182129,
-                                        4.948999881744385,
-                                        4.952000141143799,
-                                        4.954999923706055,
-                                        4.9579997062683105,
-                                        4.961000442504883,
-                                        4.9639997482299805,
-                                        4.9670000076293945,
-                                        4.96999979019165,
-                                        4.973000526428223,
-                                        4.97599983215332,
-                                        4.978999614715576,
-                                        4.982000350952148,
-                                        4.984999656677246,
-                                        4.98799991607666,
-                                        4.990999698638916,
-                                        4.994000434875488,
-                                        4.996999740600586
-                                    ],
-                                    "xaxis": "x",
-                                    "yaxis": "y"
-                                },
-                                {
-                                    "nbinsx": 50,
-                                    "opacity": 0.7,
-                                    "type": "histogram",
-                                    "x": [
-                                        2,
-                                        2.0012006759643555,
-                                        2.0024027824401855,
-                                        2.0036065578460693,
-                                        2.0048115253448486,
-                                        2.0060181617736816,
-                                        2.00722599029541,
-                                        2.0084354877471924,
-                                        2.009646415710449,
-                                        2.0108585357666016,
-                                        2.0120723247528076,
-                                        2.0132875442504883,
-                                        2.0145044326782227,
-                                        2.0157225131988525,
-                                        2.016942262649536,
-                                        2.0181634426116943,
-                                        2.019386053085327,
-                                        2.0206103324890137,
-                                        2.0218358039855957,
-                                        2.0230629444122314,
-                                        2.024291515350342,
-                                        2.0255215167999268,
-                                        2.0267531871795654,
-                                        2.0279862880706787,
-                                        2.0292208194732666,
-                                        2.030456781387329,
-                                        2.0316944122314453,
-                                        2.032933473587036,
-                                        2.0341742038726807,
-                                        2.0354161262512207,
-                                        2.0366597175598145,
-                                        2.037905216217041,
-                                        2.039151668548584,
-                                        2.0404000282287598,
-                                        2.041649580001831,
-                                        2.042901039123535,
-                                        2.0441536903381348,
-                                        2.045408010482788,
-                                        2.046663761138916,
-                                        2.0479211807250977,
-                                        2.049180507659912,
-                                        2.050440788269043,
-                                        2.0517029762268066,
-                                        2.052966594696045,
-                                        2.054231882095337,
-                                        2.0554983615875244,
-                                        2.0567667484283447,
-                                        2.0580365657806396,
-                                        2.0593080520629883,
-                                        2.0605812072753906,
-                                        2.0618557929992676,
-                                        2.063131809234619,
-                                        2.0644094944000244,
-                                        2.0656888484954834,
-                                        2.066969871520996,
-                                        2.0682523250579834,
-                                        2.0695364475250244,
-                                        2.07082200050354,
-                                        2.0721094608306885,
-                                        2.0733983516693115,
-                                        2.0746889114379883,
-                                        2.0759809017181396,
-                                        2.0772745609283447,
-                                        2.0785698890686035,
-                                        2.079866886138916,
-                                        2.081165313720703,
-                                        2.082465648651123,
-                                        2.0837676525115967,
-                                        2.085071086883545,
-                                        2.0863759517669678,
-                                        2.0876827239990234,
-                                        2.0889909267425537,
-                                        2.090301036834717,
-                                        2.0916125774383545,
-                                        2.092925786972046,
-                                        2.094240665435791,
-                                        2.095557451248169,
-                                        2.0968756675720215,
-                                        2.0981955528259277,
-                                        2.0995171070098877,
-                                        2.1008403301239014,
-                                        2.1021652221679688,
-                                        2.10349178314209,
-                                        2.1048200130462646,
-                                        2.106149911880493,
-                                        2.1074817180633545,
-                                        2.1088149547576904,
-                                        2.11014986038208,
-                                        2.1114864349365234,
-                                        2.1128249168395996,
-                                        2.1141650676727295,
-                                        2.115506649017334,
-                                        2.1168501377105713,
-                                        2.1181952953338623,
-                                        2.119542121887207,
-                                        2.1208908557891846,
-                                        2.1222410202026367,
-                                        2.1235930919647217,
-                                        2.1249468326568604,
-                                        2.1263022422790527,
-                                        2.127659559249878,
-                                        2.129018545150757,
-                                        2.1303791999816895,
-                                        2.131741523742676,
-                                        2.133105754852295,
-                                        2.1344716548919678,
-                                        2.1358394622802734,
-                                        2.1372087001800537,
-                                        2.138579845428467,
-                                        2.1399528980255127,
-                                        2.1413276195526123,
-                                        2.1427042484283447,
-                                        2.1440823078155518,
-                                        2.1454625129699707,
-                                        2.1468441486358643,
-                                        2.1482276916503906,
-                                        2.14961314201355,
-                                        2.1510000228881836,
-                                        2.1523890495300293,
-                                        2.153779983520508,
-                                        2.15517258644104,
-                                        2.156566858291626,
-                                        2.1579627990722656,
-                                        2.159360885620117,
-                                        2.1607606410980225,
-                                        2.1621620655059814,
-                                        2.1635653972625732,
-                                        2.164970636367798,
-                                        2.1663777828216553,
-                                        2.1677868366241455,
-                                        2.1691973209381104,
-                                        2.170609951019287,
-                                        2.1720242500305176,
-                                        2.17344069480896,
-                                        2.174858570098877,
-                                        2.176278591156006,
-                                        2.1777002811431885,
-                                        2.179124116897583,
-                                        2.1805496215820312,
-                                        2.181976795196533,
-                                        2.183406114578247,
-                                        2.1848373413085938,
-                                        2.186270236968994,
-                                        2.1877050399780273,
-                                        2.1891417503356934,
-                                        2.190580368041992,
-                                        2.192021131515503,
-                                        2.1934635639190674,
-                                        2.1949079036712646,
-                                        2.1963541507720947,
-                                        2.1978020668029785,
-                                        2.1992523670196533,
-                                        2.2007040977478027,
-                                        2.202157974243164,
-                                        2.2036139965057373,
-                                        2.2050716876983643,
-                                        2.206531524658203,
-                                        2.2079930305480957,
-                                        2.209456443786621,
-                                        2.2109220027923584,
-                                        2.2123894691467285,
-                                        2.2138588428497314,
-                                        2.215330123901367,
-                                        2.2168033123016357,
-                                        2.218278646469116,
-                                        2.2197558879852295,
-                                        2.2212350368499756,
-                                        2.2227160930633545,
-                                        2.2241992950439453,
-                                        2.225684404373169,
-                                        2.2271714210510254,
-                                        2.2286605834960938,
-                                        2.230151653289795,
-                                        2.231644630432129,
-                                        2.233139991760254,
-                                        2.2346370220184326,
-                                        2.236135959625244,
-                                        2.2376370429992676,
-                                        2.239140272140503,
-                                        2.240645408630371,
-                                        2.242152452468872,
-                                        2.243661642074585,
-                                        2.2451729774475098,
-                                        2.2466862201690674,
-                                        2.248201608657837,
-                                        2.2497189044952393,
-                                        2.2512381076812744,
-                                        2.2527596950531006,
-                                        2.2542831897735596,
-                                        2.2558085918426514,
-                                        2.257336139678955,
-                                        2.25886607170105,
-                                        2.2603979110717773,
-                                        2.2619316577911377,
-                                        2.26346755027771,
-                                        2.265005588531494,
-                                        2.2665457725524902,
-                                        2.2680881023406982,
-                                        2.269632339477539,
-                                        2.271178722381592,
-                                        2.2727272510528564,
-                                        2.274277925491333,
-                                        2.2758307456970215,
-                                        2.2773854732513428,
-                                        2.278942584991455,
-                                        2.2805016040802,
-                                        2.2820627689361572,
-                                        2.2836263179779053,
-                                        2.2851920127868652,
-                                        2.286759614944458,
-                                        2.288329601287842,
-                                        2.2899014949798584,
-                                        2.291475772857666,
-                                        2.2930519580841064,
-                                        2.294630527496338,
-                                        2.2962112426757812,
-                                        2.2977943420410156,
-                                        2.299379348754883,
-                                        2.300966501235962,
-                                        2.302555799484253,
-                                        2.304147481918335,
-                                        2.305741310119629,
-                                        2.3073372840881348,
-                                        2.3089354038238525,
-                                        2.3105359077453613,
-                                        2.312138795852661,
-                                        2.313743829727173,
-                                        2.3153507709503174,
-                                        2.316960096359253,
-                                        2.3185715675354004,
-                                        2.320185661315918,
-                                        2.3218016624450684,
-                                        2.3234200477600098,
-                                        2.325040817260742,
-                                        2.3266637325286865,
-                                        2.3282887935638428,
-                                        2.32991623878479,
-                                        2.331545829772949,
-                                        2.3331778049468994,
-                                        2.3348121643066406,
-                                        2.3364486694335938,
-                                        2.338087320327759,
-                                        2.339728355407715,
-                                        2.341372013092041,
-                                        2.343017816543579,
-                                        2.344666004180908,
-                                        2.346316337585449,
-                                        2.3479690551757812,
-                                        2.3496241569519043,
-                                        2.3512814044952393,
-                                        2.3529410362243652,
-                                        2.3546032905578613,
-                                        2.3562676906585693,
-                                        2.3579344749450684,
-                                        2.3596036434173584,
-                                        2.3612751960754395,
-                                        2.3629491329193115,
-                                        2.3646249771118164,
-                                        2.3663039207458496,
-                                        2.3679847717285156,
-                                        2.3696682453155518,
-                                        2.371354103088379,
-                                        2.373042345046997,
-                                        2.3747329711914062,
-                                        2.3764257431030273,
-                                        2.3781211376190186,
-                                        2.37981915473938,
-                                        2.381519317626953,
-                                        2.3832221031188965,
-                                        2.384927272796631,
-                                        2.3866348266601562,
-                                        2.3883450031280518,
-                                        2.390057325363159,
-                                        2.3917722702026367,
-                                        2.3934898376464844,
-                                        2.395209550857544,
-                                        2.3969318866729736,
-                                        2.3986566066741943,
-                                        2.400383949279785,
-                                        2.402114152908325,
-                                        2.403846025466919,
-                                        2.405580997467041,
-                                        2.407318353652954,
-                                        2.409058094024658,
-                                        2.4108004570007324,
-                                        2.4125449657440186,
-                                        2.414292573928833,
-                                        2.4160425662994385,
-                                        2.417794942855835,
-                                        2.4195501804351807,
-                                        2.4213075637817383,
-                                        2.423067569732666,
-                                        2.424830436706543,
-                                        2.426595449447632,
-                                        2.42836332321167,
-                                        2.430133581161499,
-                                        2.4319067001342773,
-                                        2.4336822032928467,
-                                        2.435460329055786,
-                                        2.4372410774230957,
-                                        2.4390244483947754,
-                                        2.440810203552246,
-                                        2.442599058151245,
-                                        2.444390058517456,
-                                        2.446183919906616,
-                                        2.4479804039001465,
-                                        2.449779510498047,
-                                        2.4515814781188965,
-                                        2.453385829925537,
-                                        2.455192804336548,
-                                        2.457002639770508,
-                                        2.458814859390259,
-                                        2.460629940032959,
-                                        2.46244740486145,
-                                        2.464268207550049,
-                                        2.4660913944244385,
-                                        2.467916965484619,
-                                        2.469745635986328,
-                                        2.4715769290924072,
-                                        2.4734108448028564,
-                                        2.475247621536255,
-                                        2.4770867824554443,
-                                        2.478929042816162,
-                                        2.48077392578125,
-                                        2.482621431350708,
-                                        2.4844722747802734,
-                                        2.486325263977051,
-                                        2.4881811141967773,
-                                        2.490039825439453,
-                                        2.491901159286499,
-                                        2.4937655925750732,
-                                        2.4956324100494385,
-                                        2.497502565383911,
-                                        2.499375104904175,
-                                        2.5012505054473877,
-                                        2.503129005432129,
-                                        2.5050101280212402,
-                                        2.5068938732147217,
-                                        2.5087809562683105,
-                                        2.5106701850891113,
-                                        2.5125627517700195,
-                                        2.514457941055298,
-                                        2.5163562297821045,
-                                        2.5182576179504395,
-                                        2.5201611518859863,
-                                        2.5220682621002197,
-                                        2.523977756500244,
-                                        2.525890350341797,
-                                        2.527805805206299,
-                                        2.52972412109375,
-                                        2.5316457748413086,
-                                        2.533569812774658,
-                                        2.535496950149536,
-                                        2.5374271869659424,
-                                        2.5393600463867188,
-                                        2.5412960052490234,
-                                        2.5432350635528564,
-                                        2.5451767444610596,
-                                        2.54712176322937,
-                                        2.54906964302063,
-                                        2.551020383834839,
-                                        2.552974224090576,
-                                        2.5549309253692627,
-                                        2.5568909645080566,
-                                        2.5588536262512207,
-                                        2.560819387435913,
-                                        2.562788486480713,
-                                        2.5647599697113037,
-                                        2.56673526763916,
-                                        2.5687131881713867,
-                                        2.5706942081451416,
-                                        2.572678327560425,
-                                        2.5746653079986572,
-                                        2.576655626296997,
-                                        2.5786490440368652,
-                                        2.5806450843811035,
-                                        2.5826447010040283,
-                                        2.5846471786499023,
-                                        2.586652994155884,
-                                        2.5886616706848145,
-                                        2.5906734466552734,
-                                        2.592688798904419,
-                                        2.5947067737579346,
-                                        2.5967280864715576,
-                                        2.598752498626709,
-                                        2.6007802486419678,
-                                        2.602811098098755,
-                                        2.604844808578491,
-                                        2.606882095336914,
-                                        2.6089224815368652,
-                                        2.6109659671783447,
-                                        2.6130127906799316,
-                                        2.615062713623047,
-                                        2.6171159744262695,
-                                        2.6191723346710205,
-                                        2.621232032775879,
-                                        2.6232950687408447,
-                                        2.6253609657287598,
-                                        2.6274304389953613,
-                                        2.629503011703491,
-                                        2.6315786838531494,
-                                        2.6336581707000732,
-                                        2.6357405185699463,
-                                        2.637826442718506,
-                                        2.639915704727173,
-                                        2.642007827758789,
-                                        2.644103765487671,
-                                        2.646202564239502,
-                                        2.6483049392700195,
-                                        2.6504108905792236,
-                                        2.652519941329956,
-                                        2.654632329940796,
-                                        2.6567482948303223,
-                                        2.658867359161377,
-                                        2.660989999771118,
-                                        2.663115978240967,
-                                        2.665245294570923,
-                                        2.6673779487609863,
-                                        2.6695139408111572,
-                                        2.6716537475585938,
-                                        2.6737966537475586,
-                                        2.675943374633789,
-                                        2.678093433380127,
-                                        2.680246591567993,
-                                        2.682403564453125,
-                                        2.684563636779785,
-                                        2.686727523803711,
-                                        2.6888949871063232,
-                                        2.691065549850464,
-                                        2.693240165710449,
-                                        2.695417881011963,
-                                        2.697599172592163,
-                                        2.69978404045105,
-                                        2.701972246170044,
-                                        2.704164505004883,
-                                        2.70635986328125,
-                                        2.7085587978363037,
-                                        2.710761785507202,
-                                        2.712967872619629,
-                                        2.7151780128479004,
-                                        2.7173914909362793,
-                                        2.7196083068847656,
-                                        2.7218291759490967,
-                                        2.724053382873535,
-                                        2.72628116607666,
-                                        2.72851300239563,
-                                        2.730748176574707,
-                                        2.732987403869629,
-                                        2.735229730606079,
-                                        2.737476110458374,
-                                        2.7397260665893555,
-                                        2.7419795989990234,
-                                        2.744237184524536,
-                                        2.7464981079101562,
-                                        2.748762845993042,
-                                        2.7510316371917725,
-                                        2.7533040046691895,
-                                        2.755580186843872,
-                                        2.7578601837158203,
-                                        2.760143518447876,
-                                        2.7624311447143555,
-                                        2.7647221088409424,
-                                        2.767017126083374,
-                                        2.7693159580230713,
-                                        2.771618366241455,
-                                        2.773925304412842,
-                                        2.776235580444336,
-                                        2.7785496711730957,
-                                        2.7808678150177,
-                                        2.783189296722412,
-                                        2.785515308380127,
-                                        2.7878448963165283,
-                                        2.7901785373687744,
-                                        2.792515993118286,
-                                        2.7948575019836426,
-                                        2.7972028255462646,
-                                        2.7995524406433105,
-                                        2.8019051551818848,
-                                        2.804262638092041,
-                                        2.806623697280884,
-                                        2.8089888095855713,
-                                        2.8113577365875244,
-                                        2.8137307167053223,
-                                        2.816108226776123,
-                                        2.8184893131256104,
-                                        2.8208744525909424,
-                                        2.8232638835906982,
-                                        2.8256568908691406,
-                                        2.828054428100586,
-                                        2.830455780029297,
-                                        2.8328611850738525,
-                                        2.835270881652832,
-                                        2.837684392929077,
-                                        2.840102434158325,
-                                        2.842524528503418,
-                                        2.8449501991271973,
-                                        2.8473806381225586,
-                                        2.8498146533966064,
-                                        2.8522531986236572,
-                                        2.8546957969665527,
-                                        2.857142925262451,
-                                        2.8595941066741943,
-                                        2.8620493412017822,
-                                        2.864508867263794,
-                                        2.8669724464416504,
-                                        2.8694403171539307,
-                                        2.8719124794006348,
-                                        2.874389171600342,
-                                        2.8768699169158936,
-                                        2.879354953765869,
-                                        2.8818440437316895,
-                                        2.884337902069092,
-                                        2.886835813522339,
-                                        2.8893380165100098,
-                                        2.8918449878692627,
-                                        2.8943560123443604,
-                                        2.896871328353882,
-                                        2.899390935897827,
-                                        2.9019150733947754,
-                                        2.9044437408447266,
-                                        2.9069766998291016,
-                                        2.9095139503479004,
-                                        2.9120559692382812,
-                                        2.914602041244507,
-                                        2.9171526432037354,
-                                        2.919708013534546,
-                                        2.9222676753997803,
-                                        2.9248318672180176,
-                                        2.9274003505706787,
-                                        2.929973602294922,
-                                        2.932551145553589,
-                                        2.935133457183838,
-                                        2.93772029876709,
-                                        2.9403116703033447,
-                                        2.9429075717926025,
-                                        2.9455080032348633,
-                                        2.948112964630127,
-                                        2.9507226943969727,
-                                        2.9533369541168213,
-                                        2.955955982208252,
-                                        2.9585797786712646,
-                                        2.9612081050872803,
-                                        2.963840961456299,
-                                        2.9664788246154785,
-                                        2.969120979309082,
-                                        2.9717681407928467,
-                                        2.9744198322296143,
-                                        2.977076530456543,
-                                        2.9797375202178955,
-                                        2.982403516769409,
-                                        2.985074520111084,
-                                        2.987750291824341,
-                                        2.9904305934906006,
-                                        2.9931156635284424,
-                                        2.9958057403564453,
-                                        2.9985008239746094,
-                                        3.0012004375457764,
-                                        3.0039048194885254,
-                                        3.0066146850585938,
-                                        3.009328842163086,
-                                        3.0120480060577393,
-                                        3.014772415161133,
-                                        3.0175013542175293,
-                                        3.020235776901245,
-                                        3.022974729537964,
-                                        3.0257184505462646,
-                                        3.0284674167633057,
-                                        3.031221628189087,
-                                        3.03398060798645,
-                                        3.0367443561553955,
-                                        3.039513349533081,
-                                        3.042287826538086,
-                                        3.0450668334960938,
-                                        3.047851085662842,
-                                        3.050640344619751,
-                                        3.0534350872039795,
-                                        3.056234836578369,
-                                        3.059039354324341,
-                                        3.0618491172790527,
-                                        3.064664363861084,
-                                        3.0674846172332764,
-                                        3.07030987739563,
-                                        3.0731406211853027,
-                                        3.075976610183716,
-                                        3.07881760597229,
-                                        3.0816638469696045,
-                                        3.0845155715942383,
-                                        3.0873727798461914,
-                                        3.0902349948883057,
-                                        3.09310245513916,
-                                        3.095975160598755,
-                                        3.098853588104248,
-                                        3.1017370223999023,
-                                        3.104625701904297,
-                                        3.107520341873169,
-                                        3.110419988632202,
-                                        3.1133248805999756,
-                                        3.1162357330322266,
-                                        3.1191515922546387,
-                                        3.122073173522949,
-                                        3.124999761581421,
-                                        3.12793231010437,
-                                        3.1308703422546387,
-                                        3.1338136196136475,
-                                        3.136762857437134,
-                                        3.1397173404693604,
-                                        3.1426773071289062,
-                                        3.1456432342529297,
-                                        3.1486144065856934,
-                                        3.1515913009643555,
-                                        3.154573917388916,
-                                        3.157562255859375,
-                                        3.1605563163757324,
-                                        3.163555860519409,
-                                        3.1665608882904053,
-                                        3.169572114944458,
-                                        3.17258882522583,
-                                        3.1756112575531006,
-                                        3.1786394119262695,
-                                        3.181673526763916,
-                                        3.184713363647461,
-                                        3.187758684158325,
-                                        3.190810441970825,
-                                        3.1938679218292236,
-                                        3.1969306468963623,
-                                        3.1999998092651367,
-                                        3.2030749320983887,
-                                        3.20615553855896,
-                                        3.209242343902588,
-                                        3.2123348712921143,
-                                        3.2154338359832764,
-                                        3.218538761138916,
-                                        3.221649408340454,
-                                        3.2247660160064697,
-                                        3.227888584136963,
-                                        3.231017589569092,
-                                        3.2341527938842773,
-                                        3.2372937202453613,
-                                        3.240440607070923,
-                                        3.243593692779541,
-                                        3.246752977371216,
-                                        3.2499186992645264,
-                                        3.2530901432037354,
-                                        3.256268262863159,
-                                        3.2594523429870605,
-                                        3.2626426219940186,
-                                        3.265839099884033,
-                                        3.269042491912842,
-                                        3.2722513675689697,
-                                        3.2754666805267334,
-                                        3.278688430786133,
-                                        3.281916379928589,
-                                        3.285151243209839,
-                                        3.2883918285369873,
-                                        3.2916393280029297,
-                                        3.2948930263519287,
-                                        3.2981529235839844,
-                                        3.301419496536255,
-                                        3.304692268371582,
-                                        3.3079721927642822,
-                                        3.31125807762146,
-                                        3.3145508766174316,
-                                        3.31784987449646,
-                                        3.321155548095703,
-                                        3.324467897415161,
-                                        3.327786684036255,
-                                        3.3311123847961426,
-                                        3.334444761276245,
-                                        3.3377835750579834,
-                                        3.3411290645599365,
-                                        3.3444812297821045,
-                                        3.3478405475616455,
-                                        3.3512065410614014,
-                                        3.354578971862793,
-                                        3.3579583168029785,
-                                        3.361344337463379,
-                                        3.3647372722625732,
-                                        3.3681373596191406,
-                                        3.371544122695923,
-                                        3.374957799911499,
-                                        3.378378391265869,
-                                        3.381805658340454,
-                                        3.385240077972412,
-                                        3.3886821269989014,
-                                        3.3921303749084473,
-                                        3.395585775375366,
-                                        3.399048328399658,
-                                        3.402517795562744,
-                                        3.405994176864624,
-                                        3.409477949142456,
-                                        3.412968873977661,
-                                        3.4164674282073975,
-                                        3.4199726581573486,
-                                        3.423485040664673,
-                                        3.42700457572937,
-                                        3.4305317401885986,
-                                        3.434065818786621,
-                                        3.437607526779175,
-                                        3.4411561489105225,
-                                        3.4447121620178223,
-                                        3.448275566101074,
-                                        3.4518463611602783,
-                                        3.4554247856140137,
-                                        3.4590108394622803,
-                                        3.462603807449341,
-                                        3.4662044048309326,
-                                        3.4698123931884766,
-                                        3.473428249359131,
-                                        3.4770517349243164,
-                                        3.480682373046875,
-                                        3.484320640563965,
-                                        3.487966299057007,
-                                        3.491619825363159,
-                                        3.495281457901001,
-                                        3.498950242996216,
-                                        3.50262713432312,
-                                        3.5063114166259766,
-                                        3.5100033283233643,
-                                        3.5137031078338623,
-                                        3.517411470413208,
-                                        3.5211267471313477,
-                                        3.5248498916625977,
-                                        3.5285816192626953,
-                                        3.532320737838745,
-                                        3.5360677242279053,
-                                        3.539822578430176,
-                                        3.5435855388641357,
-                                        3.5473573207855225,
-                                        3.5511364936828613,
-                                        3.5549235343933105,
-                                        3.558718681335449,
-                                        3.5625221729278564,
-                                        3.566333770751953,
-                                        3.5701537132263184,
-                                        3.573981523513794,
-                                        3.577817440032959,
-                                        3.5816617012023926,
-                                        3.5855140686035156,
-                                        3.5893752574920654,
-                                        3.593244791030884,
-                                        3.5971224308013916,
-                                        3.601008176803589,
-                                        3.604902505874634,
-                                        3.6088054180145264,
-                                        3.6127161979675293,
-                                        3.616636276245117,
-                                        3.6205644607543945,
-                                        3.6245014667510986,
-                                        3.6284468173980713,
-                                        3.6324007511138916,
-                                        3.6363632678985596,
-                                        3.6403350830078125,
-                                        3.644315004348755,
-                                        3.648303508758545,
-                                        3.6523008346557617,
-                                        3.656306743621826,
-                                        3.6603219509124756,
-                                        3.6643457412719727,
-                                        3.6683785915374756,
-                                        3.672420024871826,
-                                        3.6764702796936035,
-                                        3.6805295944213867,
-                                        3.684597969055176,
-                                        3.688675880432129,
-                                        3.6927623748779297,
-                                        3.6968576908111572,
-                                        3.7009620666503906,
-                                        3.705075979232788,
-                                        3.7091987133026123,
-                                        3.7133309841156006,
-                                        3.7174723148345947,
-                                        3.7216224670410156,
-                                        3.7257821559906006,
-                                        3.7299511432647705,
-                                        3.7341299057006836,
-                                        3.7383179664611816,
-                                        3.7425150871276855,
-                                        3.7467215061187744,
-                                        3.7509374618530273,
-                                        3.7551629543304443,
-                                        3.7593979835510254,
-                                        3.7636430263519287,
-                                        3.767897129058838,
-                                        3.7721614837646484,
-                                        3.776434898376465,
-                                        3.7807180881500244,
-                                        3.785010814666748,
-                                        3.7893145084381104,
-                                        3.7936267852783203,
-                                        3.7979490756988525,
-                                        3.802281141281128,
-                                        3.8066232204437256,
-                                        3.8109755516052246,
-                                        3.8153374195098877,
-                                        3.8197097778320312,
-                                        3.824091672897339,
-                                        3.828483819961548,
-                                        3.8328857421875,
-                                        3.8372981548309326,
-                                        3.841721296310425,
-                                        3.846153974533081,
-                                        3.8505969047546387,
-                                        3.8550498485565186,
-                                        3.859513759613037,
-                                        3.863987684249878,
-                                        3.8684723377227783,
-                                        3.872966766357422,
-                                        3.877471923828125,
-                                        3.8819873332977295,
-                                        3.8865134716033936,
-                                        3.891050100326538,
-                                        3.8955979347229004,
-                                        3.900156259536743,
-                                        3.9047248363494873,
-                                        3.909303903579712,
-                                        3.913893938064575,
-                                        3.918494939804077,
-                                        3.9231069087982178,
-                                        3.927729606628418,
-                                        3.932363271713257,
-                                        3.9370076656341553,
-                                        3.9416630268096924,
-                                        3.9463295936584473,
-                                        3.951007843017578,
-                                        3.9556963443756104,
-                                        3.9603960514068604,
-                                        3.965106964111328,
-                                        3.9698290824890137,
-                                        3.974562883377075,
-                                        3.9793074131011963,
-                                        3.9840638637542725,
-                                        3.9888312816619873,
-                                        3.993610143661499,
-                                        3.9984004497528076,
-                                        4.003202438354492,
-                                        4.008016109466553,
-                                        4.01284122467041,
-                                        4.0176777839660645,
-                                        4.022526264190674,
-                                        4.027386665344238,
-                                        4.032258033752441,
-                                        4.0371413230896,
-                                        4.042037010192871,
-                                        4.046944618225098,
-                                        4.051863670349121,
-                                        4.0567946434021,
-                                        4.06173849105835,
-                                        4.0666937828063965,
-                                        4.071661472320557,
-                                        4.076640605926514,
-                                        4.081632137298584,
-                                        4.086636543273926,
-                                        4.091652870178223,
-                                        4.096681594848633,
-                                        4.101722717285156,
-                                        4.106776237487793,
-                                        4.111842155456543,
-                                        4.116920471191406,
-                                        4.122011184692383,
-                                        4.127115249633789,
-                                        4.13223123550415,
-                                        4.137360095977783,
-                                        4.1425018310546875,
-                                        4.147656440734863,
-                                        4.1528239250183105,
-                                        4.158004283905029,
-                                        4.1631975173950195,
-                                        4.168403625488281,
-                                        4.173623085021973,
-                                        4.178854942321777,
-                                        4.184100151062012,
-                                        4.189359188079834,
-                                        4.1946306228637695,
-                                        4.199915885925293,
-                                        4.205214023590088,
-                                        4.210526466369629,
-                                        4.215851306915283,
-                                        4.221189975738525,
-                                        4.2265424728393555,
-                                        4.231908321380615,
-                                        4.237287998199463,
-                                        4.24268102645874,
-                                        4.248088359832764,
-                                        4.253509044647217,
-                                        4.258944034576416,
-                                        4.264392375946045,
-                                        4.269854545593262,
-                                        4.275331497192383,
-                                        4.280821800231934,
-                                        4.2863264083862305,
-                                        4.291845321655273,
-                                        4.297379016876221,
-                                        4.302926063537598,
-                                        4.308487892150879,
-                                        4.314063549041748,
-                                        4.319654941558838,
-                                        4.325259208679199,
-                                        4.330878734588623,
-                                        4.336513042449951,
-                                        4.342162132263184,
-                                        4.34782600402832,
-                                        4.353504180908203,
-                                        4.359197616577148,
-                                        4.364906311035156,
-                                        4.37062931060791,
-                                        4.376367568969727,
-                                        4.382120609283447,
-                                        4.387889385223389,
-                                        4.393672943115234,
-                                        4.399472236633301,
-                                        4.4052863121032715,
-                                        4.411116123199463,
-                                        4.416961193084717,
-                                        4.422821521759033,
-                                        4.42869758605957,
-                                        4.434589862823486,
-                                        4.440497398376465,
-                                        4.446420669555664,
-                                        4.452359676361084,
-                                        4.458314895629883,
-                                        4.464285850524902,
-                                        4.470272541046143,
-                                        4.476275444030762,
-                                        4.482295036315918,
-                                        4.488330364227295,
-                                        4.494381904602051,
-                                        4.500450134277344,
-                                        4.506534576416016,
-                                        4.512635231018066,
-                                        4.518752574920654,
-                                        4.524886608123779,
-                                        4.531037330627441,
-                                        4.537204742431641,
-                                        4.543388843536377,
-                                        4.549590110778809,
-                                        4.5558085441589355,
-                                        4.5620436668396,
-                                        4.568295955657959,
-                                        4.5745649337768555,
-                                        4.580852031707764,
-                                        4.587155818939209,
-                                        4.593477249145508,
-                                        4.599815845489502,
-                                        4.606172561645508,
-                                        4.612545967102051,
-                                        4.6189374923706055,
-                                        4.625346660614014,
-                                        4.631774425506592,
-                                        4.638218879699707,
-                                        4.644681453704834,
-                                        4.651162624359131,
-                                        4.6576619148254395,
-                                        4.66417932510376,
-                                        4.670714378356934,
-                                        4.6772685050964355,
-                                        4.683840751647949,
-                                        4.690431594848633,
-                                        4.697041034698486,
-                                        4.703668594360352,
-                                        4.710315704345703,
-                                        4.716980934143066,
-                                        4.723665237426758,
-                                        4.730368614196777,
-                                        4.737091541290283,
-                                        4.743833065032959,
-                                        4.750593662261963,
-                                        4.757373809814453,
-                                        4.7641730308532715,
-                                        4.770992279052734,
-                                        4.777830600738525,
-                                        4.784688949584961,
-                                        4.791566848754883,
-                                        4.798464775085449,
-                                        4.805381774902344,
-                                        4.812319278717041,
-                                        4.819277286529541,
-                                        4.826254844665527,
-                                        4.833252906799316,
-                                        4.84027099609375,
-                                        4.8473100662231445,
-                                        4.854369163513184,
-                                        4.861448764801025,
-                                        4.86854887008667,
-                                        4.875670909881592,
-                                        4.8828125,
-                                        4.889975547790527,
-                                        4.897159576416016,
-                                        4.904365062713623,
-                                        4.911591529846191,
-                                        4.918838977813721,
-                                        4.926108360290527,
-                                        4.933399200439453,
-                                        4.94071102142334,
-                                        4.948045253753662,
-                                        4.955401420593262,
-                                        4.9627790451049805,
-                                        4.970178604125977,
-                                        4.977600574493408,
-                                        4.985044956207275,
-                                        4.99251127243042
-                                    ],
-                                    "xaxis": "x2",
-                                    "yaxis": "y2"
-                                },
-                                {
-                                    "nbinsx": 50,
-                                    "opacity": 0.7,
-                                    "type": "histogram",
-                                    "x": [
-                                        1.9999998807907104,
-                                        2.0023250579833984,
-                                        2.0046520233154297,
-                                        2.006979465484619,
-                                        2.0093090534210205,
-                                        2.0116395950317383,
-                                        2.0139718055725098,
-                                        2.0163047313690186,
-                                        2.0186398029327393,
-                                        2.020975351333618,
-                                        2.023313045501709,
-                                        2.025651693344116,
-                                        2.027991771697998,
-                                        2.0303330421447754,
-                                        2.0326759815216064,
-                                        2.035020112991333,
-                                        2.0373659133911133,
-                                        2.039712429046631,
-                                        2.0420608520507812,
-                                        2.0444107055664062,
-                                        2.0467615127563477,
-                                        2.0491137504577637,
-                                        2.051467180252075,
-                                        2.0538220405578613,
-                                        2.056178331375122,
-                                        2.0585358142852783,
-                                        2.060894727706909,
-                                        2.0632550716400146,
-                                        2.065617084503174,
-                                        2.0679800510406494,
-                                        2.0703446865081787,
-                                        2.0727100372314453,
-                                        2.0750772953033447,
-                                        2.0774457454681396,
-                                        2.0798158645629883,
-                                        2.082186698913574,
-                                        2.084559440612793,
-                                        2.086933135986328,
-                                        2.089308261871338,
-                                        2.0916848182678223,
-                                        2.094062566757202,
-                                        2.0964417457580566,
-                                        2.098822832107544,
-                                        2.1012046337127686,
-                                        2.1035878658294678,
-                                        2.1059725284576416,
-                                        2.108358860015869,
-                                        2.110746145248413,
-                                        2.1131350994110107,
-                                        2.1155247688293457,
-                                        2.1179163455963135,
-                                        2.1203091144561768,
-                                        2.1227030754089355,
-                                        2.125098466873169,
-                                        2.127495288848877,
-                                        2.1298933029174805,
-                                        2.132293224334717,
-                                        2.1346940994262695,
-                                        2.1370961666107178,
-                                        2.1394996643066406,
-                                        2.141904830932617,
-                                        2.1443111896514893,
-                                        2.146718978881836,
-                                        2.14912748336792,
-                                        2.151538133621216,
-                                        2.1539502143859863,
-                                        2.156363010406494,
-                                        2.1587769985198975,
-                                        2.1611931324005127,
-                                        2.1636102199554443,
-                                        2.1660284996032715,
-                                        2.1684482097625732,
-                                        2.1708693504333496,
-                                        2.1732916831970215,
-                                        2.175715684890747,
-                                        2.178140878677368,
-                                        2.180567741394043,
-                                        2.182995557785034,
-                                        2.1854248046875,
-                                        2.1878552436828613,
-                                        2.1902875900268555,
-                                        2.192720413208008,
-                                        2.195155382156372,
-                                        2.1975908279418945,
-                                        2.200028419494629,
-                                        2.2024667263031006,
-                                        2.204907178878784,
-                                        2.207348346710205,
-                                        2.209791421890259,
-                                        2.212235450744629,
-                                        2.2146809101104736,
-                                        2.217127561569214,
-                                        2.219576120376587,
-                                        2.2220258712768555,
-                                        2.2244765758514404,
-                                        2.226928472518921,
-                                        2.229382276535034,
-                                        2.231837034225464,
-                                        2.234293222427368,
-                                        2.236750841140747,
-                                        2.2392096519470215,
-                                        2.2416698932647705,
-                                        2.2441320419311523,
-                                        2.2465949058532715,
-                                        2.2490594387054443,
-                                        2.2515249252319336,
-                                        2.2539920806884766,
-                                        2.256460428237915,
-                                        2.2589306831359863,
-                                        2.2614011764526367,
-                                        2.263874053955078,
-                                        2.266347885131836,
-                                        2.2688229084014893,
-                                        2.2712996006011963,
-                                        2.2737772464752197,
-                                        2.2762563228607178,
-                                        2.2787370681762695,
-                                        2.281219005584717,
-                                        2.2837021350860596,
-                                        2.286186695098877,
-                                        2.288673162460327,
-                                        2.2911605834960938,
-                                        2.293649196624756,
-                                        2.2961390018463135,
-                                        2.298630475997925,
-                                        2.3011231422424316,
-                                        2.303617238998413,
-                                        2.30611252784729,
-                                        2.3086097240448,
-                                        2.3111073970794678,
-                                        2.3136072158813477,
-                                        2.3161075115203857,
-                                        2.318610429763794,
-                                        2.3211135864257812,
-                                        2.3236186504364014,
-                                        2.326124906539917,
-                                        2.328632354736328,
-                                        2.331141233444214,
-                                        2.3336517810821533,
-                                        2.3361637592315674,
-                                        2.338676691055298,
-                                        2.3411905765533447,
-                                        2.3437066078186035,
-                                        2.3462233543395996,
-                                        2.3487420082092285,
-                                        2.351261615753174,
-                                        2.3537826538085938,
-                                        2.3563051223754883,
-                                        2.3588292598724365,
-                                        2.361354112625122,
-                                        2.3638811111450195,
-                                        2.366408348083496,
-                                        2.3689379692077637,
-                                        2.3714685440063477,
-                                        2.374000310897827,
-                                        2.3765335083007812,
-                                        2.379068374633789,
-                                        2.3816041946411133,
-                                        2.384141445159912,
-                                        2.3866801261901855,
-                                        2.3892199993133545,
-                                        2.3917617797851562,
-                                        2.3943042755126953,
-                                        2.396848440170288,
-                                        2.3993937969207764,
-                                        2.40194034576416,
-                                        2.4044888019561768,
-                                        2.4070382118225098,
-                                        2.4095892906188965,
-                                        2.4121413230895996,
-                                        2.4146947860717773,
-                                        2.4172496795654297,
-                                        2.4198057651519775,
-                                        2.42236328125,
-                                        2.424922227859497,
-                                        2.4274823665618896,
-                                        2.430044412612915,
-                                        2.4326069355010986,
-                                        2.435171604156494,
-                                        2.437737464904785,
-                                        2.4403045177459717,
-                                        2.4428727626800537,
-                                        2.4454424381256104,
-                                        2.4480133056640625,
-                                        2.4505860805511475,
-                                        2.453160285949707,
-                                        2.455734968185425,
-                                        2.4583117961883545,
-                                        2.4608895778656006,
-                                        2.463468313217163,
-                                        2.4660491943359375,
-                                        2.468630790710449,
-                                        2.4712140560150146,
-                                        2.4737985134124756,
-                                        2.4763848781585693,
-                                        2.4789719581604004,
-                                        2.4815609455108643,
-                                        2.4841506481170654,
-                                        2.4867422580718994,
-                                        2.48933482170105,
-                                        2.491929292678833,
-                                        2.4945242404937744,
-                                        2.4971210956573486,
-                                        2.4997189044952393,
-                                        2.5023181438446045,
-                                        2.5049192905426025,
-                                        2.507521867752075,
-                                        2.510124921798706,
-                                        2.512730121612549,
-                                        2.515336036682129,
-                                        2.5179436206817627,
-                                        2.520552396774292,
-                                        2.523162603378296,
-                                        2.5257744789123535,
-                                        2.5283877849578857,
-                                        2.5310018062591553,
-                                        2.5336177349090576,
-                                        2.536234140396118,
-                                        2.5388529300689697,
-                                        2.5414724349975586,
-                                        2.544093608856201,
-                                        2.5467159748077393,
-                                        2.549339532852173,
-                                        2.5519649982452393,
-                                        2.5545918941497803,
-                                        2.5572192668914795,
-                                        2.5598485469818115,
-                                        2.562479019165039,
-                                        2.565110921859741,
-                                        2.567744493484497,
-                                        2.570378541946411,
-                                        2.573014736175537,
-                                        2.5756516456604004,
-                                        2.5782904624938965,
-                                        2.580930471420288,
-                                        2.5835721492767334,
-                                        2.586214780807495,
-                                        2.5888586044311523,
-                                        2.591503858566284,
-                                        2.5941505432128906,
-                                        2.5967986583709717,
-                                        2.5994484424591064,
-                                        2.6020994186401367,
-                                        2.6047515869140625,
-                                        2.607404947280884,
-                                        2.6100597381591797,
-                                        2.612715721130371,
-                                        2.615373373031616,
-                                        2.618032217025757,
-                                        2.620692253112793,
-                                        2.6233537197113037,
-                                        2.626016616821289,
-                                        2.6286816596984863,
-                                        2.631347179412842,
-                                        2.634014129638672,
-                                        2.6366825103759766,
-                                        2.6393520832061768,
-                                        2.6420233249664307,
-                                        2.64469575881958,
-                                        2.647369384765625,
-                                        2.6500449180603027,
-                                        2.6527209281921387,
-                                        2.6553988456726074,
-                                        2.6580777168273926,
-                                        2.6607584953308105,
-                                        2.663440227508545,
-                                        2.666123390197754,
-                                        2.6688082218170166,
-                                        2.6714937686920166,
-                                        2.6741812229156494,
-                                        2.676870107650757,
-                                        2.6795597076416016,
-                                        2.682251214981079,
-                                        2.684943914413452,
-                                        2.6876378059387207,
-                                        2.690333127975464,
-                                        2.6930301189422607,
-                                        2.695727825164795,
-                                        2.698427438735962,
-                                        2.7011282444000244,
-                                        2.7038307189941406,
-                                        2.706533193588257,
-                                        2.7092387676239014,
-                                        2.711944818496704,
-                                        2.7146522998809814,
-                                        2.7173614501953125,
-                                        2.720071315765381,
-                                        2.722783088684082,
-                                        2.725496530532837,
-                                        2.728210210800171,
-                                        2.730926275253296,
-                                        2.733643054962158,
-                                        2.736361265182495,
-                                        2.7390809059143066,
-                                        2.7418019771575928,
-                                        2.7445242404937744,
-                                        2.7472479343414307,
-                                        2.7499728202819824,
-                                        2.752700090408325,
-                                        2.755427360534668,
-                                        2.7581567764282227,
-                                        2.7608871459960938,
-                                        2.7636189460754395,
-                                        2.7663521766662598,
-                                        2.7690865993499756,
-                                        2.771822452545166,
-                                        2.7745602130889893,
-                                        2.7772979736328125,
-                                        2.780038595199585,
-                                        2.7827799320220947,
-                                        2.7855224609375,
-                                        2.78826642036438,
-                                        2.7910118103027344,
-                                        2.7937586307525635,
-                                        2.796506404876709,
-                                        2.7992560863494873,
-                                        2.8020071983337402,
-                                        2.8047587871551514,
-                                        2.8075125217437744,
-                                        2.810267210006714,
-                                        2.813023328781128,
-                                        2.8157806396484375,
-                                        2.818539619445801,
-                                        2.8212995529174805,
-                                        2.824061870574951,
-                                        2.8268239498138428,
-                                        2.8295888900756836,
-                                        2.8323545455932617,
-                                        2.8351213932037354,
-                                        2.8378896713256836,
-                                        2.8406591415405273,
-                                        2.8434300422668457,
-                                        2.8462023735046387,
-                                        2.8489761352539062,
-                                        2.8517513275146484,
-                                        2.854527473449707,
-                                        2.8573057651519775,
-                                        2.8600850105285645,
-                                        2.8628652095794678,
-                                        2.865647077560425,
-                                        2.8684301376342773,
-                                        2.8712146282196045,
-                                        2.8740007877349854,
-                                        2.8767879009246826,
-                                        2.8795769214630127,
-                                        2.882366418838501,
-                                        2.885157823562622,
-                                        2.8879504203796387,
-                                        2.89074444770813,
-                                        2.8935396671295166,
-                                        2.896336317062378,
-                                        2.8991341590881348,
-                                        2.9019343852996826,
-                                        2.9047341346740723,
-                                        2.9075369834899902,
-                                        2.9103403091430664,
-                                        2.913145065307617,
-                                        2.9159510135650635,
-                                        2.9187583923339844,
-                                        2.92156720161438,
-                                        2.92437744140625,
-                                        2.927189350128174,
-                                        2.930001974105835,
-                                        2.93281626701355,
-                                        2.93563175201416,
-                                        2.938448905944824,
-                                        2.941267251968384,
-                                        2.944086790084839,
-                                        2.9469077587127686,
-                                        2.9497299194335938,
-                                        2.9525539875030518,
-                                        2.955378532409668,
-                                        2.9582056999206543,
-                                        2.9610331058502197,
-                                        2.963862419128418,
-                                        2.9666926860809326,
-                                        2.969524621963501,
-                                        2.9723575115203857,
-                                        2.975192070007324,
-                                        2.978027820587158,
-                                        2.980865240097046,
-                                        2.983703374862671,
-                                        2.986544132232666,
-                                        2.9893853664398193,
-                                        2.992227792739868,
-                                        2.9950716495513916,
-                                        2.9979169368743896,
-                                        3.000763416290283,
-                                        3.0036113262176514,
-                                        3.006460666656494,
-                                        3.009312152862549,
-                                        3.0121636390686035,
-                                        3.015017509460449,
-                                        3.0178720951080322,
-                                        3.020728349685669,
-                                        3.023585557937622,
-                                        3.026444435119629,
-                                        3.0293045043945312,
-                                        3.0321667194366455,
-                                        3.0350286960601807,
-                                        3.037893772125244,
-                                        3.0407583713531494,
-                                        3.043626070022583,
-                                        3.046494245529175,
-                                        3.049363851547241,
-                                        3.052234649658203,
-                                        3.0551068782806396,
-                                        3.057981014251709,
-                                        3.0608558654785156,
-                                        3.063732147216797,
-                                        3.0666098594665527,
-                                        3.0694892406463623,
-                                        3.072369337081909,
-                                        3.075251340866089,
-                                        3.078134298324585,
-                                        3.0810189247131348,
-                                        3.083904504776001,
-                                        3.086791753768921,
-                                        3.0896809101104736,
-                                        3.0925700664520264,
-                                        3.0954620838165283,
-                                        3.0983545780181885,
-                                        3.101248264312744,
-                                        3.1041436195373535,
-                                        3.1070401668548584,
-                                        3.109938144683838,
-                                        3.112837791442871,
-                                        3.1157379150390625,
-                                        3.118640661239624,
-                                        3.121544122695923,
-                                        3.124448776245117,
-                                        3.127354860305786,
-                                        3.1302621364593506,
-                                        3.1331708431243896,
-                                        3.1360809803009033,
-                                        3.1389923095703125,
-                                        3.1419055461883545,
-                                        3.1448192596435547,
-                                        3.147735595703125,
-                                        3.1506524085998535,
-                                        3.1535706520080566,
-                                        3.1564900875091553,
-                                        3.1594109535217285,
-                                        3.1623332500457764,
-                                        3.165257692337036,
-                                        3.1681816577911377,
-                                        3.1711089611053467,
-                                        3.1740360260009766,
-                                        3.1769649982452393,
-                                        3.1798958778381348,
-                                        3.1828272342681885,
-                                        3.185760498046875,
-                                        3.1886954307556152,
-                                        3.1916308403015137,
-                                        3.194568634033203,
-                                        3.1975061893463135,
-                                        3.200446844100952,
-                                        3.203387975692749,
-                                        3.2063305377960205,
-                                        3.2092742919921875,
-                                        3.212219476699829,
-                                        3.2151660919189453,
-                                        3.2181143760681152,
-                                        3.2210633754730225,
-                                        3.2240142822265625,
-                                        3.226966381072998,
-                                        3.229919672012329,
-                                        3.232874631881714,
-                                        3.235830545425415,
-                                        3.23878812789917,
-                                        3.241746664047241,
-                                        3.244706869125366,
-                                        3.247668981552124,
-                                        3.2506308555603027,
-                                        3.2535958290100098,
-                                        3.256561279296875,
-                                        3.259528160095215,
-                                        3.26249623298645,
-                                        3.26546573638916,
-                                        3.2684366703033447,
-                                        3.271409034729004,
-                                        3.2743828296661377,
-                                        3.277357339859009,
-                                        3.280333995819092,
-                                        3.2833120822906494,
-                                        3.2862911224365234,
-                                        3.289271354675293,
-                                        3.292253017425537,
-                                        3.295236110687256,
-                                        3.29822039604187,
-                                        3.301206588745117,
-                                        3.3041932582855225,
-                                        3.3071820735931396,
-                                        3.3101718425750732,
-                                        3.3131635189056396,
-                                        3.3161559104919434,
-                                        3.3191492557525635,
-                                        3.3221449851989746,
-                                        3.325141429901123,
-                                        3.328139305114746,
-                                        3.3311386108398438,
-                                        3.334139108657837,
-                                        3.337141990661621,
-                                        3.3401453495025635,
-                                        3.343149423599243,
-                                        3.3461554050445557,
-                                        3.349163293838501,
-                                        3.3521718978881836,
-                                        3.355181932449341,
-                                        3.3581933975219727,
-                                        3.3612060546875,
-                                        3.364220142364502,
-                                        3.3672356605529785,
-                                        3.370253324508667,
-                                        3.3732714653015137,
-                                        3.376291036605835,
-                                        3.3793118000030518,
-                                        3.382333993911743,
-                                        3.385357618331909,
-                                        3.3883824348449707,
-                                        3.391409158706665,
-                                        3.3944365978240967,
-                                        3.397465705871582,
-                                        3.400496006011963,
-                                        3.4035279750823975,
-                                        3.4065611362457275,
-                                        3.409595489501953,
-                                        3.412631034851074,
-                                        3.415668249130249,
-                                        3.4187066555023193,
-                                        3.421746253967285,
-                                        3.424788236618042,
-                                        3.427830696105957,
-                                        3.4308745861053467,
-                                        3.433919668197632,
-                                        3.4369661808013916,
-                                        3.440014123916626,
-                                        3.443063259124756,
-                                        3.4461138248443604,
-                                        3.4491662979125977,
-                                        3.452219009399414,
-                                        3.4552736282348633,
-                                        3.4583306312561035,
-                                        3.461387872695923,
-                                        3.464446544647217,
-                                        3.4675066471099854,
-                                        3.4705679416656494,
-                                        3.473630666732788,
-                                        3.4766948223114014,
-                                        3.4797606468200684,
-                                        3.4828274250030518,
-                                        3.4858953952789307,
-                                        3.4889655113220215,
-                                        3.4920363426208496,
-                                        3.4951083660125732,
-                                        3.4981822967529297,
-                                        3.5012567043304443,
-                                        3.504333019256592,
-                                        3.5074105262756348,
-                                        3.5104904174804688,
-                                        3.513570785522461,
-                                        3.5166523456573486,
-                                        3.5197348594665527,
-                                        3.522819757461548,
-                                        3.5259053707122803,
-                                        3.5289924144744873,
-                                        3.532081127166748,
-                                        3.5351710319519043,
-                                        3.538261651992798,
-                                        3.541353940963745,
-                                        3.5444488525390625,
-                                        3.547544002532959,
-                                        3.550640344619751,
-                                        3.5537381172180176,
-                                        3.556837320327759,
-                                        3.5599379539489746,
-                                        3.563039779663086,
-                                        3.56614351272583,
-                                        3.5692481994628906,
-                                        3.5723540782928467,
-                                        3.5754618644714355,
-                                        3.578570604324341,
-                                        3.5816805362701416,
-                                        3.584791898727417,
-                                        3.587904930114746,
-                                        3.5910186767578125,
-                                        3.5941340923309326,
-                                        3.5972516536712646,
-                                        3.600369691848755,
-                                        3.6034891605377197,
-                                        3.606610059738159,
-                                        3.609732151031494,
-                                        3.6128556728363037,
-                                        3.615980625152588,
-                                        3.6191067695617676,
-                                        3.6222352981567383,
-                                        3.62536358833313,
-                                        3.6284940242767334,
-                                        3.6316261291503906,
-                                        3.634758949279785,
-                                        3.6378931999206543,
-                                        3.641028881072998,
-                                        3.6441659927368164,
-                                        3.6473042964935303,
-                                        3.6504440307617188,
-                                        3.6535861492156982,
-                                        3.6567280292510986,
-                                        3.65987229347229,
-                                        3.6630170345306396,
-                                        3.666163921356201,
-                                        3.669311761856079,
-                                        3.6724607944488525,
-                                        3.675611734390259,
-                                        3.6787636280059814,
-                                        3.6819164752960205,
-                                        3.6850714683532715,
-                                        3.688227891921997,
-                                        3.691385269165039,
-                                        3.6945438385009766,
-                                        3.6977038383483887,
-                                        3.7008650302886963,
-                                        3.7040278911590576,
-                                        3.7071919441223145,
-                                        3.710358142852783,
-                                        3.713524341583252,
-                                        3.7166924476623535,
-                                        3.7198615074157715,
-                                        3.7230331897735596,
-                                        3.726205348968506,
-                                        3.7293789386749268,
-                                        3.732553720474243,
-                                        3.735729932785034,
-                                        3.7389073371887207,
-                                        3.742086410522461,
-                                        3.745266914367676,
-                                        3.7484490871429443,
-                                        3.75163197517395,
-                                        3.7548162937164307,
-                                        3.7580020427703857,
-                                        3.7611889839172363,
-                                        3.7643773555755615,
-                                        3.7675673961639404,
-                                        3.770758628845215,
-                                        3.7739508152008057,
-                                        3.7771451473236084,
-                                        3.7803401947021484,
-                                        3.783536672592163,
-                                        3.7867345809936523,
-                                        3.789933681488037,
-                                        3.7931342124938965,
-                                        3.7963359355926514,
-                                        3.7995402812957764,
-                                        3.8027443885803223,
-                                        3.805950164794922,
-                                        3.809157371520996,
-                                        3.812366485595703,
-                                        3.8155765533447266,
-                                        3.8187878131866455,
-                                        3.822000503540039,
-                                        3.8252148628234863,
-                                        3.828429937362671,
-                                        3.831646680831909,
-                                        3.834865093231201,
-                                        3.8380849361419678,
-                                        3.841305732727051,
-                                        3.84452748298645,
-                                        3.8477513790130615,
-                                        3.8509762287139893,
-                                        3.8542022705078125,
-                                        3.8574302196502686,
-                                        3.860659122467041,
-                                        3.863889455795288,
-                                        3.8671209812164307,
-                                        3.870354413986206,
-                                        3.873588800430298,
-                                        3.876824378967285,
-                                        3.8800618648529053,
-                                        3.8832995891571045,
-                                        3.8865392208099365,
-                                        3.8897812366485596,
-                                        3.893023729324341,
-                                        3.8962669372558594,
-                                        3.8995120525360107,
-                                        3.902758836746216,
-                                        3.9060068130493164,
-                                        3.9092557430267334,
-                                        3.912506341934204,
-                                        3.9157586097717285,
-                                        3.9190118312835693,
-                                        3.9222660064697266,
-                                        3.9255218505859375,
-                                        3.9287800788879395,
-                                        3.9320385456085205,
-                                        3.935297966003418,
-                                        3.9385597705841064,
-                                        3.9418225288391113,
-                                        3.9450864791870117,
-                                        3.9483518600463867,
-                                        3.9516189098358154,
-                                        3.9548871517181396,
-                                        3.9581563472747803,
-                                        3.961427688598633,
-                                        3.9646997451782227,
-                                        3.967973232269287,
-                                        3.9712483882904053,
-                                        3.974524736404419,
-                                        3.97780179977417,
-                                        3.981081008911133,
-                                        3.9843616485595703,
-                                        3.987643241882324,
-                                        3.9909257888793945,
-                                        3.9942104816436768,
-                                        3.9974961280822754,
-                                        4.0007829666137695,
-                                        4.004071235656738,
-                                        4.007361888885498,
-                                        4.010653018951416,
-                                        4.01394510269165,
-                                        4.017238140106201,
-                                        4.020534038543701,
-                                        4.023830413818359,
-                                        4.027128219604492,
-                                        4.0304274559021,
-                                        4.033727645874023,
-                                        4.03702974319458,
-                                        4.040332794189453,
-                                        4.043638229370117,
-                                        4.0469441413879395,
-                                        4.050251483917236,
-                                        4.053560256958008,
-                                        4.056869983673096,
-                                        4.060181140899658,
-                                        4.063493728637695,
-                                        4.066807746887207,
-                                        4.070123195648193,
-                                        4.073440074920654,
-                                        4.076758861541748,
-                                        4.080078125,
-                                        4.083398818969727,
-                                        4.086720943450928,
-                                        4.0900444984436035,
-                                        4.093369483947754,
-                                        4.096695423126221,
-                                        4.1000237464904785,
-                                        4.1033525466918945,
-                                        4.106681823730469,
-                                        4.110013484954834,
-                                        4.11334753036499,
-                                        4.1166815757751465,
-                                        4.120017051696777,
-                                        4.123353958129883,
-                                        4.126692295074463,
-                                        4.130032062530518,
-                                        4.133372783660889,
-                                        4.136716365814209,
-                                        4.140059947967529,
-                                        4.143404960632324,
-                                        4.146751403808594,
-                                        4.150099277496338,
-                                        4.153448104858398,
-                                        4.156798839569092,
-                                        4.160150527954102,
-                                        4.163503646850586,
-                                        4.166858196258545,
-                                        4.1702141761779785,
-                                        4.173572063446045,
-                                        4.176930904388428,
-                                        4.180290699005127,
-                                        4.183651924133301,
-                                        4.187014579772949,
-                                        4.190378665924072,
-                                        4.193743705749512,
-                                        4.1971116065979,
-                                        4.200479507446289,
-                                        4.203847885131836,
-                                        4.20721960067749,
-                                        4.210591793060303,
-                                        4.213964939117432,
-                                        4.217339992523193,
-                                        4.2207159996032715,
-                                        4.224093437194824,
-                                        4.227472305297852,
-                                        4.2308526039123535,
-                                        4.234234809875488,
-                                        4.2376179695129395,
-                                        4.241002082824707,
-                                        4.244387626647949,
-                                        4.247774600982666,
-                                        4.251163005828857,
-                                        4.254552364349365,
-                                        4.257943630218506,
-                                        4.261336803436279,
-                                        4.2647294998168945,
-                                        4.268125534057617,
-                                        4.27152156829834,
-                                        4.274919509887695,
-                                        4.278318405151367,
-                                        4.281719207763672,
-                                        4.285120964050293,
-                                        4.288524150848389,
-                                        4.291929244995117,
-                                        4.295335292816162,
-                                        4.298742294311523,
-                                        4.302151203155518,
-                                        4.305561065673828,
-                                        4.308972358703613,
-                                        4.312384605407715,
-                                        4.315799713134766,
-                                        4.3192138671875,
-                                        4.322630405426025,
-                                        4.326048374176025,
-                                        4.329468727111816,
-                                        4.332889556884766,
-                                        4.3363118171691895,
-                                        4.33973503112793,
-                                        4.3431596755981445,
-                                        4.346585750579834,
-                                        4.350013256072998,
-                                        4.353443145751953,
-                                        4.356873512268066,
-                                        4.360304832458496,
-                                        4.363736629486084,
-                                        4.367171764373779,
-                                        4.370607376098633,
-                                        4.374044418334961,
-                                        4.3774824142456055,
-                                        4.380922317504883,
-                                        4.384363174438477,
-                                        4.387806415557861,
-                                        4.391250133514404,
-                                        4.394695281982422,
-                                        4.398141384124756,
-                                        4.401589393615723,
-                                        4.405038356781006,
-                                        4.408488750457764,
-                                        4.4119415283203125,
-                                        4.4153947830200195,
-                                        4.418848037719727,
-                                        4.422303676605225,
-                                        4.425762176513672,
-                                        4.429220676422119,
-                                        4.432680606842041,
-                                        4.436141490936279,
-                                        4.43960428237915,
-                                        4.443068027496338,
-                                        4.446533203125,
-                                        4.449999809265137,
-                                        4.4534687995910645,
-                                        4.45693826675415,
-                                        4.460409164428711,
-                                        4.463881015777588,
-                                        4.4673542976379395,
-                                        4.470829010009766,
-                                        4.474305152893066,
-                                        4.477782726287842,
-                                        4.481261253356934,
-                                        4.484741687774658,
-                                        4.488224029541016,
-                                        4.491706848144531,
-                                        4.4951910972595215,
-                                        4.498676776885986,
-                                        4.502163410186768,
-                                        4.505651950836182,
-                                        4.509141445159912,
-                                        4.512633323669434,
-                                        4.516125679016113,
-                                        4.519618034362793,
-                                        4.523114204406738,
-                                        4.526610374450684,
-                                        4.530108451843262,
-                                        4.533607482910156,
-                                        4.537107467651367,
-                                        4.540609359741211,
-                                        4.544112682342529,
-                                        4.547616958618164,
-                                        4.55112361907959,
-                                        4.554630756378174,
-                                        4.558139324188232,
-                                        4.561649322509766,
-                                        4.565160274505615,
-                                        4.568673133850098,
-                                        4.5721869468688965,
-                                        4.57570219039917,
-                                        4.579218864440918,
-                                        4.582736968994141,
-                                        4.586256980895996,
-                                        4.589777946472168,
-                                        4.593299865722656,
-                                        4.596823215484619,
-                                        4.600347995758057,
-                                        4.6038737297058105,
-                                        4.607401371002197,
-                                        4.610930919647217,
-                                        4.614461421966553,
-                                        4.617992877960205,
-                                        4.621525287628174,
-                                        4.625059604644775,
-                                        4.628593921661377,
-                                        4.632132053375244,
-                                        4.635670185089111,
-                                        4.639209747314453,
-                                        4.642751693725586,
-                                        4.6462931632995605,
-                                        4.649836540222168,
-                                        4.653382778167725,
-                                        4.656929016113281,
-                                        4.6604766845703125,
-                                        4.664025783538818,
-                                        4.667575836181641,
-                                        4.671127796173096,
-                                        4.674680709838867,
-                                        4.6782355308532715,
-                                        4.681791305541992,
-                                        4.685349464416504,
-                                        4.688906669616699,
-                                        4.69246768951416,
-                                        4.696028709411621,
-                                        4.699591159820557,
-                                        4.703155040740967,
-                                        4.706721305847168,
-                                        4.710287094116211,
-                                        4.713855743408203,
-                                        4.717424392700195,
-                                        4.720995903015137,
-                                        4.724567890167236,
-                                        4.7281413078308105,
-                                        4.731715679168701,
-                                        4.735292911529541,
-                                        4.7388691902160645,
-                                        4.742447853088379,
-                                        4.746027946472168,
-                                        4.749609470367432,
-                                        4.753193378448486,
-                                        4.756777763366699,
-                                        4.7603631019592285,
-                                        4.763949871063232,
-                                        4.767538070678711,
-                                        4.7711286544799805,
-                                        4.774718761444092,
-                                        4.778310775756836,
-                                        4.781904697418213,
-                                        4.785500526428223,
-                                        4.789095878601074,
-                                        4.792693614959717,
-                                        4.796293258666992,
-                                        4.799893856048584,
-                                        4.803495407104492,
-                                        4.80709981918335,
-                                        4.810702800750732,
-                                        4.814309597015381,
-                                        4.817915916442871,
-                                        4.821525573730469,
-                                        4.825135231018066,
-                                        4.828746318817139,
-                                        4.832359790802002,
-                                        4.835973739624023,
-                                        4.839588165283203,
-                                        4.843204498291016,
-                                        4.846823692321777,
-                                        4.850442886352539,
-                                        4.854063510894775,
-                                        4.857684135437012,
-                                        4.861308574676514,
-                                        4.864933490753174,
-                                        4.86855936050415,
-                                        4.872187614440918,
-                                        4.875815391540527,
-                                        4.879445552825928,
-                                        4.883078098297119,
-                                        4.8867106437683105,
-                                        4.89034366607666,
-                                        4.893980503082275,
-                                        4.897617340087891,
-                                        4.9012556076049805,
-                                        4.904894828796387,
-                                        4.908535957336426,
-                                        4.912178039550781,
-                                        4.915822505950928,
-                                        4.919466495513916,
-                                        4.923113822937012,
-                                        4.926761627197266,
-                                        4.930410385131836,
-                                        4.934061050415039,
-                                        4.937713623046875,
-                                        4.941365718841553,
-                                        4.945021152496338,
-                                        4.948677062988281,
-                                        4.952333927154541,
-                                        4.955991268157959,
-                                        4.959651947021484,
-                                        4.963313102722168,
-                                        4.966975688934326,
-                                        4.970639705657959,
-                                        4.974304676055908,
-                                        4.977972507476807,
-                                        4.981639385223389,
-                                        4.985309600830078,
-                                        4.988980293273926,
-                                        4.992652416229248,
-                                        4.996325492858887
-                                    ],
-                                    "xaxis": "x3",
-                                    "yaxis": "y3"
-                                },
-                                {
-                                    "nbinsx": 50,
-                                    "opacity": 0.7,
-                                    "type": "histogram",
-                                    "x": [
-                                        2,
-                                        2.001833438873291,
-                                        2.0036685466766357,
-                                        2.005505323410034,
-                                        2.0073437690734863,
-                                        2.009183883666992,
-                                        2.011025905609131,
-                                        2.012869119644165,
-                                        2.014714479446411,
-                                        2.016561508178711,
-                                        2.0184099674224854,
-                                        2.0202603340148926,
-                                        2.0221123695373535,
-                                        2.023966073989868,
-                                        2.0258214473724365,
-                                        2.0276784896850586,
-                                        2.0295372009277344,
-                                        2.031397819519043,
-                                        2.033259868621826,
-                                        2.0351240634918213,
-                                        2.036989688873291,
-                                        2.0388569831848145,
-                                        2.0407259464263916,
-                                        2.0425965785980225,
-                                        2.044469118118286,
-                                        2.0463433265686035,
-                                        2.0482192039489746,
-                                        2.0500967502593994,
-                                        2.051976203918457,
-                                        2.0538573265075684,
-                                        2.0557401180267334,
-                                        2.057624340057373,
-                                        2.0595107078552246,
-                                        2.06139874458313,
-                                        2.063288450241089,
-                                        2.0651798248291016,
-                                        2.067073106765747,
-                                        2.0689680576324463,
-                                        2.070864677429199,
-                                        2.072763204574585,
-                                        2.0746631622314453,
-                                        2.0765652656555176,
-                                        2.0784685611724854,
-                                        2.080374002456665,
-                                        2.0822811126708984,
-                                        2.0841898918151855,
-                                        2.0861005783081055,
-                                        2.088012933731079,
-                                        2.0899269580841064,
-                                        2.0918428897857666,
-                                        2.0937604904174805,
-                                        2.095679759979248,
-                                        2.0976009368896484,
-                                        2.0995237827301025,
-                                        2.1014485359191895,
-                                        2.10337495803833,
-                                        2.1053032875061035,
-                                        2.1072332859039307,
-                                        2.1091647148132324,
-                                        2.111098289489746,
-                                        2.1130335330963135,
-                                        2.1149706840515137,
-                                        2.1169095039367676,
-                                        2.118849992752075,
-                                        2.1207923889160156,
-                                        2.122736692428589,
-                                        2.124682664871216,
-                                        2.1266300678253174,
-                                        2.128579616546631,
-                                        2.130530834197998,
-                                        2.132483959197998,
-                                        2.134438991546631,
-                                        2.1363956928253174,
-                                        2.1383540630340576,
-                                        2.1403143405914307,
-                                        2.1422765254974365,
-                                        2.144240379333496,
-                                        2.1462059020996094,
-                                        2.1481733322143555,
-                                        2.1501426696777344,
-                                        2.152113676071167,
-                                        2.1540863513946533,
-                                        2.1560611724853516,
-                                        2.1580376625061035,
-                                        2.1600160598754883,
-                                        2.1619961261749268,
-                                        2.163978099822998,
-                                        2.165961742401123,
-                                        2.167947292327881,
-                                        2.1699347496032715,
-                                        2.171923875808716,
-                                        2.173914909362793,
-                                        2.175907850265503,
-                                        2.1779024600982666,
-                                        2.179898977279663,
-                                        2.1818971633911133,
-                                        2.1838972568511963,
-                                        2.185899496078491,
-                                        2.1879031658172607,
-                                        2.189908981323242,
-                                        2.1919164657592773,
-                                        2.1939258575439453,
-                                        2.195936918258667,
-                                        2.1979501247406006,
-                                        2.199965000152588,
-                                        2.201981544494629,
-                                        2.204000234603882,
-                                        2.2060208320617676,
-                                        2.208043098449707,
-                                        2.2100670337677,
-                                        2.2120931148529053,
-                                        2.214120864868164,
-                                        2.2161505222320557,
-                                        2.218182325363159,
-                                        2.2202155590057373,
-                                        2.2222509384155273,
-                                        2.22428822517395,
-                                        2.2263271808624268,
-                                        2.228368043899536,
-                                        2.2304108142852783,
-                                        2.2324554920196533,
-                                        2.234502077102661,
-                                        2.2365503311157227,
-                                        2.238600492477417,
-                                        2.2406527996063232,
-                                        2.242706775665283,
-                                        2.244762659072876,
-                                        2.2468204498291016,
-                                        2.248880386352539,
-                                        2.250941753387451,
-                                        2.253005266189575,
-                                        2.255070686340332,
-                                        2.2571377754211426,
-                                        2.259207010269165,
-                                        2.261277914047241,
-                                        2.2633509635925293,
-                                        2.26542592048645,
-                                        2.267502546310425,
-                                        2.2695813179016113,
-                                        2.2716617584228516,
-                                        2.2737441062927246,
-                                        2.2758283615112305,
-                                        2.2779147624969482,
-                                        2.2800028324127197,
-                                        2.2820932865142822,
-                                        2.2841851711273193,
-                                        2.2862789630889893,
-                                        2.288374900817871,
-                                        2.2904727458953857,
-                                        2.292572259902954,
-                                        2.2946739196777344,
-                                        2.2967774868011475,
-                                        2.2988831996917725,
-                                        2.300990581512451,
-                                        2.3030998706817627,
-                                        2.305211067199707,
-                                        2.3073244094848633,
-                                        2.3094394207000732,
-                                        2.311556577682495,
-                                        2.3136754035949707,
-                                        2.3157966136932373,
-                                        2.3179194927215576,
-                                        2.32004451751709,
-                                        2.322171211242676,
-                                        2.3242998123168945,
-                                        2.326430559158325,
-                                        2.3285632133483887,
-                                        2.330698013305664,
-                                        2.332834482192993,
-                                        2.334972858428955,
-                                        2.337113618850708,
-                                        2.3392558097839355,
-                                        2.341400384902954,
-                                        2.3435468673706055,
-                                        2.3456952571868896,
-                                        2.3478455543518066,
-                                        2.3499977588653564,
-                                        2.352151870727539,
-                                        2.3543083667755127,
-                                        2.356466293334961,
-                                        2.3586268424987793,
-                                        2.3607888221740723,
-                                        2.362952947616577,
-                                        2.365119218826294,
-                                        2.3672873973846436,
-                                        2.369457483291626,
-                                        2.371629476547241,
-                                        2.3738036155700684,
-                                        2.3759796619415283,
-                                        2.3781578540802,
-                                        2.380337953567505,
-                                        2.3825199604034424,
-                                        2.3847038745880127,
-                                        2.386890172958374,
-                                        2.389078140258789,
-                                        2.391268253326416,
-                                        2.393460512161255,
-                                        2.3956544399261475,
-                                        2.397850513458252,
-                                        2.4000487327575684,
-                                        2.4022488594055176,
-                                        2.4044508934020996,
-                                        2.4066553115844727,
-                                        2.4088613986968994,
-                                        2.411069631576538,
-                                        2.4132800102233887,
-                                        2.415492296218872,
-                                        2.4177064895629883,
-                                        2.4199228286743164,
-                                        2.4221413135528564,
-                                        2.4243617057800293,
-                                        2.426584005355835,
-                                        2.4288084506988525,
-                                        2.431035041809082,
-                                        2.4332635402679443,
-                                        2.4354941844940186,
-                                        2.4377267360687256,
-                                        2.4399616718292236,
-                                        2.4421985149383545,
-                                        2.444437265396118,
-                                        2.4466779232025146,
-                                        2.448920726776123,
-                                        2.4511656761169434,
-                                        2.4534127712249756,
-                                        2.4556617736816406,
-                                        2.4579129219055176,
-                                        2.4601662158966064,
-                                        2.462421417236328,
-                                        2.4646787643432617,
-                                        2.4669382572174072,
-                                        2.4691996574401855,
-                                        2.4714629650115967,
-                                        2.473728895187378,
-                                        2.475996494293213,
-                                        2.4782662391662598,
-                                        2.4805381298065186,
-                                        2.48281192779541,
-                                        2.4850881099700928,
-                                        2.487366199493408,
-                                        2.4896464347839355,
-                                        2.4919285774230957,
-                                        2.494213104248047,
-                                        2.496499538421631,
-                                        2.4987881183624268,
-                                        2.5010786056518555,
-                                        2.503371477127075,
-                                        2.5056662559509277,
-                                        2.5079634189605713,
-                                        2.5102622509002686,
-                                        2.512563705444336,
-                                        2.514866828918457,
-                                        2.51717209815979,
-                                        2.519479751586914,
-                                        2.52178955078125,
-                                        2.5241012573242188,
-                                        2.5264151096343994,
-                                        2.528730869293213,
-                                        2.5310492515563965,
-                                        2.533369302749634,
-                                        2.535691738128662,
-                                        2.5380163192749023,
-                                        2.5403428077697754,
-                                        2.5426716804504395,
-                                        2.5450026988983154,
-                                        2.547335624694824,
-                                        2.549670696258545,
-                                        2.5520079135894775,
-                                        2.554347515106201,
-                                        2.5566890239715576,
-                                        2.559032917022705,
-                                        2.5613789558410645,
-                                        2.5637266635894775,
-                                        2.5660769939422607,
-                                        2.5684292316436768,
-                                        2.570783853530884,
-                                        2.5731403827667236,
-                                        2.5754995346069336,
-                                        2.5778603553771973,
-                                        2.580223798751831,
-                                        2.5825886726379395,
-                                        2.584956169128418,
-                                        2.5873258113861084,
-                                        2.58969783782959,
-                                        2.592071771621704,
-                                        2.5944480895996094,
-                                        2.5968263149261475,
-                                        2.5992069244384766,
-                                        2.6015896797180176,
-                                        2.6039745807647705,
-                                        2.6063616275787354,
-                                        2.608750820159912,
-                                        2.61114239692688,
-                                        2.6135358810424805,
-                                        2.615931987762451,
-                                        2.6183300018310547,
-                                        2.62073016166687,
-                                        2.6231327056884766,
-                                        2.625537157058716,
-                                        2.627944231033325,
-                                        2.6303532123565674,
-                                        2.6327643394470215,
-                                        2.6351780891418457,
-                                        2.6375935077667236,
-                                        2.6400115489959717,
-                                        2.6424317359924316,
-                                        2.6448538303375244,
-                                        2.6472787857055664,
-                                        2.649705410003662,
-                                        2.652134656906128,
-                                        2.6545655727386475,
-                                        2.656999111175537,
-                                        2.6594347953796387,
-                                        2.661872625350952,
-                                        2.6643130779266357,
-                                        2.666755437850952,
-                                        2.6691999435424805,
-                                        2.6716468334198,
-                                        2.674095869064331,
-                                        2.6765475273132324,
-                                        2.6790008544921875,
-                                        2.6814568042755127,
-                                        2.68391489982605,
-                                        2.686375379562378,
-                                        2.688838005065918,
-                                        2.691303014755249,
-                                        2.693769931793213,
-                                        2.696239471435547,
-                                        2.6987109184265137,
-                                        2.7011852264404297,
-                                        2.7036612033843994,
-                                        2.70613956451416,
-                                        2.708620548248291,
-                                        2.7111034393310547,
-                                        2.7135889530181885,
-                                        2.716076374053955,
-                                        2.718566417694092,
-                                        2.7210583686828613,
-                                        2.723552703857422,
-                                        2.7260496616363525,
-                                        2.728548526763916,
-                                        2.7310500144958496,
-                                        2.733553409576416,
-                                        2.7360594272613525,
-                                        2.7385671138763428,
-                                        2.7410778999328613,
-                                        2.7435903549194336,
-                                        2.746105670928955,
-                                        2.7486228942871094,
-                                        2.751142978668213,
-                                        2.75366473197937,
-                                        2.7561888694763184,
-                                        2.7587156295776367,
-                                        2.761244535446167,
-                                        2.763775587081909,
-                                        2.7663094997406006,
-                                        2.768845558166504,
-                                        2.771383762359619,
-                                        2.7739243507385254,
-                                        2.7764670848846436,
-                                        2.779012680053711,
-                                        2.781559944152832,
-                                        2.7841098308563232,
-                                        2.7866618633270264,
-                                        2.7892162799835205,
-                                        2.7917733192443848,
-                                        2.794332504272461,
-                                        2.7968943119049072,
-                                        2.7994580268859863,
-                                        2.8020246028900146,
-                                        2.804593086242676,
-                                        2.807164192199707,
-                                        2.80973744392395,
-                                        2.8123130798339844,
-                                        2.8148913383483887,
-                                        2.817471742630005,
-                                        2.820054769515991,
-                                        2.8226397037506104,
-                                        2.8252270221710205,
-                                        2.82781720161438,
-                                        2.830409288406372,
-                                        2.8330042362213135,
-                                        2.8356010913848877,
-                                        2.838200569152832,
-                                        2.8408024311065674,
-                                        2.8434064388275146,
-                                        2.846013307571411,
-                                        2.8486220836639404,
-                                        2.851233720779419,
-                                        2.8538472652435303,
-                                        2.8564634323120117,
-                                        2.8590822219848633,
-                                        2.8617029190063477,
-                                        2.8643264770507812,
-                                        2.8669521808624268,
-                                        2.8695805072784424,
-                                        2.87221097946167,
-                                        2.8748438358306885,
-                                        2.877479076385498,
-                                        2.8801169395446777,
-                                        2.8827571868896484,
-                                        2.8854000568389893,
-                                        2.888044834136963,
-                                        2.8906922340393066,
-                                        2.8933424949645996,
-                                        2.8959946632385254,
-                                        2.8986496925354004,
-                                        2.901306629180908,
-                                        2.9039666652679443,
-                                        2.9066286087036133,
-                                        2.9092929363250732,
-                                        2.9119601249694824,
-                                        2.9146294593811035,
-                                        2.9173014163970947,
-                                        2.919975757598877,
-                                        2.9226527214050293,
-                                        2.9253318309783936,
-                                        2.928013324737549,
-                                        2.930697202682495,
-                                        2.933384418487549,
-                                        2.936073064804077,
-                                        2.938764810562134,
-                                        2.9414587020874023,
-                                        2.944154977798462,
-                                        2.9468541145324707,
-                                        2.9495556354522705,
-                                        2.9522595405578613,
-                                        2.954965591430664,
-                                        2.957674741744995,
-                                        2.960386037826538,
-                                        2.963099479675293,
-                                        2.965816020965576,
-                                        2.9685347080230713,
-                                        2.9712560176849365,
-                                        2.973979949951172,
-                                        2.9767065048217773,
-                                        2.9794349670410156,
-                                        2.982166051864624,
-                                        2.9848997592926025,
-                                        2.9876363277435303,
-                                        2.990375280380249,
-                                        2.9931163787841797,
-                                        2.9958600997924805,
-                                        2.9986066818237305,
-                                        3.0013554096221924,
-                                        3.0041069984436035,
-                                        3.0068607330322266,
-                                        3.0096170902252197,
-                                        3.012376308441162,
-                                        3.0151374340057373,
-                                        3.017901659011841,
-                                        3.0206682682037354,
-                                        3.023437023162842,
-                                        3.0262088775634766,
-                                        3.0289828777313232,
-                                        3.031759738922119,
-                                        3.034538984298706,
-                                        3.037320613861084,
-                                        3.040104866027832,
-                                        3.0428919792175293,
-                                        3.0456814765930176,
-                                        3.048473358154297,
-                                        3.0512678623199463,
-                                        3.054065227508545,
-                                        3.0568647384643555,
-                                        3.0596671104431152,
-                                        3.062471866607666,
-                                        3.065279245376587,
-                                        3.068089246749878,
-                                        3.070901870727539,
-                                        3.0737171173095703,
-                                        3.0765347480773926,
-                                        3.079354763031006,
-                                        3.0821778774261475,
-                                        3.085003137588501,
-                                        3.087831497192383,
-                                        3.0906620025634766,
-                                        3.0934951305389404,
-                                        3.0963311195373535,
-                                        3.0991697311401367,
-                                        3.102010726928711,
-                                        3.104854106903076,
-                                        3.1077003479003906,
-                                        3.1105494499206543,
-                                        3.11340069770813,
-                                        3.116255044937134,
-                                        3.1191115379333496,
-                                        3.1219706535339355,
-                                        3.12483286857605,
-                                        3.127697229385376,
-                                        3.1305646896362305,
-                                        3.133434534072876,
-                                        3.1363067626953125,
-                                        3.1391820907592773,
-                                        3.1420600414276123,
-                                        3.144940137863159,
-                                        3.1478230953216553,
-                                        3.1507084369659424,
-                                        3.153597116470337,
-                                        3.1564881801605225,
-                                        3.159381628036499,
-                                        3.1622776985168457,
-                                        3.1651768684387207,
-                                        3.1680781841278076,
-                                        3.1709823608398438,
-                                        3.173888921737671,
-                                        3.1767988204956055,
-                                        3.179710865020752,
-                                        3.1826255321502686,
-                                        3.1855432987213135,
-                                        3.1884634494781494,
-                                        3.1913864612579346,
-                                        3.1943118572235107,
-                                        3.1972403526306152,
-                                        3.2001712322235107,
-                                        3.2031047344207764,
-                                        3.2060413360595703,
-                                        3.208980083465576,
-                                        3.2119216918945312,
-                                        3.2148663997650146,
-                                        3.217813491821289,
-                                        3.2207632064819336,
-                                        3.2237155437469482,
-                                        3.226670742034912,
-                                        3.229628801345825,
-                                        3.2325897216796875,
-                                        3.2355527877807617,
-                                        3.238518714904785,
-                                        3.241487741470337,
-                                        3.244459629058838,
-                                        3.247433662414551,
-                                        3.250410318374634,
-                                        3.253390312194824,
-                                        3.2563726902008057,
-                                        3.2593576908111572,
-                                        3.262345790863037,
-                                        3.265336275100708,
-                                        3.268329381942749,
-                                        3.2713253498077393,
-                                        3.274324417114258,
-                                        3.2773263454437256,
-                                        3.2803304195404053,
-                                        3.283337354660034,
-                                        3.2863476276397705,
-                                        3.289360284805298,
-                                        3.2923755645751953,
-                                        3.295393705368042,
-                                        3.298414468765259,
-                                        3.301438331604004,
-                                        3.30446457862854,
-                                        3.3074941635131836,
-                                        3.310525894165039,
-                                        3.3135604858398438,
-                                        3.316598415374756,
-                                        3.319638729095459,
-                                        3.3226819038391113,
-                                        3.325727701187134,
-                                        3.3287768363952637,
-                                        3.3318281173706055,
-                                        3.3348822593688965,
-                                        3.337939739227295,
-                                        3.3409993648529053,
-                                        3.344061851501465,
-                                        3.347127676010132,
-                                        3.350196361541748,
-                                        3.3532674312591553,
-                                        3.3563411235809326,
-                                        3.359417676925659,
-                                        3.362497568130493,
-                                        3.365579843521118,
-                                        3.3686654567718506,
-                                        3.371753215789795,
-                                        3.374844551086426,
-                                        3.3779380321502686,
-                                        3.3810346126556396,
-                                        3.384134292602539,
-                                        3.3872363567352295,
-                                        3.390341281890869,
-                                        3.393449544906616,
-                                        3.3965601921081543,
-                                        3.3996739387512207,
-                                        3.4027903079986572,
-                                        3.405909538269043,
-                                        3.409032106399536,
-                                        3.4121572971343994,
-                                        3.415285110473633,
-                                        3.4184157848358154,
-                                        3.4215493202209473,
-                                        3.4246866703033447,
-                                        3.427825927734375,
-                                        3.4309680461883545,
-                                        3.434113025665283,
-                                        3.4372613430023193,
-                                        3.4404122829437256,
-                                        3.443565845489502,
-                                        3.446722984313965,
-                                        3.4498822689056396,
-                                        3.453045129776001,
-                                        3.4562103748321533,
-                                        3.459378957748413,
-                                        3.462550163269043,
-                                        3.465724229812622,
-                                        3.4689009189605713,
-                                        3.472081184387207,
-                                        3.475264310836792,
-                                        3.478450059890747,
-                                        3.4816386699676514,
-                                        3.484830141067505,
-                                        3.488024950027466,
-                                        3.4912221431732178,
-                                        3.4944229125976562,
-                                        3.4976260662078857,
-                                        3.5008327960968018,
-                                        3.504041910171509,
-                                        3.507254123687744,
-                                        3.5104691982269287,
-                                        3.5136871337890625,
-                                        3.5169084072113037,
-                                        3.520132303237915,
-                                        3.5233592987060547,
-                                        3.5265891551971436,
-                                        3.52982234954834,
-                                        3.533057928085327,
-                                        3.5362966060638428,
-                                        3.539538621902466,
-                                        3.542782783508301,
-                                        3.5460307598114014,
-                                        3.549281120300293,
-                                        3.5525355339050293,
-                                        3.5557916164398193,
-                                        3.559051513671875,
-                                        3.5623137950897217,
-                                        3.565579414367676,
-                                        3.568848133087158,
-                                        3.572119951248169,
-                                        3.57539439201355,
-                                        3.578671932220459,
-                                        3.5819528102874756,
-                                        3.585236072540283,
-                                        3.5885231494903564,
-                                        3.5918126106262207,
-                                        3.595104932785034,
-                                        3.598400831222534,
-                                        3.6016998291015625,
-                                        3.605001449584961,
-                                        3.6083059310913086,
-                                        3.6116139888763428,
-                                        3.614924192428589,
-                                        3.618238687515259,
-                                        3.6215555667877197,
-                                        3.624875545501709,
-                                        3.6281979084014893,
-                                        3.6315243244171143,
-                                        3.6348536014556885,
-                                        3.6381850242614746,
-                                        3.6415205001831055,
-                                        3.6448590755462646,
-                                        3.648200035095215,
-                                        3.6515438556671143,
-                                        3.6548914909362793,
-                                        3.6582422256469727,
-                                        3.6615960597991943,
-                                        3.664952039718628,
-                                        3.6683120727539062,
-                                        3.671674966812134,
-                                        3.6750407218933105,
-                                        3.6784095764160156,
-                                        3.681781768798828,
-                                        3.685157299041748,
-                                        3.688534736633301,
-                                        3.6919164657592773,
-                                        3.695300579071045,
-                                        3.698688507080078,
-                                        3.7020788192749023,
-                                        3.705472946166992,
-                                        3.708869457244873,
-                                        3.7122693061828613,
-                                        3.715672731399536,
-                                        3.71907901763916,
-                                        3.7224881649017334,
-                                        3.725900411605835,
-                                        3.729316473007202,
-                                        3.7327349185943604,
-                                        3.736156940460205,
-                                        3.739581823348999,
-                                        3.7430098056793213,
-                                        3.746441125869751,
-                                        3.749875545501709,
-                                        3.7533133029937744,
-                                        3.75675368309021,
-                                        3.760197401046753,
-                                        3.7636446952819824,
-                                        3.767094850540161,
-                                        3.7705483436584473,
-                                        3.7740046977996826,
-                                        3.7774641513824463,
-                                        3.7809271812438965,
-                                        3.784393072128296,
-                                        3.787862539291382,
-                                        3.791334390640259,
-                                        3.7948100566864014,
-                                        3.7982890605926514,
-                                        3.8017709255218506,
-                                        3.805255889892578,
-                                        3.808744430541992,
-                                        3.8122363090515137,
-                                        3.815730333328247,
-                                        3.819228410720825,
-                                        3.8227298259735107,
-                                        3.8262341022491455,
-                                        3.8297414779663086,
-                                        3.833252429962158,
-                                        3.8367667198181152,
-                                        3.8402836322784424,
-                                        3.843803882598877,
-                                        3.847327470779419,
-                                        3.8508546352386475,
-                                        3.854384422302246,
-                                        3.8579182624816895,
-                                        3.861454486846924,
-                                        3.8649942874908447,
-                                        3.868537187576294,
-                                        3.8720836639404297,
-                                        3.875633478164673,
-                                        3.8791861534118652,
-                                        3.882742166519165,
-                                        3.8863017559051514,
-                                        3.889864206314087,
-                                        3.893429756164551,
-                                        3.8969993591308594,
-                                        3.900571584701538,
-                                        3.9041473865509033,
-                                        3.907726287841797,
-                                        3.911308765411377,
-                                        3.9148941040039062,
-                                        3.918482780456543,
-                                        3.9220752716064453,
-                                        3.925670862197876,
-                                        3.929269313812256,
-                                        3.932871103286743,
-                                        3.936476707458496,
-                                        3.9400851726531982,
-                                        3.943696975708008,
-                                        3.9473118782043457,
-                                        3.9509313106536865,
-                                        3.954552412033081,
-                                        3.9581780433654785,
-                                        3.961805820465088,
-                                        3.9654383659362793,
-                                        3.9690732955932617,
-                                        3.9727115631103516,
-                                        3.976353168487549,
-                                        3.97999906539917,
-                                        3.983647584915161,
-                                        3.9872992038726807,
-                                        3.9909541606903076,
-                                        3.9946129322052,
-                                        3.998274803161621,
-                                        4.00193977355957,
-                                        4.005608558654785,
-                                        4.009281158447266,
-                                        4.012956142425537,
-                                        4.016634464263916,
-                                        4.020317077636719,
-                                        4.0240020751953125,
-                                        4.027690887451172,
-                                        4.031383514404297,
-                                        4.035079479217529,
-                                        4.038778305053711,
-                                        4.04248046875,
-                                        4.046186447143555,
-                                        4.049895286560059,
-                                        4.053608417510986,
-                                        4.057323932647705,
-                                        4.061043739318848,
-                                        4.0647664070129395,
-                                        4.068492412567139,
-                                        4.072221755981445,
-                                        4.075955390930176,
-                                        4.079691410064697,
-                                        4.083431243896484,
-                                        4.087174892425537,
-                                        4.090921878814697,
-                                        4.094671249389648,
-                                        4.098425388336182,
-                                        4.102182388305664,
-                                        4.105942726135254,
-                                        4.109706878662109,
-                                        4.113474369049072,
-                                        4.117245197296143,
-                                        4.12101936340332,
-                                        4.124797344207764,
-                                        4.1285786628723145,
-                                        4.132363319396973,
-                                        4.136151313781738,
-                                        4.139942646026611,
-                                        4.143738746643066,
-                                        4.147536754608154,
-                                        4.151339054107666,
-                                        4.155144214630127,
-                                        4.158953666687012,
-                                        4.162765979766846,
-                                        4.1665825843811035,
-                                        4.170401573181152,
-                                        4.174224376678467,
-                                        4.178051471710205,
-                                        4.181881427764893,
-                                        4.185715198516846,
-                                        4.189551830291748,
-                                        4.193392276763916,
-                                        4.19723653793335,
-                                        4.201084136962891,
-                                        4.204935550689697,
-                                        4.208790302276611,
-                                        4.212648391723633,
-                                        4.21651029586792,
-                                        4.2203755378723145,
-                                        4.224244594573975,
-                                        4.228116989135742,
-                                        4.231992721557617,
-                                        4.235872745513916,
-                                        4.239755153656006,
-                                        4.243642330169678,
-                                        4.247532367706299,
-                                        4.251425743103027,
-                                        4.25532341003418,
-                                        4.259224891662598,
-                                        4.263128280639648,
-                                        4.2670369148254395,
-                                        4.270948886871338,
-                                        4.2748637199401855,
-                                        4.278782367706299,
-                                        4.282705307006836,
-                                        4.2866315841674805,
-                                        4.290560245513916,
-                                        4.294493675231934,
-                                        4.298430919647217,
-                                        4.302371025085449,
-                                        4.306314945220947,
-                                        4.310262203216553,
-                                        4.31421422958374,
-                                        4.318169116973877,
-                                        4.322126865386963,
-                                        4.326089382171631,
-                                        4.330055236816406,
-                                        4.334023952484131,
-                                        4.3379974365234375,
-                                        4.341973781585693,
-                                        4.345954895019531,
-                                        4.34993839263916,
-                                        4.353926181793213,
-                                        4.357917308807373,
-                                        4.361912250518799,
-                                        4.36591100692749,
-                                        4.369913101196289,
-                                        4.373919486999512,
-                                        4.377928733825684,
-                                        4.381942272186279,
-                                        4.385959148406982,
-                                        4.389980316162109,
-                                        4.3940043449401855,
-                                        4.3980326652526855,
-                                        4.402064323425293,
-                                        4.406099796295166,
-                                        4.4101386070251465,
-                                        4.414181232452393,
-                                        4.4182281494140625,
-                                        4.422277927398682,
-                                        4.426332473754883,
-                                        4.430389881134033,
-                                        4.434451580047607,
-                                        4.438516139984131,
-                                        4.442584991455078,
-                                        4.446657657623291,
-                                        4.4507341384887695,
-                                        4.454813480377197,
-                                        4.458898067474365,
-                                        4.462985515594482,
-                                        4.467076778411865,
-                                        4.4711713790893555,
-                                        4.4752702713012695,
-                                        4.479372978210449,
-                                        4.483478546142578,
-                                        4.487588882446289,
-                                        4.491703033447266,
-                                        4.495820999145508,
-                                        4.499941825866699,
-                                        4.5040669441223145,
-                                        4.5081963539123535,
-                                        4.512328147888184,
-                                        4.516465187072754,
-                                        4.52060604095459,
-                                        4.524750232696533,
-                                        4.528897285461426,
-                                        4.533049583435059,
-                                        4.537204742431641,
-                                        4.541363716125488,
-                                        4.545526504516602,
-                                        4.549694061279297,
-                                        4.553864479064941,
-                                        4.558039665222168,
-                                        4.562217712402344,
-                                        4.566400051116943,
-                                        4.57058572769165,
-                                        4.574775695800781,
-                                        4.578969478607178,
-                                        4.58316707611084,
-                                        4.587368965148926,
-                                        4.591573715209961,
-                                        4.595783233642578,
-                                        4.599996089935303,
-                                        4.604213237762451,
-                                        4.608433723449707,
-                                        4.612658500671387,
-                                        4.616887092590332,
-                                        4.621119022369385,
-                                        4.6253557205200195,
-                                        4.629595756530762,
-                                        4.633840084075928,
-                                        4.638086795806885,
-                                        4.642339706420898,
-                                        4.646595001220703,
-                                        4.650854587554932,
-                                        4.655117511749268,
-                                        4.659385681152344,
-                                        4.663657188415527,
-                                        4.66793155670166,
-                                        4.672211170196533,
-                                        4.676494598388672,
-                                        4.680781364440918,
-                                        4.68507194519043,
-                                        4.689366340637207,
-                                        4.693665504455566,
-                                        4.69796895980835,
-                                        4.702274799346924,
-                                        4.70658540725708,
-                                        4.71090030670166,
-                                        4.715219020843506,
-                                        4.719541072845459,
-                                        4.723867893218994,
-                                        4.728198528289795,
-                                        4.732532024383545,
-                                        4.736870765686035,
-                                        4.741212844848633,
-                                        4.7455596923828125,
-                                        4.7499098777771,
-                                        4.7542643547058105,
-                                        4.758622646331787,
-                                        4.762984275817871,
-                                        4.767351150512695,
-                                        4.771721839904785,
-                                        4.776095867156982,
-                                        4.780473709106445,
-                                        4.78485631942749,
-                                        4.789242744445801,
-                                        4.793633460998535,
-                                        4.798027515411377,
-                                        4.802426338195801,
-                                        4.806828498840332,
-                                        4.811234474182129,
-                                        4.815645694732666,
-                                        4.820059776306152,
-                                        4.8244781494140625,
-                                        4.828900337219238,
-                                        4.833327770233154,
-                                        4.837758541107178,
-                                        4.842193126678467,
-                                        4.84663200378418,
-                                        4.851075172424316,
-                                        4.855522155761719,
-                                        4.859972953796387,
-                                        4.8644280433654785,
-                                        4.868887901306152,
-                                        4.873351097106934,
-                                        4.877818584442139,
-                                        4.882289886474609,
-                                        4.886765956878662,
-                                        4.891245365142822,
-                                        4.895729064941406,
-                                        4.900217056274414,
-                                        4.904709815979004,
-                                        4.909205436706543,
-                                        4.913705825805664,
-                                        4.918210506439209,
-                                        4.9227190017700195,
-                                        4.927231311798096,
-                                        4.931748390197754,
-                                        4.936269760131836,
-                                        4.940794944763184,
-                                        4.945323944091797,
-                                        4.949857711791992,
-                                        4.954394817352295,
-                                        4.958937168121338,
-                                        4.963481903076172,
-                                        4.968032360076904,
-                                        4.9725871086120605,
-                                        4.977145195007324,
-                                        4.981707572937012,
-                                        4.986274719238281,
-                                        4.990845680236816,
-                                        4.995420455932617
-                                    ],
-                                    "xaxis": "x4",
-                                    "yaxis": "y4"
-                                }
-                            ],
-                            "layout": {
-                                "annotations": [
-                                    {
-                                        "font": {
-                                            "size": 16
-                                        },
-                                        "showarrow": false,
-                                        "text": "Uniform",
-                                        "x": 0.225,
-                                        "xanchor": "center",
-                                        "xref": "paper",
-                                        "y": 1,
-                                        "yanchor": "bottom",
-                                        "yref": "paper"
-                                    },
-                                    {
-                                        "font": {
-                                            "size": 16
-                                        },
-                                        "showarrow": false,
-                                        "text": "Linear in Disparity",
-                                        "x": 0.775,
-                                        "xanchor": "center",
-                                        "xref": "paper",
-                                        "y": 1,
-                                        "yanchor": "bottom",
-                                        "yref": "paper"
-                                    },
-                                    {
-                                        "font": {
-                                            "size": 16
-                                        },
-                                        "showarrow": false,
-                                        "text": "Square Root",
-                                        "x": 0.225,
-                                        "xanchor": "center",
-                                        "xref": "paper",
-                                        "y": 0.45,
-                                        "yanchor": "bottom",
-                                        "yref": "paper"
-                                    },
-                                    {
-                                        "font": {
-                                            "size": 16
-                                        },
-                                        "showarrow": false,
-                                        "text": "Log Sampler",
-                                        "x": 0.775,
-                                        "xanchor": "center",
-                                        "xref": "paper",
-                                        "y": 0.45,
-                                        "yanchor": "bottom",
-                                        "yref": "paper"
-                                    }
-                                ],
-                                "height": 700,
-                                "hovermode": false,
-                                "margin": {
-                                    "b": 20,
-                                    "l": 20,
-                                    "r": 20,
-                                    "t": 50
-                                },
-                                "showlegend": false,
-                                "template": {
-                                    "data": {
-                                        "bar": [
-                                            {
-                                                "error_x": {
-                                                    "color": "#2a3f5f"
-                                                },
-                                                "error_y": {
-                                                    "color": "#2a3f5f"
-                                                },
-                                                "marker": {
-                                                    "line": {
-                                                        "color": "#E5ECF6",
-                                                        "width": 0.5
-                                                    },
-                                                    "pattern": {
-                                                        "fillmode": "overlay",
-                                                        "size": 10,
-                                                        "solidity": 0.2
-                                                    }
-                                                },
-                                                "type": "bar"
-                                            }
-                                        ],
-                                        "barpolar": [
-                                            {
-                                                "marker": {
-                                                    "line": {
-                                                        "color": "#E5ECF6",
-                                                        "width": 0.5
-                                                    },
-                                                    "pattern": {
-                                                        "fillmode": "overlay",
-                                                        "size": 10,
-                                                        "solidity": 0.2
-                                                    }
-                                                },
-                                                "type": "barpolar"
-                                            }
-                                        ],
-                                        "carpet": [
-                                            {
-                                                "aaxis": {
-                                                    "endlinecolor": "#2a3f5f",
-                                                    "gridcolor": "white",
-                                                    "linecolor": "white",
-                                                    "minorgridcolor": "white",
-                                                    "startlinecolor": "#2a3f5f"
-                                                },
-                                                "baxis": {
-                                                    "endlinecolor": "#2a3f5f",
-                                                    "gridcolor": "white",
-                                                    "linecolor": "white",
-                                                    "minorgridcolor": "white",
-                                                    "startlinecolor": "#2a3f5f"
-                                                },
-                                                "type": "carpet"
-                                            }
-                                        ],
-                                        "choropleth": [
-                                            {
-                                                "colorbar": {
-                                                    "outlinewidth": 0,
-                                                    "ticks": ""
-                                                },
-                                                "type": "choropleth"
-                                            }
-                                        ],
-                                        "contour": [
-                                            {
-                                                "colorbar": {
-                                                    "outlinewidth": 0,
-                                                    "ticks": ""
-                                                },
-                                                "colorscale": [
-                                                    [
-                                                        0,
-                                                        "#0d0887"
-                                                    ],
-                                                    [
-                                                        0.1111111111111111,
-                                                        "#46039f"
-                                                    ],
-                                                    [
-                                                        0.2222222222222222,
-                                                        "#7201a8"
-                                                    ],
-                                                    [
-                                                        0.3333333333333333,
-                                                        "#9c179e"
-                                                    ],
-                                                    [
-                                                        0.4444444444444444,
-                                                        "#bd3786"
-                                                    ],
-                                                    [
-                                                        0.5555555555555556,
-                                                        "#d8576b"
-                                                    ],
-                                                    [
-                                                        0.6666666666666666,
-                                                        "#ed7953"
-                                                    ],
-                                                    [
-                                                        0.7777777777777778,
-                                                        "#fb9f3a"
-                                                    ],
-                                                    [
-                                                        0.8888888888888888,
-                                                        "#fdca26"
-                                                    ],
-                                                    [
-                                                        1,
-                                                        "#f0f921"
-                                                    ]
-                                                ],
-                                                "type": "contour"
-                                            }
-                                        ],
-                                        "contourcarpet": [
-                                            {
-                                                "colorbar": {
-                                                    "outlinewidth": 0,
-                                                    "ticks": ""
-                                                },
-                                                "type": "contourcarpet"
-                                            }
-                                        ],
-                                        "heatmap": [
-                                            {
-                                                "colorbar": {
-                                                    "outlinewidth": 0,
-                                                    "ticks": ""
-                                                },
-                                                "colorscale": [
-                                                    [
-                                                        0,
-                                                        "#0d0887"
-                                                    ],
-                                                    [
-                                                        0.1111111111111111,
-                                                        "#46039f"
-                                                    ],
-                                                    [
-                                                        0.2222222222222222,
-                                                        "#7201a8"
-                                                    ],
-                                                    [
-                                                        0.3333333333333333,
-                                                        "#9c179e"
-                                                    ],
-                                                    [
-                                                        0.4444444444444444,
-                                                        "#bd3786"
-                                                    ],
-                                                    [
-                                                        0.5555555555555556,
-                                                        "#d8576b"
-                                                    ],
-                                                    [
-                                                        0.6666666666666666,
-                                                        "#ed7953"
-                                                    ],
-                                                    [
-                                                        0.7777777777777778,
-                                                        "#fb9f3a"
-                                                    ],
-                                                    [
-                                                        0.8888888888888888,
-                                                        "#fdca26"
-                                                    ],
-                                                    [
-                                                        1,
-                                                        "#f0f921"
-                                                    ]
-                                                ],
-                                                "type": "heatmap"
-                                            }
-                                        ],
-                                        "heatmapgl": [
-                                            {
-                                                "colorbar": {
-                                                    "outlinewidth": 0,
-                                                    "ticks": ""
-                                                },
-                                                "colorscale": [
-                                                    [
-                                                        0,
-                                                        "#0d0887"
-                                                    ],
-                                                    [
-                                                        0.1111111111111111,
-                                                        "#46039f"
-                                                    ],
-                                                    [
-                                                        0.2222222222222222,
-                                                        "#7201a8"
-                                                    ],
-                                                    [
-                                                        0.3333333333333333,
-                                                        "#9c179e"
-                                                    ],
-                                                    [
-                                                        0.4444444444444444,
-                                                        "#bd3786"
-                                                    ],
-                                                    [
-                                                        0.5555555555555556,
-                                                        "#d8576b"
-                                                    ],
-                                                    [
-                                                        0.6666666666666666,
-                                                        "#ed7953"
-                                                    ],
-                                                    [
-                                                        0.7777777777777778,
-                                                        "#fb9f3a"
-                                                    ],
-                                                    [
-                                                        0.8888888888888888,
-                                                        "#fdca26"
-                                                    ],
-                                                    [
-                                                        1,
-                                                        "#f0f921"
-                                                    ]
-                                                ],
-                                                "type": "heatmapgl"
-                                            }
-                                        ],
-                                        "histogram": [
-                                            {
-                                                "marker": {
-                                                    "pattern": {
-                                                        "fillmode": "overlay",
-                                                        "size": 10,
-                                                        "solidity": 0.2
-                                                    }
-                                                },
-                                                "type": "histogram"
-                                            }
-                                        ],
-                                        "histogram2d": [
-                                            {
-                                                "colorbar": {
-                                                    "outlinewidth": 0,
-                                                    "ticks": ""
-                                                },
-                                                "colorscale": [
-                                                    [
-                                                        0,
-                                                        "#0d0887"
-                                                    ],
-                                                    [
-                                                        0.1111111111111111,
-                                                        "#46039f"
-                                                    ],
-                                                    [
-                                                        0.2222222222222222,
-                                                        "#7201a8"
-                                                    ],
-                                                    [
-                                                        0.3333333333333333,
-                                                        "#9c179e"
-                                                    ],
-                                                    [
-                                                        0.4444444444444444,
-                                                        "#bd3786"
-                                                    ],
-                                                    [
-                                                        0.5555555555555556,
-                                                        "#d8576b"
-                                                    ],
-                                                    [
-                                                        0.6666666666666666,
-                                                        "#ed7953"
-                                                    ],
-                                                    [
-                                                        0.7777777777777778,
-                                                        "#fb9f3a"
-                                                    ],
-                                                    [
-                                                        0.8888888888888888,
-                                                        "#fdca26"
-                                                    ],
-                                                    [
-                                                        1,
-                                                        "#f0f921"
-                                                    ]
-                                                ],
-                                                "type": "histogram2d"
-                                            }
-                                        ],
-                                        "histogram2dcontour": [
-                                            {
-                                                "colorbar": {
-                                                    "outlinewidth": 0,
-                                                    "ticks": ""
-                                                },
-                                                "colorscale": [
-                                                    [
-                                                        0,
-                                                        "#0d0887"
-                                                    ],
-                                                    [
-                                                        0.1111111111111111,
-                                                        "#46039f"
-                                                    ],
-                                                    [
-                                                        0.2222222222222222,
-                                                        "#7201a8"
-                                                    ],
-                                                    [
-                                                        0.3333333333333333,
-                                                        "#9c179e"
-                                                    ],
-                                                    [
-                                                        0.4444444444444444,
-                                                        "#bd3786"
-                                                    ],
-                                                    [
-                                                        0.5555555555555556,
-                                                        "#d8576b"
-                                                    ],
-                                                    [
-                                                        0.6666666666666666,
-                                                        "#ed7953"
-                                                    ],
-                                                    [
-                                                        0.7777777777777778,
-                                                        "#fb9f3a"
-                                                    ],
-                                                    [
-                                                        0.8888888888888888,
-                                                        "#fdca26"
-                                                    ],
-                                                    [
-                                                        1,
-                                                        "#f0f921"
-                                                    ]
-                                                ],
-                                                "type": "histogram2dcontour"
-                                            }
-                                        ],
-                                        "mesh3d": [
-                                            {
-                                                "colorbar": {
-                                                    "outlinewidth": 0,
-                                                    "ticks": ""
-                                                },
-                                                "type": "mesh3d"
-                                            }
-                                        ],
-                                        "parcoords": [
-                                            {
-                                                "line": {
-                                                    "colorbar": {
-                                                        "outlinewidth": 0,
-                                                        "ticks": ""
-                                                    }
-                                                },
-                                                "type": "parcoords"
-                                            }
-                                        ],
-                                        "pie": [
-                                            {
-                                                "automargin": true,
-                                                "type": "pie"
-                                            }
-                                        ],
-                                        "scatter": [
-                                            {
-                                                "fillpattern": {
-                                                    "fillmode": "overlay",
-                                                    "size": 10,
-                                                    "solidity": 0.2
-                                                },
-                                                "type": "scatter"
-                                            }
-                                        ],
-                                        "scatter3d": [
-                                            {
-                                                "line": {
-                                                    "colorbar": {
-                                                        "outlinewidth": 0,
-                                                        "ticks": ""
-                                                    }
-                                                },
-                                                "marker": {
-                                                    "colorbar": {
-                                                        "outlinewidth": 0,
-                                                        "ticks": ""
-                                                    }
-                                                },
-                                                "type": "scatter3d"
-                                            }
-                                        ],
-                                        "scattercarpet": [
-                                            {
-                                                "marker": {
-                                                    "colorbar": {
-                                                        "outlinewidth": 0,
-                                                        "ticks": ""
-                                                    }
-                                                },
-                                                "type": "scattercarpet"
-                                            }
-                                        ],
-                                        "scattergeo": [
-                                            {
-                                                "marker": {
-                                                    "colorbar": {
-                                                        "outlinewidth": 0,
-                                                        "ticks": ""
-                                                    }
-                                                },
-                                                "type": "scattergeo"
-                                            }
-                                        ],
-                                        "scattergl": [
-                                            {
-                                                "marker": {
-                                                    "colorbar": {
-                                                        "outlinewidth": 0,
-                                                        "ticks": ""
-                                                    }
-                                                },
-                                                "type": "scattergl"
-                                            }
-                                        ],
-                                        "scattermapbox": [
-                                            {
-                                                "marker": {
-                                                    "colorbar": {
-                                                        "outlinewidth": 0,
-                                                        "ticks": ""
-                                                    }
-                                                },
-                                                "type": "scattermapbox"
-                                            }
-                                        ],
-                                        "scatterpolar": [
-                                            {
-                                                "marker": {
-                                                    "colorbar": {
-                                                        "outlinewidth": 0,
-                                                        "ticks": ""
-                                                    }
-                                                },
-                                                "type": "scatterpolar"
-                                            }
-                                        ],
-                                        "scatterpolargl": [
-                                            {
-                                                "marker": {
-                                                    "colorbar": {
-                                                        "outlinewidth": 0,
-                                                        "ticks": ""
-                                                    }
-                                                },
-                                                "type": "scatterpolargl"
-                                            }
-                                        ],
-                                        "scatterternary": [
-                                            {
-                                                "marker": {
-                                                    "colorbar": {
-                                                        "outlinewidth": 0,
-                                                        "ticks": ""
-                                                    }
-                                                },
-                                                "type": "scatterternary"
-                                            }
-                                        ],
-                                        "surface": [
-                                            {
-                                                "colorbar": {
-                                                    "outlinewidth": 0,
-                                                    "ticks": ""
-                                                },
-                                                "colorscale": [
-                                                    [
-                                                        0,
-                                                        "#0d0887"
-                                                    ],
-                                                    [
-                                                        0.1111111111111111,
-                                                        "#46039f"
-                                                    ],
-                                                    [
-                                                        0.2222222222222222,
-                                                        "#7201a8"
-                                                    ],
-                                                    [
-                                                        0.3333333333333333,
-                                                        "#9c179e"
-                                                    ],
-                                                    [
-                                                        0.4444444444444444,
-                                                        "#bd3786"
-                                                    ],
-                                                    [
-                                                        0.5555555555555556,
-                                                        "#d8576b"
-                                                    ],
-                                                    [
-                                                        0.6666666666666666,
-                                                        "#ed7953"
-                                                    ],
-                                                    [
-                                                        0.7777777777777778,
-                                                        "#fb9f3a"
-                                                    ],
-                                                    [
-                                                        0.8888888888888888,
-                                                        "#fdca26"
-                                                    ],
-                                                    [
-                                                        1,
-                                                        "#f0f921"
-                                                    ]
-                                                ],
-                                                "type": "surface"
-                                            }
-                                        ],
-                                        "table": [
-                                            {
-                                                "cells": {
-                                                    "fill": {
-                                                        "color": "#EBF0F8"
-                                                    },
-                                                    "line": {
-                                                        "color": "white"
-                                                    }
-                                                },
-                                                "header": {
-                                                    "fill": {
-                                                        "color": "#C8D4E3"
-                                                    },
-                                                    "line": {
-                                                        "color": "white"
-                                                    }
-                                                },
-                                                "type": "table"
-                                            }
-                                        ]
-                                    },
-                                    "layout": {
-                                        "annotationdefaults": {
-                                            "arrowcolor": "#2a3f5f",
-                                            "arrowhead": 0,
-                                            "arrowwidth": 1
-                                        },
-                                        "autotypenumbers": "strict",
-                                        "coloraxis": {
-                                            "colorbar": {
-                                                "outlinewidth": 0,
-                                                "ticks": ""
-                                            }
-                                        },
-                                        "colorscale": {
-                                            "diverging": [
-                                                [
-                                                    0,
-                                                    "#8e0152"
-                                                ],
-                                                [
-                                                    0.1,
-                                                    "#c51b7d"
-                                                ],
-                                                [
-                                                    0.2,
-                                                    "#de77ae"
-                                                ],
-                                                [
-                                                    0.3,
-                                                    "#f1b6da"
-                                                ],
-                                                [
-                                                    0.4,
-                                                    "#fde0ef"
-                                                ],
-                                                [
-                                                    0.5,
-                                                    "#f7f7f7"
-                                                ],
-                                                [
-                                                    0.6,
-                                                    "#e6f5d0"
-                                                ],
-                                                [
-                                                    0.7,
-                                                    "#b8e186"
-                                                ],
-                                                [
-                                                    0.8,
-                                                    "#7fbc41"
-                                                ],
-                                                [
-                                                    0.9,
-                                                    "#4d9221"
-                                                ],
-                                                [
-                                                    1,
-                                                    "#276419"
-                                                ]
-                                            ],
-                                            "sequential": [
-                                                [
-                                                    0,
-                                                    "#0d0887"
-                                                ],
-                                                [
-                                                    0.1111111111111111,
-                                                    "#46039f"
-                                                ],
-                                                [
-                                                    0.2222222222222222,
-                                                    "#7201a8"
-                                                ],
-                                                [
-                                                    0.3333333333333333,
-                                                    "#9c179e"
-                                                ],
-                                                [
-                                                    0.4444444444444444,
-                                                    "#bd3786"
-                                                ],
-                                                [
-                                                    0.5555555555555556,
-                                                    "#d8576b"
-                                                ],
-                                                [
-                                                    0.6666666666666666,
-                                                    "#ed7953"
-                                                ],
-                                                [
-                                                    0.7777777777777778,
-                                                    "#fb9f3a"
-                                                ],
-                                                [
-                                                    0.8888888888888888,
-                                                    "#fdca26"
-                                                ],
-                                                [
-                                                    1,
-                                                    "#f0f921"
-                                                ]
-                                            ],
-                                            "sequentialminus": [
-                                                [
-                                                    0,
-                                                    "#0d0887"
-                                                ],
-                                                [
-                                                    0.1111111111111111,
-                                                    "#46039f"
-                                                ],
-                                                [
-                                                    0.2222222222222222,
-                                                    "#7201a8"
-                                                ],
-                                                [
-                                                    0.3333333333333333,
-                                                    "#9c179e"
-                                                ],
-                                                [
-                                                    0.4444444444444444,
-                                                    "#bd3786"
-                                                ],
-                                                [
-                                                    0.5555555555555556,
-                                                    "#d8576b"
-                                                ],
-                                                [
-                                                    0.6666666666666666,
-                                                    "#ed7953"
-                                                ],
-                                                [
-                                                    0.7777777777777778,
-                                                    "#fb9f3a"
-                                                ],
-                                                [
-                                                    0.8888888888888888,
-                                                    "#fdca26"
-                                                ],
-                                                [
-                                                    1,
-                                                    "#f0f921"
-                                                ]
-                                            ]
-                                        },
-                                        "colorway": [
-                                            "#636efa",
-                                            "#EF553B",
-                                            "#00cc96",
-                                            "#ab63fa",
-                                            "#FFA15A",
-                                            "#19d3f3",
-                                            "#FF6692",
-                                            "#B6E880",
-                                            "#FF97FF",
-                                            "#FECB52"
-                                        ],
-                                        "font": {
-                                            "color": "#2a3f5f"
-                                        },
-                                        "geo": {
-                                            "bgcolor": "white",
-                                            "lakecolor": "white",
-                                            "landcolor": "#E5ECF6",
-                                            "showlakes": true,
-                                            "showland": true,
-                                            "subunitcolor": "white"
-                                        },
-                                        "hoverlabel": {
-                                            "align": "left"
-                                        },
-                                        "hovermode": "closest",
-                                        "mapbox": {
-                                            "style": "light"
-                                        },
-                                        "paper_bgcolor": "white",
-                                        "plot_bgcolor": "#E5ECF6",
-                                        "polar": {
-                                            "angularaxis": {
-                                                "gridcolor": "white",
-                                                "linecolor": "white",
-                                                "ticks": ""
-                                            },
-                                            "bgcolor": "#E5ECF6",
-                                            "radialaxis": {
-                                                "gridcolor": "white",
-                                                "linecolor": "white",
-                                                "ticks": ""
-                                            }
-                                        },
-                                        "scene": {
-                                            "xaxis": {
-                                                "backgroundcolor": "#E5ECF6",
-                                                "gridcolor": "white",
-                                                "gridwidth": 2,
-                                                "linecolor": "white",
-                                                "showbackground": true,
-                                                "ticks": "",
-                                                "zerolinecolor": "white"
-                                            },
-                                            "yaxis": {
-                                                "backgroundcolor": "#E5ECF6",
-                                                "gridcolor": "white",
-                                                "gridwidth": 2,
-                                                "linecolor": "white",
-                                                "showbackground": true,
-                                                "ticks": "",
-                                                "zerolinecolor": "white"
-                                            },
-                                            "zaxis": {
-                                                "backgroundcolor": "#E5ECF6",
-                                                "gridcolor": "white",
-                                                "gridwidth": 2,
-                                                "linecolor": "white",
-                                                "showbackground": true,
-                                                "ticks": "",
-                                                "zerolinecolor": "white"
-                                            }
-                                        },
-                                        "shapedefaults": {
-                                            "line": {
-                                                "color": "#2a3f5f"
-                                            }
-                                        },
-                                        "ternary": {
-                                            "aaxis": {
-                                                "gridcolor": "white",
-                                                "linecolor": "white",
-                                                "ticks": ""
-                                            },
-                                            "baxis": {
-                                                "gridcolor": "white",
-                                                "linecolor": "white",
-                                                "ticks": ""
-                                            },
-                                            "bgcolor": "#E5ECF6",
-                                            "caxis": {
-                                                "gridcolor": "white",
-                                                "linecolor": "white",
-                                                "ticks": ""
-                                            }
-                                        },
-                                        "title": {
-                                            "x": 0.05
-                                        },
-                                        "xaxis": {
-                                            "automargin": true,
-                                            "gridcolor": "white",
-                                            "linecolor": "white",
-                                            "ticks": "",
-                                            "title": {
-                                                "standoff": 15
-                                            },
-                                            "zerolinecolor": "white",
-                                            "zerolinewidth": 2
-                                        },
-                                        "yaxis": {
-                                            "automargin": true,
-                                            "gridcolor": "white",
-                                            "linecolor": "white",
-                                            "ticks": "",
-                                            "title": {
-                                                "standoff": 15
-                                            },
-                                            "zerolinecolor": "white",
-                                            "zerolinewidth": 2
-                                        }
-                                    }
-                                },
-                                "xaxis": {
-                                    "anchor": "y",
-                                    "domain": [
-                                        0,
-                                        0.45
-                                    ],
-                                    "matches": "x3",
-                                    "showticklabels": false
-                                },
-                                "xaxis2": {
-                                    "anchor": "y2",
-                                    "domain": [
-                                        0.55,
-                                        1
-                                    ],
-                                    "matches": "x4",
-                                    "showticklabels": false
-                                },
-                                "xaxis3": {
-                                    "anchor": "y3",
-                                    "domain": [
-                                        0,
-                                        0.45
-                                    ],
-                                    "title": {
-                                        "text": "Distance"
-                                    }
-                                },
-                                "xaxis4": {
-                                    "anchor": "y4",
-                                    "domain": [
-                                        0.55,
-                                        1
-                                    ],
-                                    "title": {
-                                        "text": "Distance"
-                                    }
-                                },
-                                "yaxis": {
-                                    "anchor": "x",
-                                    "domain": [
-                                        0.55,
-                                        1
-                                    ],
-                                    "range": [
-                                        0,
-                                        80
-                                    ],
-                                    "title": {
-                                        "text": "# Samples"
-                                    }
-                                },
-                                "yaxis2": {
-                                    "anchor": "x2",
-                                    "domain": [
-                                        0.55,
-                                        1
-                                    ],
-                                    "matches": "y",
-                                    "range": [
-                                        0,
-                                        80
-                                    ],
-                                    "showticklabels": false
-                                },
-                                "yaxis3": {
-                                    "anchor": "x3",
-                                    "domain": [
-                                        0,
-                                        0.45
-                                    ],
-                                    "range": [
-                                        0,
-                                        80
-                                    ],
-                                    "title": {
-                                        "text": "# Samples"
-                                    }
-                                },
-                                "yaxis4": {
-                                    "anchor": "x4",
-                                    "domain": [
-                                        0,
-                                        0.45
-                                    ],
-                                    "matches": "y3",
-                                    "range": [
-                                        0,
-                                        80
-                                    ],
-                                    "showticklabels": false
-                                }
-                            }
-                        },
-                        "text/html": [
-                            "
" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "# COLLAPSED\n", - "import torch\n", - "from nerfstudio.cameras.rays import RayBundle\n", - "from nerfstudio.model_components import ray_sampler\n", - "import plotly.graph_objects as go\n", - "from plotly.subplots import make_subplots\n", - "\n", - "\n", - "num_samples = 1000\n", - "near = 2\n", - "far = 5\n", - "train_stratified = False\n", - "\n", - "samplers = [\n", - " ray_sampler.UniformSampler,\n", - " ray_sampler.LinearDisparitySampler,\n", - " ray_sampler.SqrtSampler,\n", - " ray_sampler.LogSampler,\n", - "]\n", - "\n", - "fig = make_subplots(\n", - " rows=2,\n", - " cols=2,\n", - " subplot_titles=(\"Uniform\", \"Linear in Disparity\", \"Square Root\", \"Log Sampler\"),\n", - " shared_xaxes=True,\n", - " shared_yaxes=True,\n", - " vertical_spacing=0.1,\n", - ")\n", - "\n", - "for i, Sampler in enumerate(samplers):\n", - " sampler = Sampler(num_samples=num_samples, train_stratified=train_stratified)\n", - "\n", - " ray_bundle = RayBundle(\n", - " origins=torch.ones([1, 3]),\n", - " directions=torch.ones([1, 3]),\n", - " pixel_area=torch.ones([1, 1]),\n", - " nears=torch.ones([1, 1]) * near,\n", - " fars=torch.ones([1, 1]) * far,\n", - " )\n", - "\n", - " samples = sampler.generate_ray_samples(ray_bundle)\n", - "\n", - " trace = go.Histogram(x=samples.frustums.starts[0, :, 0], nbinsx=50)\n", - " fig.append_trace(trace, i // 2 + 1, i % 2 + 1)\n", - "\n", - "fig.update_yaxes(title_text=\"# Samples\", row=1, col=1)\n", - "fig.update_yaxes(title_text=\"# Samples\", row=2, col=1)\n", - "fig.update_xaxes(title_text=\"Distance\", row=2, col=1)\n", - "fig.update_xaxes(title_text=\"Distance\", row=2, col=2)\n", - "\n", - "# Overlay both histograms\n", - "fig.update_layout(height=700, hovermode=False, showlegend=False, margin=dict(l=20, r=20, t=50, b=20))\n", - "fig.update_yaxes(range=[0, 80])\n", - "fig.update_traces(opacity=0.7)\n", - "fig.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## PDF Sampler\n", - "\n", - "The Probability Distribution Function (PDF) Sampler generates samples that match a given distribution. \n", - "\n", - "In the example below we first create a `UniformSampler` to generate a set of initial samples. We then assign weights to each of these samples to define the PDF (here it is an arbitrary funtion, but usually you would use the predicted weights from the field). The left plot the target PDF, on the right we plot a histogram of samples generated from the `PDFSampler`." - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "tags": [ - "hide-input" - ] - }, - "outputs": [ - { - "data": { - "application/vnd.plotly.v1+json": { - "config": { - "plotlyServerURL": "https://plot.ly" - }, - "data": [ - { - "opacity": 0.7, - "type": "scatter", - "x": [ - 2, - 2.1500000953674316, - 2.1500000953674316, - 2.299999952316284, - 2.299999952316284, - 2.450000047683716, - 2.450000047683716, - 2.5999999046325684, - 2.5999999046325684, - 2.75, - 2.75, - 2.9000000953674316, - 2.9000000953674316, - 3.049999952316284, - 3.049999952316284, - 3.200000047683716, - 3.200000047683716, - 3.3499999046325684, - 3.3499999046325684, - 3.5, - 3.5, - 3.6500000953674316, - 3.6500000953674316, - 3.799999952316284, - 3.799999952316284, - 3.950000047683716, - 3.950000047683716, - 4.100000381469727, - 4.100000381469727, - 4.25, - 4.25, - 4.400000095367432, - 4.400000095367432, - 4.550000190734863, - 4.550000190734863, - 4.699999809265137, - 4.699999809265137, - 4.849999904632568, - 4.849999904632568, - 5 - ], - "xaxis": "x", - "y": [ - 0.013052567839622498, - 0.013052567839622498, - 0.03800889104604721, - 0.03800889104604721, - 0.057813677936792374, - 0.057813677936792374, - 0.06855124980211258, - 0.06855124980211258, - 0.06847988814115524, - 0.06847988814115524, - 0.058445800095796585, - 0.058445800095796585, - 0.041673533618450165, - 0.041673533618450165, - 0.022983169183135033, - 0.022983169183135033, - 0.007623155601322651, - 0.007623155601322651, - 0, - 0, - 0.002611340256407857, - 0.002611340256407857, - 0.015439355745911598, - 0.015439355745911598, - 0.03595082834362984, - 0.03595082834362984, - 0.05970405042171478, - 0.05970405042171478, - 0.0814160406589508, - 0.0814160406589508, - 0.09623293578624725, - 0.09623293578624725, - 0.10089751332998276, - 0.10089751332998276, - 0.09453219175338745, - 0.09453219175338745, - 0.07884885370731354, - 0.07884885370731354, - 0.057734981179237366, - 0.057734981179237366 - ], - "yaxis": "y" - }, - { - "nbinsx": 100, - "opacity": 0.7, - "type": "histogram", - "x": [ - 2.0039002895355225, - 2.0117006301879883, - 2.019501209259033, - 2.027301549911499, - 2.035102128982544, - 2.0429024696350098, - 2.0507028102874756, - 2.0585033893585205, - 2.0663037300109863, - 2.074104070663452, - 2.081904649734497, - 2.089704990386963, - 2.097505569458008, - 2.1053059101104736, - 2.1131062507629395, - 2.1209068298339844, - 2.12870717048645, - 2.136507749557495, - 2.144308090209961, - 2.151012420654297, - 2.1547579765319824, - 2.158503532409668, - 2.1622490882873535, - 2.165994644165039, - 2.1697402000427246, - 2.17348575592041, - 2.1772313117980957, - 2.1809771060943604, - 2.184722423553467, - 2.1884679794311523, - 2.192213535308838, - 2.1959590911865234, - 2.199704647064209, - 2.2034502029418945, - 2.207195997238159, - 2.2109413146972656, - 2.214686870574951, - 2.218432664871216, - 2.2221782207489014, - 2.225923538208008, - 2.2296690940856934, - 2.233414888381958, - 2.2371604442596436, - 2.24090576171875, - 2.2446515560150146, - 2.2483971118927, - 2.2521424293518066, - 2.2558882236480713, - 2.259633779525757, - 2.2633793354034424, - 2.267124891281128, - 2.2708704471588135, - 2.274616003036499, - 2.2783615589141846, - 2.28210711479187, - 2.2858526706695557, - 2.289598226547241, - 2.2933437824249268, - 2.2970893383026123, - 2.300590991973877, - 2.3032426834106445, - 2.305894374847412, - 2.3085460662841797, - 2.3111977577209473, - 2.313849449157715, - 2.3165011405944824, - 2.31915283203125, - 2.3218045234680176, - 2.324456214904785, - 2.3271079063415527, - 2.3297595977783203, - 2.332411289215088, - 2.3350629806518555, - 2.337714672088623, - 2.3403663635253906, - 2.343018054962158, - 2.3456695079803467, - 2.3483211994171143, - 2.350973129272461, - 2.3536248207092285, - 2.356276273727417, - 2.3589279651641846, - 2.361579656600952, - 2.3642313480377197, - 2.3668830394744873, - 2.369534730911255, - 2.3721864223480225, - 2.37483811378479, - 2.3774898052215576, - 2.380141496658325, - 2.3827931880950928, - 2.3854446411132812, - 2.388096570968628, - 2.3907480239868164, - 2.393399715423584, - 2.3960514068603516, - 2.398703098297119, - 2.4013547897338867, - 2.4040064811706543, - 2.406658172607422, - 2.4093098640441895, - 2.411961555480957, - 2.4146132469177246, - 2.417264938354492, - 2.4199166297912598, - 2.4225683212280273, - 2.425220012664795, - 2.4278717041015625, - 2.43052339553833, - 2.4331750869750977, - 2.4358267784118652, - 2.438478469848633, - 2.4411301612854004, - 2.443781852722168, - 2.4464335441589355, - 2.449085235595703, - 2.4514994621276855, - 2.4537887573242188, - 2.456077814102173, - 2.458367109298706, - 2.46065616607666, - 2.4629454612731934, - 2.4652347564697266, - 2.4675238132476807, - 2.469813108444214, - 2.472102165222168, - 2.474391460418701, - 2.4766807556152344, - 2.4789698123931885, - 2.4812591075897217, - 2.483548402786255, - 2.485837459564209, - 2.488126754760742, - 2.4904160499572754, - 2.4927051067352295, - 2.4949944019317627, - 2.497283458709717, - 2.49957275390625, - 2.501862049102783, - 2.5041511058807373, - 2.5064404010772705, - 2.5087296962738037, - 2.511018753051758, - 2.513308048248291, - 2.515597343444824, - 2.5178864002227783, - 2.5201756954193115, - 2.5224647521972656, - 2.524754047393799, - 2.527043342590332, - 2.529332399368286, - 2.5316216945648193, - 2.5339109897613525, - 2.5362000465393066, - 2.53848934173584, - 2.540778636932373, - 2.543067693710327, - 2.5453569889068604, - 2.5476460456848145, - 2.5499353408813477, - 2.552224636077881, - 2.554513692855835, - 2.556802988052368, - 2.5590920448303223, - 2.5613813400268555, - 2.5636706352233887, - 2.565959930419922, - 2.568248987197876, - 2.570538282394409, - 2.5728273391723633, - 2.5751166343688965, - 2.5774059295654297, - 2.579694986343384, - 2.581984281539917, - 2.58427357673645, - 2.5865626335144043, - 2.5888519287109375, - 2.5911412239074707, - 2.593430280685425, - 2.595719575881958, - 2.598008632659912, - 2.6002981662750244, - 2.6025896072387695, - 2.6048808097839355, - 2.6071720123291016, - 2.6094634532928467, - 2.611754894256592, - 2.6140458583831787, - 2.616337299346924, - 2.61862850189209, - 2.620919704437256, - 2.623211145401001, - 2.625502586364746, - 2.627793788909912, - 2.630084991455078, - 2.632376194000244, - 2.6346676349639893, - 2.6369590759277344, - 2.6392502784729004, - 2.6415414810180664, - 2.6438326835632324, - 2.6461238861083984, - 2.6484153270721436, - 2.6507067680358887, - 2.6529979705810547, - 2.6552891731262207, - 2.6575803756713867, - 2.659871816635132, - 2.662163257598877, - 2.664454460144043, - 2.666745662689209, - 2.669036865234375, - 2.671328067779541, - 2.673619508743286, - 2.6759109497070312, - 2.6782021522521973, - 2.6804933547973633, - 2.6827845573425293, - 2.6850759983062744, - 2.6873672008514404, - 2.6896584033966064, - 2.6919498443603516, - 2.6942410469055176, - 2.6965322494506836, - 2.6988236904144287, - 2.701115131378174, - 2.70340633392334, - 2.705697536468506, - 2.707988739013672, - 2.710280179977417, - 2.712571620941162, - 2.714862823486328, - 2.717154026031494, - 2.71944522857666, - 2.721736431121826, - 2.724027633666992, - 2.7263193130493164, - 2.7286105155944824, - 2.7309017181396484, - 2.7331929206848145, - 2.7354843616485596, - 2.7377758026123047, - 2.7400670051574707, - 2.7423582077026367, - 2.7446494102478027, - 2.7469406127929688, - 2.749232053756714, - 2.751746654510498, - 2.754373788833618, - 2.7570009231567383, - 2.7596282958984375, - 2.7622551918029785, - 2.7648825645446777, - 2.767509698867798, - 2.770136833190918, - 2.772764205932617, - 2.7753913402557373, - 2.7780184745788574, - 2.7806458473205566, - 2.7832727432250977, - 2.785900115966797, - 2.788527488708496, - 2.791154384613037, - 2.7937817573547363, - 2.7964086532592773, - 2.7990360260009766, - 2.8016631603240967, - 2.804290294647217, - 2.806917667388916, - 2.8095450401306152, - 2.8121719360351562, - 2.8147993087768555, - 2.8174264430999756, - 2.8200535774230957, - 2.822680950164795, - 2.825307846069336, - 2.827935218811035, - 2.8305623531341553, - 2.8331894874572754, - 2.8358168601989746, - 2.8384439945220947, - 2.841071128845215, - 2.843698501586914, - 2.846325397491455, - 2.8489527702331543, - 2.8515799045562744, - 2.8542070388793945, - 2.8568344116210938, - 2.8594613075256348, - 2.862088680267334, - 2.864715814590454, - 2.867342948913574, - 2.8699703216552734, - 2.8725974559783936, - 2.8752245903015137, - 2.877851963043213, - 2.880478858947754, - 2.883106231689453, - 2.8857333660125732, - 2.8883605003356934, - 2.8909878730773926, - 2.8936147689819336, - 2.896242141723633, - 2.898869037628174, - 2.901982307434082, - 2.9054622650146484, - 2.908942222595215, - 2.9124221801757812, - 2.9159021377563477, - 2.919382095336914, - 2.9228615760803223, - 2.9263415336608887, - 2.929821491241455, - 2.9333014488220215, - 2.936781406402588, - 2.9402613639831543, - 2.9437413215637207, - 2.947221279144287, - 2.9507012367248535, - 2.95418119430542, - 2.9576611518859863, - 2.9611411094665527, - 2.964621067047119, - 2.9681007862091064, - 2.971580743789673, - 2.9750607013702393, - 2.9785404205322266, - 2.982020378112793, - 2.9855003356933594, - 2.988980293273926, - 2.992460250854492, - 2.9959402084350586, - 2.999420166015625, - 3.0029001235961914, - 3.006380081176758, - 3.009860038757324, - 3.0133399963378906, - 3.016819953918457, - 3.0202996730804443, - 3.02377986907959, - 3.027259588241577, - 3.0307395458221436, - 3.034219264984131, - 3.0376992225646973, - 3.0411791801452637, - 3.04465913772583, - 3.0481390953063965, - 3.0525364875793457, - 3.057988405227661, - 3.0634403228759766, - 3.068892002105713, - 3.0743441581726074, - 3.0797958374023438, - 3.08524751663208, - 3.0906996726989746, - 3.096151351928711, - 3.1016035079956055, - 3.107055187225342, - 3.1125071048736572, - 3.1179590225219727, - 3.123410940170288, - 3.1288628578186035, - 3.134314775466919, - 3.1397666931152344, - 3.14521861076355, - 3.1506705284118652, - 3.1561222076416016, - 3.161573886871338, - 3.1670260429382324, - 3.1724777221679688, - 3.1779298782348633, - 3.1833815574645996, - 3.188833713531494, - 3.1942853927612305, - 3.199737071990967, - 3.209711790084839, - 3.2199153900146484, - 3.230119228363037, - 3.2403225898742676, - 3.2505264282226562, - 3.260730028152466, - 3.2709336280822754, - 3.281137228012085, - 3.2913408279418945, - 3.3015449047088623, - 3.311748504638672, - 3.3219521045684814, - 3.332155704498291, - 3.3423593044281006, - 3.3545167446136475, - 3.3724982738494873, - 3.3904805183410645, - 3.4084625244140625, - 3.4264445304870605, - 3.4444267749786377, - 3.462409019470215, - 3.480390787124634, - 3.498373031616211, - 3.512968063354492, - 3.5272269248962402, - 3.54148530960083, - 3.555744171142578, - 3.570002555847168, - 3.584261417388916, - 3.598519802093506, - 3.612778663635254, - 3.6270365715026855, - 3.6412954330444336, - 3.6527533531188965, - 3.6598219871520996, - 3.6668906211853027, - 3.6739590167999268, - 3.681027889251709, - 3.688096523284912, - 3.695164680480957, - 3.70223331451416, - 3.7093024253845215, - 3.7163705825805664, - 3.7234394550323486, - 3.7305080890655518, - 3.737576484680176, - 3.744645118713379, - 3.751713514328003, - 3.758782386779785, - 3.76585054397583, - 3.7729194164276123, - 3.7799880504608154, - 3.7870564460754395, - 3.7941250801086426, - 3.8006608486175537, - 3.8045742511749268, - 3.8084874153137207, - 3.8124008178710938, - 3.816314220428467, - 3.8202273845672607, - 3.824141025543213, - 3.828054189682007, - 3.831967353820801, - 3.835880756378174, - 3.8397939205169678, - 3.843707323074341, - 3.8476204872131348, - 3.851533889770508, - 3.855447292327881, - 3.859360456466675, - 3.863274097442627, - 3.867187023162842, - 3.871100425720215, - 3.875014066696167, - 3.878927230834961, - 3.882840633392334, - 3.886753797531128, - 3.890666961669922, - 3.894580602645874, - 3.898493528366089, - 3.902407169342041, - 3.906320333480835, - 3.910233497619629, - 3.914147138595581, - 3.918060302734375, - 3.921973705291748, - 3.925887107849121, - 3.929800033569336, - 3.933713674545288, - 3.937626838684082, - 3.941540241241455, - 3.945453643798828, - 3.949366807937622, - 3.952162265777588, - 3.954742193222046, - 3.9573216438293457, - 3.9599015712738037, - 3.9624814987182617, - 3.9650611877441406, - 3.9676411151885986, - 3.9702205657958984, - 3.9728004932403564, - 3.9753804206848145, - 3.9779598712921143, - 3.9805397987365723, - 3.983119487762451, - 3.985699415206909, - 3.988279342651367, - 3.990858793258667, - 3.993438720703125, - 3.996018409729004, - 3.998598098754883, - 4.001177787780762, - 4.003757476806641, - 4.0063371658325195, - 4.008917331695557, - 4.0114970207214355, - 4.014077186584473, - 4.016656398773193, - 4.0192365646362305, - 4.021816253662109, - 4.024395942687988, - 4.026975631713867, - 4.029555320739746, - 4.032135009765625, - 4.034715175628662, - 4.037294387817383, - 4.039874076843262, - 4.042454242706299, - 4.045034408569336, - 4.047614097595215, - 4.050193786621094, - 4.052773475646973, - 4.055353164672852, - 4.0579328536987305, - 4.060512542724609, - 4.063092231750488, - 4.065672397613525, - 4.068252086639404, - 4.070831775665283, - 4.07341194152832, - 4.075991153717041, - 4.078571319580078, - 4.081151008605957, - 4.083730697631836, - 4.086310386657715, - 4.088890075683594, - 4.091469764709473, - 4.09404993057251, - 4.096629619598389, - 4.099209308624268, - 4.1013641357421875, - 4.103331089019775, - 4.105298042297363, - 4.107264995574951, - 4.109231948852539, - 4.111199378967285, - 4.113166332244873, - 4.115133285522461, - 4.117100715637207, - 4.119067668914795, - 4.121034622192383, - 4.123002052307129, - 4.124969005584717, - 4.126935958862305, - 4.128902912139893, - 4.1308698654174805, - 4.132836818695068, - 4.134803771972656, - 4.136771202087402, - 4.138737678527832, - 4.140705108642578, - 4.142672061920166, - 4.144639015197754, - 4.1466064453125, - 4.148573398590088, - 4.150540351867676, - 4.152507781982422, - 4.15447473526001, - 4.156441688537598, - 4.1584086418151855, - 4.160375595092773, - 4.162342548370361, - 4.164309501647949, - 4.166276931762695, - 4.168243885040283, - 4.170210838317871, - 4.172178268432617, - 4.174145221710205, - 4.176112174987793, - 4.178079605102539, - 4.180046558380127, - 4.182013511657715, - 4.183980464935303, - 4.185947418212891, - 4.1879143714904785, - 4.189881324768066, - 4.191848278045654, - 4.193815231323242, - 4.195782661437988, - 4.197749614715576, - 4.199716567993164, - 4.20168399810791, - 4.203650951385498, - 4.205617904663086, - 4.207585334777832, - 4.209551811218262, - 4.211519241333008, - 4.213486194610596, - 4.215453147888184, - 4.2174201011657715, - 4.219387054443359, - 4.2213544845581055, - 4.223321437835693, - 4.225288391113281, - 4.227255821228027, - 4.229222297668457, - 4.231189727783203, - 4.233156681060791, - 4.235123634338379, - 4.237091064453125, - 4.239058017730713, - 4.241024971008301, - 4.242991924285889, - 4.244958877563477, - 4.2469258308410645, - 4.248892784118652, - 4.250740051269531, - 4.252432823181152, - 4.254125595092773, - 4.2558183670043945, - 4.257511138916016, - 4.259203910827637, - 4.2608962059021, - 4.262588977813721, - 4.2642822265625, - 4.265974521636963, - 4.267666816711426, - 4.269359588623047, - 4.271052837371826, - 4.272745132446289, - 4.27443790435791, - 4.276130676269531, - 4.277823448181152, - 4.279515743255615, - 4.2812089920043945, - 4.282901763916016, - 4.2845940589904785, - 4.286286354064941, - 4.287979602813721, - 4.289672374725342, - 4.291364669799805, - 4.293057441711426, - 4.294750213623047, - 4.296442985534668, - 4.298135757446289, - 4.29982852935791, - 4.301521301269531, - 4.303213596343994, - 4.304906368255615, - 4.306599140167236, - 4.308291912078857, - 4.30998420715332, - 4.3116774559021, - 4.313370227813721, - 4.315062522888184, - 4.316755294799805, - 4.318448066711426, - 4.320140838623047, - 4.321833610534668, - 4.323526382446289, - 4.32521915435791, - 4.326911449432373, - 4.328604221343994, - 4.330296993255615, - 4.331989765167236, - 4.333682060241699, - 4.33537483215332, - 4.337067604064941, - 4.3387603759765625, - 4.340453147888184, - 4.342145919799805, - 4.343838691711426, - 4.345530986785889, - 4.34722375869751, - 4.348916530609131, - 4.350609302520752, - 4.352301597595215, - 4.353994369506836, - 4.355687141418457, - 4.357379913330078, - 4.359072685241699, - 4.36076545715332, - 4.362458229064941, - 4.3641510009765625, - 4.365843772888184, - 4.367536544799805, - 4.369228839874268, - 4.370921611785889, - 4.37261438369751, - 4.374307155609131, - 4.375999450683594, - 4.377692222595215, - 4.379384994506836, - 4.381077766418457, - 4.382770538330078, - 4.384463310241699, - 4.38615608215332, - 4.387848377227783, - 4.389541149139404, - 4.391233921051025, - 4.3929266929626465, - 4.394618988037109, - 4.3963117599487305, - 4.398004531860352, - 4.399697303771973, - 4.401331424713135, - 4.402953147888184, - 4.404574871063232, - 4.406196117401123, - 4.407817363739014, - 4.409439563751221, - 4.411060810089111, - 4.41268253326416, - 4.414303779602051, - 4.4159255027771, - 4.41754674911499, - 4.419168472290039, - 4.42078971862793, - 4.4224114418029785, - 4.424032688140869, - 4.425654411315918, - 4.427275657653809, - 4.428897380828857, - 4.430518627166748, - 4.432140350341797, - 4.4337615966796875, - 4.435382843017578, - 4.437005043029785, - 4.438626289367676, - 4.440247535705566, - 4.441868782043457, - 4.443490982055664, - 4.445112228393555, - 4.446733474731445, - 4.448355197906494, - 4.449976444244385, - 4.451598167419434, - 4.453219413757324, - 4.454841136932373, - 4.456462383270264, - 4.4580841064453125, - 4.459705352783203, - 4.461327075958252, - 4.462948322296143, - 4.464570045471191, - 4.466191291809082, - 4.467813014984131, - 4.4694342613220215, - 4.4710564613342285, - 4.472677707672119, - 4.47429895401001, - 4.475920677185059, - 4.477542400360107, - 4.479163646697998, - 4.480784893035889, - 4.4824066162109375, - 4.484028339385986, - 4.485649585723877, - 4.487271308898926, - 4.488893032073975, - 4.490514278411865, - 4.492136001586914, - 4.493757247924805, - 4.4953789710998535, - 4.497000217437744, - 4.498621940612793, - 4.500243186950684, - 4.501864910125732, - 4.503486156463623, - 4.505107879638672, - 4.5067291259765625, - 4.508350849151611, - 4.50997257232666, - 4.511593818664551, - 4.513215065002441, - 4.514836311340332, - 4.516458511352539, - 4.51807975769043, - 4.51970100402832, - 4.521322250366211, - 4.52294397354126, - 4.524565696716309, - 4.526186943054199, - 4.52780818939209, - 4.529430389404297, - 4.5310516357421875, - 4.532672882080078, - 4.534294605255127, - 4.535915851593018, - 4.537537574768066, - 4.539158821105957, - 4.540780544281006, - 4.5424017906188965, - 4.544023513793945, - 4.545645236968994, - 4.547266483306885, - 4.548888206481934, - 4.550540924072266, - 4.5522613525390625, - 4.553980827331543, - 4.55570125579834, - 4.557421684265137, - 4.559141635894775, - 4.560862064361572, - 4.562582015991211, - 4.564302444458008, - 4.5660223960876465, - 4.567742824554443, - 4.56946325302124, - 4.571183681488037, - 4.572904109954834, - 4.574624061584473, - 4.5763444900512695, - 4.578064441680908, - 4.579784393310547, - 4.581504821777344, - 4.583225250244141, - 4.5849456787109375, - 4.586665630340576, - 4.588385581970215, - 4.590106010437012, - 4.59182596206665, - 4.593546390533447, - 4.595266819000244, - 4.596987247467041, - 4.59870719909668, - 4.600427627563477, - 4.602148056030273, - 4.60386848449707, - 4.605587959289551, - 4.607308387756348, - 4.6090288162231445, - 4.610749244689941, - 4.612468719482422, - 4.614189147949219, - 4.615909576416016, - 4.617629528045654, - 4.619349956512451, - 4.621070384979248, - 4.622790813446045, - 4.624510765075684, - 4.626230716705322, - 4.627951622009277, - 4.629671573638916, - 4.631391525268555, - 4.633111953735352, - 4.634832382202148, - 4.636552810668945, - 4.638272762298584, - 4.639992713928223, - 4.6417131423950195, - 4.643433094024658, - 4.645153522491455, - 4.646873950958252, - 4.648594379425049, - 4.6503143310546875, - 4.652034282684326, - 4.653754711151123, - 4.65547513961792, - 4.657195568084717, - 4.6589155197143555, - 4.660635948181152, - 4.662356376647949, - 4.66407585144043, - 4.665796279907227, - 4.667516708374023, - 4.669236660003662, - 4.670957088470459, - 4.672677516937256, - 4.674397945404053, - 4.676117897033691, - 4.67783784866333, - 4.679558277130127, - 4.681278705596924, - 4.682999134063721, - 4.684719085693359, - 4.686439514160156, - 4.688159465789795, - 4.689879417419434, - 4.6915998458862305, - 4.693320274353027, - 4.695040702819824, - 4.696760654449463, - 4.698480606079102, - 4.7002363204956055, - 4.702260494232178, - 4.704284191131592, - 4.706308364868164, - 4.708332538604736, - 4.710355758666992, - 4.712380409240723, - 4.7144036293029785, - 4.716427803039551, - 4.718451976776123, - 4.720475196838379, - 4.722499370574951, - 4.724523067474365, - 4.7265472412109375, - 4.72857141494751, - 4.730594635009766, - 4.732619285583496, - 4.734642505645752, - 4.736666679382324, - 4.7386908531188965, - 4.740714073181152, - 4.742738246917725, - 4.744761943817139, - 4.746786117553711, - 4.748810291290283, - 4.750833511352539, - 4.7528581619262695, - 4.754881381988525, - 4.756905555725098, - 4.75892972946167, - 4.760953426361084, - 4.762977600097656, - 4.76500129699707, - 4.767024993896484, - 4.769049167633057, - 4.7710723876953125, - 4.773097038269043, - 4.775120258331299, - 4.777144432067871, - 4.779168605804443, - 4.781191825866699, - 4.78321647644043, - 4.7852396965026855, - 4.787263870239258, - 4.78928804397583, - 4.791311264038086, - 4.793335914611816, - 4.795359134674072, - 4.7973833084106445, - 4.799407482147217, - 4.801431179046631, - 4.803455352783203, - 4.805479049682617, - 4.807502746582031, - 4.8095269203186035, - 4.811550617218018, - 4.81357479095459, - 4.815598487854004, - 4.817622184753418, - 4.81964635848999, - 4.821669578552246, - 4.823694229125977, - 4.825717449188232, - 4.827741622924805, - 4.829765796661377, - 4.831789016723633, - 4.833813667297363, - 4.835836887359619, - 4.837861061096191, - 4.839885234832764, - 4.841908931732178, - 4.84393310546875, - 4.845956802368164, - 4.847980499267578, - 4.850006103515625, - 4.852660655975342, - 4.855315208435059, - 4.857970237731934, - 4.86062479019165, - 4.863279819488525, - 4.8659348487854, - 4.868589401245117, - 4.871243953704834, - 4.873898506164551, - 4.876553535461426, - 4.879208087921143, - 4.881862640380859, - 4.884518146514893, - 4.887172698974609, - 4.889827728271484, - 4.892482280731201, - 4.895136833190918, - 4.897791862487793, - 4.90044641494751, - 4.903100967407227, - 4.905755996704102, - 4.908410549163818, - 4.911065101623535, - 4.91372013092041, - 4.916375160217285, - 4.919029712677002, - 4.921684265136719, - 4.924339294433594, - 4.9269938468933105, - 4.929648399353027, - 4.932303428649902, - 4.934958457946777, - 4.937613010406494, - 4.940267562866211, - 4.942922592163086, - 4.945577144622803, - 4.948232173919678, - 4.950887203216553, - 4.9535417556762695, - 4.9561967849731445, - 4.958850860595703, - 4.961505889892578, - 4.964160442352295, - 4.96681547164917, - 4.969470500946045, - 4.972125053405762, - 4.974780082702637, - 4.9774346351623535, - 4.9800896644592285, - 4.982744216918945, - 4.98539924621582, - 4.988053321838379, - 4.990708351135254, - 4.993362903594971, - 4.996017932891846 - ], - "xaxis": "x2", - "yaxis": "y2" - } - ], - "layout": { - "annotations": [ - { - "font": { - "size": 16 - }, - "showarrow": false, - "text": "PDF", - "x": 0.225, - "xanchor": "center", - "xref": "paper", - "y": 1, - "yanchor": "bottom", - "yref": "paper" - }, - { - "font": { - "size": 16 - }, - "showarrow": false, - "text": "Samples", - "x": 0.775, - "xanchor": "center", - "xref": "paper", - "y": 1, - "yanchor": "bottom", - "yref": "paper" - } - ], - "height": 400, - "hovermode": false, - "margin": { - "b": 20, - "l": 20, - "r": 20, - "t": 50 - }, - "showlegend": false, - "template": { - "data": { - "bar": [ - { - "error_x": { - "color": "#2a3f5f" - }, - "error_y": { - "color": "#2a3f5f" - }, - "marker": { - "line": { - "color": "#E5ECF6", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "bar" - } - ], - "barpolar": [ - { - "marker": { - "line": { - "color": "#E5ECF6", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "barpolar" - } - ], - "carpet": [ - { - "aaxis": { - "endlinecolor": "#2a3f5f", - "gridcolor": "white", - "linecolor": "white", - "minorgridcolor": "white", - "startlinecolor": "#2a3f5f" - }, - "baxis": { - "endlinecolor": "#2a3f5f", - "gridcolor": "white", - "linecolor": "white", - "minorgridcolor": "white", - "startlinecolor": "#2a3f5f" - }, - "type": "carpet" - } - ], - "choropleth": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "type": "choropleth" - } - ], - "contour": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "contour" - } - ], - "contourcarpet": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "type": "contourcarpet" - } - ], - "heatmap": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "heatmap" - } - ], - "heatmapgl": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "heatmapgl" - } - ], - "histogram": [ - { - "marker": { - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "histogram" - } - ], - "histogram2d": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "histogram2d" - } - ], - "histogram2dcontour": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "histogram2dcontour" - } - ], - "mesh3d": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "type": "mesh3d" - } - ], - "parcoords": [ - { - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "parcoords" - } - ], - "pie": [ - { - "automargin": true, - "type": "pie" - } - ], - "scatter": [ - { - "fillpattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - }, - "type": "scatter" - } - ], - "scatter3d": [ - { - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatter3d" - } - ], - "scattercarpet": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scattercarpet" - } - ], - "scattergeo": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scattergeo" - } - ], - "scattergl": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scattergl" - } - ], - "scattermapbox": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scattermapbox" - } - ], - "scatterpolar": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatterpolar" - } - ], - "scatterpolargl": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatterpolargl" - } - ], - "scatterternary": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatterternary" - } - ], - "surface": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "surface" - } - ], - "table": [ - { - "cells": { - "fill": { - "color": "#EBF0F8" - }, - "line": { - "color": "white" - } - }, - "header": { - "fill": { - "color": "#C8D4E3" - }, - "line": { - "color": "white" - } - }, - "type": "table" - } - ] - }, - "layout": { - "annotationdefaults": { - "arrowcolor": "#2a3f5f", - "arrowhead": 0, - "arrowwidth": 1 - }, - "autotypenumbers": "strict", - "coloraxis": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "colorscale": { - "diverging": [ - [ - 0, - "#8e0152" - ], - [ - 0.1, - "#c51b7d" - ], - [ - 0.2, - "#de77ae" - ], - [ - 0.3, - "#f1b6da" - ], - [ - 0.4, - "#fde0ef" - ], - [ - 0.5, - "#f7f7f7" - ], - [ - 0.6, - "#e6f5d0" - ], - [ - 0.7, - "#b8e186" - ], - [ - 0.8, - "#7fbc41" - ], - [ - 0.9, - "#4d9221" - ], - [ - 1, - "#276419" - ] - ], - "sequential": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "sequentialminus": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ] - }, - "colorway": [ - "#636efa", - "#EF553B", - "#00cc96", - "#ab63fa", - "#FFA15A", - "#19d3f3", - "#FF6692", - "#B6E880", - "#FF97FF", - "#FECB52" - ], - "font": { - "color": "#2a3f5f" - }, - "geo": { - "bgcolor": "white", - "lakecolor": "white", - "landcolor": "#E5ECF6", - "showlakes": true, - "showland": true, - "subunitcolor": "white" - }, - "hoverlabel": { - "align": "left" - }, - "hovermode": "closest", - "mapbox": { - "style": "light" - }, - "paper_bgcolor": "white", - "plot_bgcolor": "#E5ECF6", - "polar": { - "angularaxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - }, - "bgcolor": "#E5ECF6", - "radialaxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - } - }, - "scene": { - "xaxis": { - "backgroundcolor": "#E5ECF6", - "gridcolor": "white", - "gridwidth": 2, - "linecolor": "white", - "showbackground": true, - "ticks": "", - "zerolinecolor": "white" - }, - "yaxis": { - "backgroundcolor": "#E5ECF6", - "gridcolor": "white", - "gridwidth": 2, - "linecolor": "white", - "showbackground": true, - "ticks": "", - "zerolinecolor": "white" - }, - "zaxis": { - "backgroundcolor": "#E5ECF6", - "gridcolor": "white", - "gridwidth": 2, - "linecolor": "white", - "showbackground": true, - "ticks": "", - "zerolinecolor": "white" - } - }, - "shapedefaults": { - "line": { - "color": "#2a3f5f" - } - }, - "ternary": { - "aaxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - }, - "baxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - }, - "bgcolor": "#E5ECF6", - "caxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - } - }, - "title": { - "x": 0.05 - }, - "xaxis": { - "automargin": true, - "gridcolor": "white", - "linecolor": "white", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "white", - "zerolinewidth": 2 - }, - "yaxis": { - "automargin": true, - "gridcolor": "white", - "linecolor": "white", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "white", - "zerolinewidth": 2 - } - } - }, - "xaxis": { - "anchor": "y", - "domain": [ - 0, - 0.45 - ], - "title": { - "text": "Distance" - } - }, - "xaxis2": { - "anchor": "y2", - "domain": [ - 0.55, - 1 - ], - "title": { - "text": "Distance" - } - }, - "yaxis": { - "anchor": "x", - "domain": [ - 0, - 1 - ] - }, - "yaxis2": { - "anchor": "x2", - "domain": [ - 0, - 1 - ], - "title": { - "text": "# Samples" - } - } - } - }, - "text/html": [ - "
" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "# COLLAPSED\n", - "import torch\n", - "from nerfstudio.cameras.rays import RayBundle\n", - "from nerfstudio.model_components import ray_sampler\n", - "import plotly.graph_objects as go\n", - "from plotly.subplots import make_subplots\n", - "\n", - "num_coarse_samples = 20\n", - "num_samples = 1000\n", - "near = 2\n", - "far = 5\n", - "train_stratified = False\n", - "\n", - "fig = make_subplots(\n", - " rows=1,\n", - " cols=2,\n", - " subplot_titles=(\"PDF\", \"Samples\"),\n", - ")\n", - "\n", - "uniform_sampler = ray_sampler.UniformSampler(num_samples=num_coarse_samples, train_stratified=train_stratified)\n", - "pdf_sampler = ray_sampler.PDFSampler(num_samples=num_samples, train_stratified=train_stratified, include_original=False)\n", - "\n", - "ray_bundle = RayBundle(\n", - " origins=torch.ones([1, 3]),\n", - " directions=torch.ones([1, 3]),\n", - " pixel_area=torch.ones([1, 1]),\n", - " nears=torch.ones([1, 1]) * near,\n", - " fars=torch.ones([1, 1]) * far,\n", - ")\n", - "\n", - "coarse_ray_samples = uniform_sampler(ray_bundle)\n", - "\n", - "# Generate arbitrary PDF\n", - "weights = torch.ones(num_coarse_samples)\n", - "weights += torch.sin(torch.linspace(0, 3 * torch.pi, num_coarse_samples))\n", - "weights += torch.sin(torch.linspace(0, 0.5 * torch.pi, num_coarse_samples))\n", - "weights -= torch.min(weights)\n", - "weights /= torch.sum(weights)\n", - "\n", - "samples = pdf_sampler.generate_ray_samples(ray_bundle, coarse_ray_samples, weights[None, :, None], num_samples)\n", - "\n", - "# Plotting stuff\n", - "x = torch.ones((num_coarse_samples * 2))\n", - "x[::2] = coarse_ray_samples.frustums.starts[0, :, 0]\n", - "x[1::2] = coarse_ray_samples.frustums.ends[0, :, 0]\n", - "\n", - "y = torch.ones((num_coarse_samples * 2))\n", - "y[::2] = weights\n", - "y[1::2] = weights\n", - "\n", - "pdf_trace = go.Scatter(x=x, y=y)\n", - "fig.append_trace(pdf_trace, 1, 1)\n", - "\n", - "samples_trace = go.Histogram(x=samples.frustums.starts[0, :, 0], nbinsx=100)\n", - "fig.append_trace(samples_trace, 1, 2)\n", - "\n", - "fig.update_yaxes(title_text=\"# Samples\", row=1, col=2)\n", - "fig.update_xaxes(title_text=\"Distance\", row=1, col=1)\n", - "fig.update_xaxes(title_text=\"Distance\", row=1, col=2)\n", - "\n", - "# Overlay both histograms\n", - "fig.update_layout(height=400, hovermode=False, showlegend=False, margin=dict(l=20, r=20, t=50, b=20))\n", - "fig.update_traces(opacity=0.7)\n", - "fig.show()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.7" - }, - "vscode": { - "interpreter": { - "hash": "916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1" - } - } + "cells": [ + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Ray Samplers\n", + "\n", + "## Overview\n", + "\n", + "Once we have a set of cameras, we want to cast camera rays associated with each pixel. \n", + "\n", + "Along these ray we will sample the _field_ and aggregate the samples to predict the pixels value (ie. color). The parameterization of the samples are described [here](./visualize_samples.ipynb) however we must decide where to place these samples along a ray. For this task we will use a [`Sampler`](../../reference/api/model_components/ray_sampler.rst).\n", + "\n", + "In the ideal world we would compute many dense samples along a ray. Unfortunately, each additional sample adds a computation cost to the system as it needs to be processed by the _field_ which is often a neural network.\n", + "\n", + "As a result it is common for NeRF methods to use on the order of 100 samples. Therefore, we want to optimize where those samples are placed in the scene.\n", + "\n", + "For example, if the scene can be bounded by a box and the objects are all similar scales, uniform sampling along the ray may be a good option. On the other hand if the scene is unbounded (potential extending as far as the eye can see) uniform sampling does not make sense as the samples would be very sparse for close objects. In this case a different sampling like _Uniform in Disparity_ may perform better.\n", + "\n", + "```{image} imgs/samplers_type-light.png\n", + ":align: center\n", + ":class: only-light\n", + "```\n", + "\n", + "```{image} imgs/samplers_type-dark.png\n", + ":align: center\n", + ":class: only-dark\n", + "```\n", + "\n", + "### Stratified Sampling\n", + "\n", + "Most samplers has the option to _stratify_ the samplers. When stratified, each sample is randomly perturbed. \n", + "\n", + "The magnitude of the pertubation is such that the sample ordering remains consistent and the overall distribution statistics are not changed. Using stratified samples during training generally improves the reconstructions as it help prevent overfitting.\n", + "\n", + "During inference stratified sampling should be disabled (nerfstudio samplers will do this) as it can cause noisy artifacts when the camera moves.\n", + "\n", + "```{image} imgs/samplers_stratified-light.png\n", + ":align: center\n", + ":class: only-light\n", + "```\n", + "\n", + "```{image} imgs/samplers_stratified-dark.png\n", + ":align: center\n", + ":class: only-dark\n", + "```\n", + "\n", + "### Hierarchical Sampling\n", + "\n", + "It is important to sample the scene where it has content otherwise the reconstruction quality will be reduced. \n", + "\n", + "One trick that is often employed in NeRF methods is to do multiple round of sampling. The first round can use a predefined sampler (ie. Uniform) to generate an image. Once the space is sampled, we have an idea which samples contributed to the final color. \n", + "\n", + "We can use this information to sample more around those regions using a `PDFSampler`. The PDF sampler is described more below." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Spaced Samplers\n", + "\n", + "These are the most basic samplers that spaces samples based on a predefined function. These samplers have all have a starting and ending distance (also known as a near/far plane). The plots below are histograms of points sampled from some predefined samplers. \n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "tags": [ + "hide-input" + ] + }, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "3e6b9d9b42cb4dc89f40a570007d00ec", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Output()" + ] + }, + "metadata": {}, + "output_type": "display_data" }, - "nbformat": 4, - "nbformat_minor": 2 + { + "data": { + "text/html": [ + "
\n"
+      ],
+      "text/plain": []
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    },
+    {
+     "data": {
+      "text/html": [
+       "        \n",
+       "        "
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    },
+    {
+     "data": {
+      "application/vnd.plotly.v1+json": {
+       "config": {
+        "plotlyServerURL": "https://plot.ly"
+       },
+       "data": [
+        {
+         "nbinsx": 50,
+         "opacity": 0.7,
+         "type": "histogram",
+         "x": [
+          2,
+          2.003000020980835,
+          2.00600004196167,
+          2.009000062942505,
+          2.01200008392334,
+          2.015000104904175,
+          2.0180001258850098,
+          2.0209999084472656,
+          2.0239999294281006,
+          2.0269999504089355,
+          2.0299999713897705,
+          2.0329999923706055,
+          2.0360000133514404,
+          2.0390000343322754,
+          2.0420000553131104,
+          2.0450000762939453,
+          2.0480000972747803,
+          2.050999879837036,
+          2.053999900817871,
+          2.056999921798706,
+          2.059999942779541,
+          2.062999963760376,
+          2.065999984741211,
+          2.069000005722046,
+          2.072000026702881,
+          2.075000047683716,
+          2.078000068664551,
+          2.0810000896453857,
+          2.0840001106262207,
+          2.0870001316070557,
+          2.0900001525878906,
+          2.0929999351501465,
+          2.0959999561309814,
+          2.0989999771118164,
+          2.1019999980926514,
+          2.1050000190734863,
+          2.1080000400543213,
+          2.1110000610351562,
+          2.114000082015991,
+          2.117000102996826,
+          2.119999885559082,
+          2.122999906539917,
+          2.125999927520752,
+          2.128999948501587,
+          2.131999969482422,
+          2.134999990463257,
+          2.138000011444092,
+          2.1410000324249268,
+          2.1440000534057617,
+          2.1469998359680176,
+          2.1500000953674316,
+          2.1529998779296875,
+          2.1560001373291016,
+          2.1589999198913574,
+          2.1619999408721924,
+          2.1649999618530273,
+          2.1679999828338623,
+          2.1710000038146973,
+          2.1740000247955322,
+          2.177000045776367,
+          2.180000066757202,
+          2.183000087738037,
+          2.186000108718872,
+          2.188999891281128,
+          2.191999912261963,
+          2.194999933242798,
+          2.197999954223633,
+          2.2009999752044678,
+          2.2039999961853027,
+          2.2070000171661377,
+          2.2100000381469727,
+          2.2130000591278076,
+          2.2160000801086426,
+          2.2190001010894775,
+          2.2220001220703125,
+          2.2249999046325684,
+          2.2280001640319824,
+          2.2309999465942383,
+          2.2339999675750732,
+          2.236999988555908,
+          2.240000009536743,
+          2.243000030517578,
+          2.246000051498413,
+          2.249000072479248,
+          2.252000093460083,
+          2.254999876022339,
+          2.257999897003174,
+          2.260999917984009,
+          2.2639999389648438,
+          2.267000198364258,
+          2.2699999809265137,
+          2.2730000019073486,
+          2.2760000228881836,
+          2.2790000438690186,
+          2.2820000648498535,
+          2.2849998474121094,
+          2.2880001068115234,
+          2.2909998893737793,
+          2.2939999103546143,
+          2.296999931335449,
+          2.299999952316284,
+          2.302999973297119,
+          2.305999994277954,
+          2.309000015258789,
+          2.312000036239624,
+          2.315000057220459,
+          2.317999839782715,
+          2.321000099182129,
+          2.324000120162964,
+          2.3269999027252197,
+          2.3299999237060547,
+          2.3329999446868896,
+          2.3359999656677246,
+          2.3389999866485596,
+          2.3420000076293945,
+          2.3450000286102295,
+          2.3480000495910645,
+          2.3510000705718994,
+          2.3540000915527344,
+          2.3569998741149902,
+          2.3600001335144043,
+          2.36299991607666,
+          2.366000175476074,
+          2.36899995803833,
+          2.371999979019165,
+          2.375,
+          2.378000020980835,
+          2.38100004196167,
+          2.384000062942505,
+          2.38700008392334,
+          2.390000104904175,
+          2.3930001258850098,
+          2.3959999084472656,
+          2.3989999294281006,
+          2.4019999504089355,
+          2.4049999713897705,
+          2.4079999923706055,
+          2.4110000133514404,
+          2.4140000343322754,
+          2.4170000553131104,
+          2.4200000762939453,
+          2.422999858856201,
+          2.4260001182556152,
+          2.428999900817871,
+          2.432000160217285,
+          2.434999942779541,
+          2.437999963760376,
+          2.440999984741211,
+          2.444000005722046,
+          2.447000026702881,
+          2.450000047683716,
+          2.453000068664551,
+          2.4560000896453857,
+          2.4590001106262207,
+          2.4619998931884766,
+          2.4650001525878906,
+          2.4679999351501465,
+          2.4709999561309814,
+          2.4739999771118164,
+          2.4769999980926514,
+          2.4800000190734863,
+          2.4830000400543213,
+          2.4860000610351562,
+          2.489000082015991,
+          2.492000102996826,
+          2.494999885559082,
+          2.498000144958496,
+          2.500999927520752,
+          2.504000186920166,
+          2.506999969482422,
+          2.509999990463257,
+          2.513000011444092,
+          2.5160000324249268,
+          2.5190000534057617,
+          2.5220000743865967,
+          2.5250000953674316,
+          2.5280001163482666,
+          2.5310001373291016,
+          2.5339999198913574,
+          2.5370001792907715,
+          2.5399999618530273,
+          2.5429999828338623,
+          2.5460000038146973,
+          2.5490000247955322,
+          2.552000045776367,
+          2.555000066757202,
+          2.558000087738037,
+          2.561000108718872,
+          2.564000129699707,
+          2.566999912261963,
+          2.570000171661377,
+          2.572999954223633,
+          2.5759999752044678,
+          2.5789999961853027,
+          2.5820000171661377,
+          2.5850000381469727,
+          2.5880000591278076,
+          2.5910000801086426,
+          2.5939998626708984,
+          2.5970001220703125,
+          2.5999999046325684,
+          2.6030001640319824,
+          2.6059999465942383,
+          2.6090002059936523,
+          2.611999988555908,
+          2.615000009536743,
+          2.618000030517578,
+          2.620999813079834,
+          2.624000072479248,
+          2.627000093460083,
+          2.630000114440918,
+          2.632999897003174,
+          2.635999917984009,
+          2.6389999389648438,
+          2.642000198364258,
+          2.6449999809265137,
+          2.6480000019073486,
+          2.6510000228881836,
+          2.6540000438690186,
+          2.6570000648498535,
+          2.6599998474121094,
+          2.6630001068115234,
+          2.6659998893737793,
+          2.6690001487731934,
+          2.671999931335449,
+          2.674999952316284,
+          2.677999973297119,
+          2.681000232696533,
+          2.684000015258789,
+          2.687000036239624,
+          2.690000057220459,
+          2.692999839782715,
+          2.696000099182129,
+          2.6989998817443848,
+          2.702000141143799,
+          2.7049999237060547,
+          2.7080001831054688,
+          2.7109999656677246,
+          2.7139999866485596,
+          2.7170000076293945,
+          2.7200000286102295,
+          2.7230000495910645,
+          2.7260000705718994,
+          2.7290000915527344,
+          2.7319998741149902,
+          2.7350001335144043,
+          2.73799991607666,
+          2.741000175476074,
+          2.74399995803833,
+          2.747000217437744,
+          2.75,
+          2.753000020980835,
+          2.75600004196167,
+          2.759000062942505,
+          2.76200008392334,
+          2.765000104904175,
+          2.7680001258850098,
+          2.7709999084472656,
+          2.7740001678466797,
+          2.7769999504089355,
+          2.7800002098083496,
+          2.7829999923706055,
+          2.7860002517700195,
+          2.7890000343322754,
+          2.7919998168945312,
+          2.7950000762939453,
+          2.797999858856201,
+          2.8010001182556152,
+          2.803999900817871,
+          2.807000160217285,
+          2.809999942779541,
+          2.812999963760376,
+          2.815999984741211,
+          2.819000005722046,
+          2.822000026702881,
+          2.825000047683716,
+          2.828000068664551,
+          2.8309998512268066,
+          2.8340001106262207,
+          2.8369998931884766,
+          2.8400001525878906,
+          2.8429999351501465,
+          2.8460001945495605,
+          2.8489999771118164,
+          2.8519999980926514,
+          2.8550000190734863,
+          2.8580000400543213,
+          2.8610000610351562,
+          2.864000082015991,
+          2.867000102996826,
+          2.869999885559082,
+          2.873000144958496,
+          2.875999927520752,
+          2.879000186920166,
+          2.881999969482422,
+          2.885000228881836,
+          2.888000011444092,
+          2.8909997940063477,
+          2.8940000534057617,
+          2.8969998359680176,
+          2.9000000953674316,
+          2.9029998779296875,
+          2.9060001373291016,
+          2.9089999198913574,
+          2.9120001792907715,
+          2.9149999618530273,
+          2.9180002212524414,
+          2.9210000038146973,
+          2.9240002632141113,
+          2.927000045776367,
+          2.930000066757202,
+          2.933000087738037,
+          2.935999870300293,
+          2.939000129699707,
+          2.941999912261963,
+          2.945000171661377,
+          2.947999954223633,
+          2.9509999752044678,
+          2.9539999961853027,
+          2.9570000171661377,
+          2.9600000381469727,
+          2.9630000591278076,
+          2.9660000801086426,
+          2.9689998626708984,
+          2.9720001220703125,
+          2.9749999046325684,
+          2.9780001640319824,
+          2.9809999465942383,
+          2.9840002059936523,
+          2.986999988555908,
+          2.990000009536743,
+          2.993000030517578,
+          2.996000051498413,
+          2.999000072479248,
+          3.002000093460083,
+          3.005000114440918,
+          3.007999897003174,
+          3.011000156402588,
+          3.0139999389648438,
+          3.017000198364258,
+          3.0199999809265137,
+          3.0230002403259277,
+          3.0260000228881836,
+          3.0290000438690186,
+          3.0320000648498535,
+          3.0349998474121094,
+          3.0380001068115234,
+          3.0409998893737793,
+          3.0440001487731934,
+          3.046999931335449,
+          3.0500001907348633,
+          3.052999973297119,
+          3.056000232696533,
+          3.059000015258789,
+          3.062000274658203,
+          3.065000057220459,
+          3.068000078201294,
+          3.071000099182129,
+          3.074000120162964,
+          3.077000141143799,
+          3.0799999237060547,
+          3.0830001831054688,
+          3.0859999656677246,
+          3.0889999866485596,
+          3.0920000076293945,
+          3.0950000286102295,
+          3.0980000495910645,
+          3.1010000705718994,
+          3.1040000915527344,
+          3.1069998741149902,
+          3.1100001335144043,
+          3.11299991607666,
+          3.116000175476074,
+          3.11899995803833,
+          3.122000217437744,
+          3.125,
+          3.128000020980835,
+          3.13100004196167,
+          3.134000062942505,
+          3.13700008392334,
+          3.140000104904175,
+          3.1430001258850098,
+          3.1459999084472656,
+          3.1490001678466797,
+          3.1519999504089355,
+          3.1549999713897705,
+          3.1579999923706055,
+          3.1610000133514404,
+          3.1640000343322754,
+          3.1669998168945312,
+          3.1700000762939453,
+          3.172999858856201,
+          3.1760001182556152,
+          3.178999900817871,
+          3.182000160217285,
+          3.184999942779541,
+          3.188000202178955,
+          3.190999984741211,
+          3.194000244140625,
+          3.197000026702881,
+          3.200000047683716,
+          3.2029998302459717,
+          3.2059998512268066,
+          3.2089998722076416,
+          3.2119998931884766,
+          3.2150001525878906,
+          3.2180001735687256,
+          3.2210001945495605,
+          3.2240002155303955,
+          3.2269999980926514,
+          3.2300000190734863,
+          3.2330000400543213,
+          3.2360000610351562,
+          3.239000082015991,
+          3.242000102996826,
+          3.244999885559082,
+          3.247999906539917,
+          3.250999927520752,
+          3.254000186920166,
+          3.256999969482422,
+          3.260000228881836,
+          3.263000011444092,
+          3.2660000324249268,
+          3.2690000534057617,
+          3.2720000743865967,
+          3.2750000953674316,
+          3.2780001163482666,
+          3.2809998989105225,
+          3.2839999198913574,
+          3.2869999408721924,
+          3.2899999618530273,
+          3.2930002212524414,
+          3.2960000038146973,
+          3.2990000247955322,
+          3.302000045776367,
+          3.304999828338623,
+          3.308000087738037,
+          3.310999870300293,
+          3.314000129699707,
+          3.317000150680542,
+          3.319999933242798,
+          3.323000192642212,
+          3.3259999752044678,
+          3.3289999961853027,
+          3.332000255584717,
+          3.3350000381469727,
+          3.3380002975463867,
+          3.3410000801086426,
+          3.3439998626708984,
+          3.3469998836517334,
+          3.3499999046325684,
+          3.3530001640319824,
+          3.3560001850128174,
+          3.3590002059936523,
+          3.3620002269744873,
+          3.365000009536743,
+          3.368000030517578,
+          3.371000051498413,
+          3.374000072479248,
+          3.377000093460083,
+          3.380000114440918,
+          3.382999897003174,
+          3.386000156402588,
+          3.3889999389648438,
+          3.392000198364258,
+          3.3949999809265137,
+          3.3980002403259277,
+          3.4010000228881836,
+          3.4040000438690186,
+          3.4070000648498535,
+          3.4100000858306885,
+          3.4130001068115234,
+          3.4160001277923584,
+          3.4189999103546143,
+          3.421999931335449,
+          3.424999952316284,
+          3.427999973297119,
+          3.431000232696533,
+          3.434000253677368,
+          3.437000274658203,
+          3.440000057220459,
+          3.442999839782715,
+          3.446000099182129,
+          3.4489998817443848,
+          3.452000141143799,
+          3.455000162124634,
+          3.4579999446868896,
+          3.4610002040863037,
+          3.4639999866485596,
+          3.4670000076293945,
+          3.4700002670288086,
+          3.4730000495910645,
+          3.4760003089904785,
+          3.4790000915527344,
+          3.4820001125335693,
+          3.4850001335144043,
+          3.48799991607666,
+          3.491000175476074,
+          3.494000196456909,
+          3.497000217437744,
+          3.5,
+          3.503000020980835,
+          3.50600004196167,
+          3.509000062942505,
+          3.5119998455047607,
+          3.5149998664855957,
+          3.5179998874664307,
+          3.5209999084472656,
+          3.5239996910095215,
+          3.5269997119903564,
+          3.5299997329711914,
+          3.5329999923706055,
+          3.5360000133514404,
+          3.5390000343322754,
+          3.5419998168945312,
+          3.544999837875366,
+          3.547999858856201,
+          3.550999879837036,
+          3.553999900817871,
+          3.557000160217285,
+          3.559999942779541,
+          3.562999725341797,
+          3.565999746322632,
+          3.569000005722046,
+          3.572000026702881,
+          3.575000047683716,
+          3.578000068664551,
+          3.5809998512268066,
+          3.5839998722076416,
+          3.5869998931884766,
+          3.5899999141693115,
+          3.5930001735687256,
+          3.5960001945495605,
+          3.5989999771118164,
+          3.6019997596740723,
+          3.6050000190734863,
+          3.607999801635742,
+          3.610999822616577,
+          3.613999843597412,
+          3.617000102996826,
+          3.619999885559082,
+          3.622999668121338,
+          3.625999689102173,
+          3.628999948501587,
+          3.631999969482422,
+          3.634999990463257,
+          3.638000011444092,
+          3.6409997940063477,
+          3.6439998149871826,
+          3.6469998359680176,
+          3.6499998569488525,
+          3.6530001163482666,
+          3.6560001373291016,
+          3.6589999198913574,
+          3.6619997024536133,
+          3.6649999618530273,
+          3.6679999828338623,
+          3.6710000038146973,
+          3.6740000247955322,
+          3.677000045776367,
+          3.679999828338623,
+          3.682999849319458,
+          3.685999870300293,
+          3.689000129699707,
+          3.692000150680542,
+          3.695000171661377,
+          3.697999954223633,
+          3.7009999752044678,
+          3.7039997577667236,
+          3.7069997787475586,
+          3.7099997997283936,
+          3.7130000591278076,
+          3.7160000801086426,
+          3.7189998626708984,
+          3.7219996452331543,
+          3.7249999046325684,
+          3.7279999256134033,
+          3.7309999465942383,
+          3.7339999675750732,
+          3.736999988555908,
+          3.739999771118164,
+          3.742999792098999,
+          3.745999813079834,
+          3.749000072479248,
+          3.752000093460083,
+          3.755000114440918,
+          3.757999897003174,
+          3.760999917984009,
+          3.7639999389648438,
+          3.7669999599456787,
+          3.7699999809265137,
+          3.7730002403259277,
+          3.7760000228881836,
+          3.7789998054504395,
+          3.7819998264312744,
+          3.7850000858306885,
+          3.7880001068115234,
+          3.7910001277923584,
+          3.7940001487731934,
+          3.796999931335449,
+          3.799999713897705,
+          3.80299973487854,
+          3.805999755859375,
+          3.809000015258789,
+          3.812000036239624,
+          3.815000057220459,
+          3.817999839782715,
+          3.82099986076355,
+          3.8239998817443848,
+          3.8269999027252197,
+          3.8299999237060547,
+          3.8330001831054688,
+          3.8359999656677246,
+          3.8389997482299805,
+          3.8419997692108154,
+          3.8450000286102295,
+          3.8480000495910645,
+          3.8510000705718994,
+          3.8540000915527344,
+          3.8569998741149902,
+          3.859999895095825,
+          3.86299991607666,
+          3.865999937057495,
+          3.869000196456909,
+          3.871999979019165,
+          3.875,
+          3.877999782562256,
+          3.880999803543091,
+          3.883999824523926,
+          3.8869998455047607,
+          3.8899998664855957,
+          3.8930001258850098,
+          3.8959999084472656,
+          3.8989996910095215,
+          3.9019997119903564,
+          3.9049999713897705,
+          3.9079999923706055,
+          3.9110000133514404,
+          3.9140000343322754,
+          3.9169998168945312,
+          3.919999837875366,
+          3.922999858856201,
+          3.925999879837036,
+          3.92900013923645,
+          3.932000160217285,
+          3.934999942779541,
+          3.937999725341797,
+          3.940999984741211,
+          3.944000005722046,
+          3.947000026702881,
+          3.950000047683716,
+          3.953000068664551,
+          3.9559998512268066,
+          3.9589998722076416,
+          3.9619998931884766,
+          3.9650001525878906,
+          3.9679999351501465,
+          3.9709999561309814,
+          3.9739999771118164,
+          3.9769997596740723,
+          3.9799997806549072,
+          3.982999801635742,
+          3.985999822616577,
+          3.989000082015991,
+          3.992000102996826,
+          3.994999885559082,
+          3.997999668121338,
+          4.000999927520752,
+          4.003999710083008,
+          4.006999969482422,
+          4.010000228881836,
+          4.013000011444092,
+          4.015999794006348,
+          4.019000053405762,
+          4.021999835968018,
+          4.025000095367432,
+          4.0279998779296875,
+          4.031000137329102,
+          4.033999919891357,
+          4.036999702453613,
+          4.039999961853027,
+          4.043000221252441,
+          4.046000003814697,
+          4.049000263214111,
+          4.052000045776367,
+          4.054999828338623,
+          4.057999610900879,
+          4.060999870300293,
+          4.064000129699707,
+          4.066999912261963,
+          4.069999694824219,
+          4.072999954223633,
+          4.075999736785889,
+          4.0789995193481445,
+          4.081999778747559,
+          4.085000038146973,
+          4.088000297546387,
+          4.091000080108643,
+          4.093999862670898,
+          4.0970001220703125,
+          4.099999904632568,
+          4.102999687194824,
+          4.105999946594238,
+          4.109000205993652,
+          4.111999988555908,
+          4.114999771118164,
+          4.118000030517578,
+          4.121000289916992,
+          4.124000072479248,
+          4.126999855041504,
+          4.130000114440918,
+          4.132999897003174,
+          4.13599967956543,
+          4.138999938964844,
+          4.142000198364258,
+          4.145000457763672,
+          4.148000240325928,
+          4.151000022888184,
+          4.1539998054504395,
+          4.1570000648498535,
+          4.159999847412109,
+          4.163000106811523,
+          4.165999889373779,
+          4.169000148773193,
+          4.171999931335449,
+          4.174999713897705,
+          4.177999496459961,
+          4.180999755859375,
+          4.184000015258789,
+          4.187000274658203,
+          4.190000057220459,
+          4.192999839782715,
+          4.196000099182129,
+          4.198999881744385,
+          4.201999664306641,
+          4.204999923706055,
+          4.208000183105469,
+          4.210999965667725,
+          4.2139997482299805,
+          4.2170000076293945,
+          4.220000267028809,
+          4.2230000495910645,
+          4.22599983215332,
+          4.229000091552734,
+          4.23199987411499,
+          4.234999656677246,
+          4.23799991607666,
+          4.241000175476074,
+          4.24399995803833,
+          4.246999740600586,
+          4.25,
+          4.252999782562256,
+          4.255999565124512,
+          4.258999824523926,
+          4.26200008392334,
+          4.265000343322754,
+          4.26800012588501,
+          4.270999908447266,
+          4.2739996910095215,
+          4.2769999504089355,
+          4.279999732971191,
+          4.2829999923706055,
+          4.2860002517700195,
+          4.289000034332275,
+          4.291999816894531,
+          4.295000076293945,
+          4.297999858856201,
+          4.301000118255615,
+          4.303999900817871,
+          4.307000160217285,
+          4.309999942779541,
+          4.312999725341797,
+          4.315999984741211,
+          4.319000244140625,
+          4.322000026702881,
+          4.325000286102295,
+          4.328000068664551,
+          4.330999851226807,
+          4.3339996337890625,
+          4.336999893188477,
+          4.340000152587891,
+          4.3429999351501465,
+          4.345999717712402,
+          4.348999977111816,
+          4.351999759674072,
+          4.354999542236328,
+          4.357999801635742,
+          4.361000061035156,
+          4.36400032043457,
+          4.367000102996826,
+          4.369999885559082,
+          4.373000144958496,
+          4.375999927520752,
+          4.378999710083008,
+          4.381999969482422,
+          4.385000228881836,
+          4.388000011444092,
+          4.390999794006348,
+          4.394000053405762,
+          4.397000312805176,
+          4.400000095367432,
+          4.4029998779296875,
+          4.405999660491943,
+          4.409000396728516,
+          4.411999702453613,
+          4.414999961853027,
+          4.417999744415283,
+          4.4210004806518555,
+          4.423999786376953,
+          4.426999568939209,
+          4.429999828338623,
+          4.432999610900879,
+          4.435999870300293,
+          4.438999652862549,
+          4.441999912261963,
+          4.444999694824219,
+          4.447999954223633,
+          4.451000213623047,
+          4.4539995193481445,
+          4.457000255584717,
+          4.460000038146973,
+          4.463000297546387,
+          4.465999603271484,
+          4.469000339508057,
+          4.4720001220703125,
+          4.474999904632568,
+          4.478000164031982,
+          4.480999946594238,
+          4.483999729156494,
+          4.486999988555908,
+          4.490000247955322,
+          4.493000030517578,
+          4.495999813079834,
+          4.499000072479248,
+          4.501999855041504,
+          4.505000114440918,
+          4.508000373840332,
+          4.51099967956543,
+          4.513999938964844,
+          4.517000198364258,
+          4.519999980926514,
+          4.5229997634887695,
+          4.525999546051025,
+          4.529000282287598,
+          4.531999588012695,
+          4.534999847412109,
+          4.537999629974365,
+          4.5410003662109375,
+          4.543999671936035,
+          4.546999931335449,
+          4.550000190734863,
+          4.552999973297119,
+          4.556000232696533,
+          4.559000015258789,
+          4.562000274658203,
+          4.565000057220459,
+          4.568000316619873,
+          4.571000099182129,
+          4.573999881744385,
+          4.577000141143799,
+          4.579999923706055,
+          4.5829997062683105,
+          4.585999965667725,
+          4.5889997482299805,
+          4.5920000076293945,
+          4.59499979019165,
+          4.5980000495910645,
+          4.60099983215332,
+          4.604000091552734,
+          4.607000350952148,
+          4.609999656677246,
+          4.613000392913818,
+          4.615999698638916,
+          4.61899995803833,
+          4.621999740600586,
+          4.625,
+          4.628000259399414,
+          4.630999565124512,
+          4.633999824523926,
+          4.63700008392334,
+          4.640000343322754,
+          4.642999649047852,
+          4.645999908447266,
+          4.64900016784668,
+          4.6519999504089355,
+          4.65500020980835,
+          4.6579999923706055,
+          4.660999774932861,
+          4.664000034332275,
+          4.6670002937316895,
+          4.670000076293945,
+          4.672999858856201,
+          4.676000118255615,
+          4.678999900817871,
+          4.681999683380127,
+          4.685000419616699,
+          4.688000202178955,
+          4.690999984741211,
+          4.693999767303467,
+          4.697000026702881,
+          4.699999809265137,
+          4.702999591827393,
+          4.705999851226807,
+          4.7089996337890625,
+          4.711999893188477,
+          4.714999675750732,
+          4.7179999351501465,
+          4.720999717712402,
+          4.723999977111816,
+          4.7270002365112305,
+          4.729999542236328,
+          4.7330002784729,
+          4.736000061035156,
+          4.73900032043457,
+          4.741999626159668,
+          4.74500036239624,
+          4.748000144958496,
+          4.750999927520752,
+          4.754000186920166,
+          4.756999969482422,
+          4.759999752044678,
+          4.763000011444092,
+          4.766000270843506,
+          4.769000053405762,
+          4.771999835968018,
+          4.775000095367432,
+          4.7779998779296875,
+          4.781000137329102,
+          4.783999919891357,
+          4.7870001792907715,
+          4.789999961853027,
+          4.792999744415283,
+          4.796000003814697,
+          4.798999786376953,
+          4.801999568939209,
+          4.805000305175781,
+          4.807999610900879,
+          4.810999870300293,
+          4.813999652862549,
+          4.817000389099121,
+          4.819999694824219,
+          4.822999954223633,
+          4.826000213623047,
+          4.828999996185303,
+          4.832000255584717,
+          4.835000038146973,
+          4.838000297546387,
+          4.841000080108643,
+          4.844000339508057,
+          4.8470001220703125,
+          4.849999904632568,
+          4.853000164031982,
+          4.855999946594238,
+          4.858999729156494,
+          4.861999988555908,
+          4.864999771118164,
+          4.868000030517578,
+          4.870999813079834,
+          4.874000072479248,
+          4.876999855041504,
+          4.87999963760376,
+          4.882999897003174,
+          4.886000156402588,
+          4.888999938964844,
+          4.8919997215271,
+          4.894999980926514,
+          4.8979997634887695,
+          4.901000022888184,
+          4.904000282287598,
+          4.906999588012695,
+          4.909999847412109,
+          4.913000106811523,
+          4.9160003662109375,
+          4.918999671936035,
+          4.921999931335449,
+          4.925000190734863,
+          4.927999973297119,
+          4.931000232696533,
+          4.934000015258789,
+          4.936999797821045,
+          4.940000057220459,
+          4.943000316619873,
+          4.946000099182129,
+          4.948999881744385,
+          4.952000141143799,
+          4.954999923706055,
+          4.9579997062683105,
+          4.961000442504883,
+          4.9639997482299805,
+          4.9670000076293945,
+          4.96999979019165,
+          4.973000526428223,
+          4.97599983215332,
+          4.978999614715576,
+          4.982000350952148,
+          4.984999656677246,
+          4.98799991607666,
+          4.990999698638916,
+          4.994000434875488,
+          4.996999740600586
+         ],
+         "xaxis": "x",
+         "yaxis": "y"
+        },
+        {
+         "nbinsx": 50,
+         "opacity": 0.7,
+         "type": "histogram",
+         "x": [
+          2,
+          2.0012006759643555,
+          2.0024027824401855,
+          2.0036065578460693,
+          2.0048115253448486,
+          2.0060181617736816,
+          2.00722599029541,
+          2.0084354877471924,
+          2.009646415710449,
+          2.0108585357666016,
+          2.0120723247528076,
+          2.0132875442504883,
+          2.0145044326782227,
+          2.0157225131988525,
+          2.016942262649536,
+          2.0181634426116943,
+          2.019386053085327,
+          2.0206103324890137,
+          2.0218358039855957,
+          2.0230629444122314,
+          2.024291515350342,
+          2.0255215167999268,
+          2.0267531871795654,
+          2.0279862880706787,
+          2.0292208194732666,
+          2.030456781387329,
+          2.0316944122314453,
+          2.032933473587036,
+          2.0341742038726807,
+          2.0354161262512207,
+          2.0366597175598145,
+          2.037905216217041,
+          2.039151668548584,
+          2.0404000282287598,
+          2.041649580001831,
+          2.042901039123535,
+          2.0441536903381348,
+          2.045408010482788,
+          2.046663761138916,
+          2.0479211807250977,
+          2.049180507659912,
+          2.050440788269043,
+          2.0517029762268066,
+          2.052966594696045,
+          2.054231882095337,
+          2.0554983615875244,
+          2.0567667484283447,
+          2.0580365657806396,
+          2.0593080520629883,
+          2.0605812072753906,
+          2.0618557929992676,
+          2.063131809234619,
+          2.0644094944000244,
+          2.0656888484954834,
+          2.066969871520996,
+          2.0682523250579834,
+          2.0695364475250244,
+          2.07082200050354,
+          2.0721094608306885,
+          2.0733983516693115,
+          2.0746889114379883,
+          2.0759809017181396,
+          2.0772745609283447,
+          2.0785698890686035,
+          2.079866886138916,
+          2.081165313720703,
+          2.082465648651123,
+          2.0837676525115967,
+          2.085071086883545,
+          2.0863759517669678,
+          2.0876827239990234,
+          2.0889909267425537,
+          2.090301036834717,
+          2.0916125774383545,
+          2.092925786972046,
+          2.094240665435791,
+          2.095557451248169,
+          2.0968756675720215,
+          2.0981955528259277,
+          2.0995171070098877,
+          2.1008403301239014,
+          2.1021652221679688,
+          2.10349178314209,
+          2.1048200130462646,
+          2.106149911880493,
+          2.1074817180633545,
+          2.1088149547576904,
+          2.11014986038208,
+          2.1114864349365234,
+          2.1128249168395996,
+          2.1141650676727295,
+          2.115506649017334,
+          2.1168501377105713,
+          2.1181952953338623,
+          2.119542121887207,
+          2.1208908557891846,
+          2.1222410202026367,
+          2.1235930919647217,
+          2.1249468326568604,
+          2.1263022422790527,
+          2.127659559249878,
+          2.129018545150757,
+          2.1303791999816895,
+          2.131741523742676,
+          2.133105754852295,
+          2.1344716548919678,
+          2.1358394622802734,
+          2.1372087001800537,
+          2.138579845428467,
+          2.1399528980255127,
+          2.1413276195526123,
+          2.1427042484283447,
+          2.1440823078155518,
+          2.1454625129699707,
+          2.1468441486358643,
+          2.1482276916503906,
+          2.14961314201355,
+          2.1510000228881836,
+          2.1523890495300293,
+          2.153779983520508,
+          2.15517258644104,
+          2.156566858291626,
+          2.1579627990722656,
+          2.159360885620117,
+          2.1607606410980225,
+          2.1621620655059814,
+          2.1635653972625732,
+          2.164970636367798,
+          2.1663777828216553,
+          2.1677868366241455,
+          2.1691973209381104,
+          2.170609951019287,
+          2.1720242500305176,
+          2.17344069480896,
+          2.174858570098877,
+          2.176278591156006,
+          2.1777002811431885,
+          2.179124116897583,
+          2.1805496215820312,
+          2.181976795196533,
+          2.183406114578247,
+          2.1848373413085938,
+          2.186270236968994,
+          2.1877050399780273,
+          2.1891417503356934,
+          2.190580368041992,
+          2.192021131515503,
+          2.1934635639190674,
+          2.1949079036712646,
+          2.1963541507720947,
+          2.1978020668029785,
+          2.1992523670196533,
+          2.2007040977478027,
+          2.202157974243164,
+          2.2036139965057373,
+          2.2050716876983643,
+          2.206531524658203,
+          2.2079930305480957,
+          2.209456443786621,
+          2.2109220027923584,
+          2.2123894691467285,
+          2.2138588428497314,
+          2.215330123901367,
+          2.2168033123016357,
+          2.218278646469116,
+          2.2197558879852295,
+          2.2212350368499756,
+          2.2227160930633545,
+          2.2241992950439453,
+          2.225684404373169,
+          2.2271714210510254,
+          2.2286605834960938,
+          2.230151653289795,
+          2.231644630432129,
+          2.233139991760254,
+          2.2346370220184326,
+          2.236135959625244,
+          2.2376370429992676,
+          2.239140272140503,
+          2.240645408630371,
+          2.242152452468872,
+          2.243661642074585,
+          2.2451729774475098,
+          2.2466862201690674,
+          2.248201608657837,
+          2.2497189044952393,
+          2.2512381076812744,
+          2.2527596950531006,
+          2.2542831897735596,
+          2.2558085918426514,
+          2.257336139678955,
+          2.25886607170105,
+          2.2603979110717773,
+          2.2619316577911377,
+          2.26346755027771,
+          2.265005588531494,
+          2.2665457725524902,
+          2.2680881023406982,
+          2.269632339477539,
+          2.271178722381592,
+          2.2727272510528564,
+          2.274277925491333,
+          2.2758307456970215,
+          2.2773854732513428,
+          2.278942584991455,
+          2.2805016040802,
+          2.2820627689361572,
+          2.2836263179779053,
+          2.2851920127868652,
+          2.286759614944458,
+          2.288329601287842,
+          2.2899014949798584,
+          2.291475772857666,
+          2.2930519580841064,
+          2.294630527496338,
+          2.2962112426757812,
+          2.2977943420410156,
+          2.299379348754883,
+          2.300966501235962,
+          2.302555799484253,
+          2.304147481918335,
+          2.305741310119629,
+          2.3073372840881348,
+          2.3089354038238525,
+          2.3105359077453613,
+          2.312138795852661,
+          2.313743829727173,
+          2.3153507709503174,
+          2.316960096359253,
+          2.3185715675354004,
+          2.320185661315918,
+          2.3218016624450684,
+          2.3234200477600098,
+          2.325040817260742,
+          2.3266637325286865,
+          2.3282887935638428,
+          2.32991623878479,
+          2.331545829772949,
+          2.3331778049468994,
+          2.3348121643066406,
+          2.3364486694335938,
+          2.338087320327759,
+          2.339728355407715,
+          2.341372013092041,
+          2.343017816543579,
+          2.344666004180908,
+          2.346316337585449,
+          2.3479690551757812,
+          2.3496241569519043,
+          2.3512814044952393,
+          2.3529410362243652,
+          2.3546032905578613,
+          2.3562676906585693,
+          2.3579344749450684,
+          2.3596036434173584,
+          2.3612751960754395,
+          2.3629491329193115,
+          2.3646249771118164,
+          2.3663039207458496,
+          2.3679847717285156,
+          2.3696682453155518,
+          2.371354103088379,
+          2.373042345046997,
+          2.3747329711914062,
+          2.3764257431030273,
+          2.3781211376190186,
+          2.37981915473938,
+          2.381519317626953,
+          2.3832221031188965,
+          2.384927272796631,
+          2.3866348266601562,
+          2.3883450031280518,
+          2.390057325363159,
+          2.3917722702026367,
+          2.3934898376464844,
+          2.395209550857544,
+          2.3969318866729736,
+          2.3986566066741943,
+          2.400383949279785,
+          2.402114152908325,
+          2.403846025466919,
+          2.405580997467041,
+          2.407318353652954,
+          2.409058094024658,
+          2.4108004570007324,
+          2.4125449657440186,
+          2.414292573928833,
+          2.4160425662994385,
+          2.417794942855835,
+          2.4195501804351807,
+          2.4213075637817383,
+          2.423067569732666,
+          2.424830436706543,
+          2.426595449447632,
+          2.42836332321167,
+          2.430133581161499,
+          2.4319067001342773,
+          2.4336822032928467,
+          2.435460329055786,
+          2.4372410774230957,
+          2.4390244483947754,
+          2.440810203552246,
+          2.442599058151245,
+          2.444390058517456,
+          2.446183919906616,
+          2.4479804039001465,
+          2.449779510498047,
+          2.4515814781188965,
+          2.453385829925537,
+          2.455192804336548,
+          2.457002639770508,
+          2.458814859390259,
+          2.460629940032959,
+          2.46244740486145,
+          2.464268207550049,
+          2.4660913944244385,
+          2.467916965484619,
+          2.469745635986328,
+          2.4715769290924072,
+          2.4734108448028564,
+          2.475247621536255,
+          2.4770867824554443,
+          2.478929042816162,
+          2.48077392578125,
+          2.482621431350708,
+          2.4844722747802734,
+          2.486325263977051,
+          2.4881811141967773,
+          2.490039825439453,
+          2.491901159286499,
+          2.4937655925750732,
+          2.4956324100494385,
+          2.497502565383911,
+          2.499375104904175,
+          2.5012505054473877,
+          2.503129005432129,
+          2.5050101280212402,
+          2.5068938732147217,
+          2.5087809562683105,
+          2.5106701850891113,
+          2.5125627517700195,
+          2.514457941055298,
+          2.5163562297821045,
+          2.5182576179504395,
+          2.5201611518859863,
+          2.5220682621002197,
+          2.523977756500244,
+          2.525890350341797,
+          2.527805805206299,
+          2.52972412109375,
+          2.5316457748413086,
+          2.533569812774658,
+          2.535496950149536,
+          2.5374271869659424,
+          2.5393600463867188,
+          2.5412960052490234,
+          2.5432350635528564,
+          2.5451767444610596,
+          2.54712176322937,
+          2.54906964302063,
+          2.551020383834839,
+          2.552974224090576,
+          2.5549309253692627,
+          2.5568909645080566,
+          2.5588536262512207,
+          2.560819387435913,
+          2.562788486480713,
+          2.5647599697113037,
+          2.56673526763916,
+          2.5687131881713867,
+          2.5706942081451416,
+          2.572678327560425,
+          2.5746653079986572,
+          2.576655626296997,
+          2.5786490440368652,
+          2.5806450843811035,
+          2.5826447010040283,
+          2.5846471786499023,
+          2.586652994155884,
+          2.5886616706848145,
+          2.5906734466552734,
+          2.592688798904419,
+          2.5947067737579346,
+          2.5967280864715576,
+          2.598752498626709,
+          2.6007802486419678,
+          2.602811098098755,
+          2.604844808578491,
+          2.606882095336914,
+          2.6089224815368652,
+          2.6109659671783447,
+          2.6130127906799316,
+          2.615062713623047,
+          2.6171159744262695,
+          2.6191723346710205,
+          2.621232032775879,
+          2.6232950687408447,
+          2.6253609657287598,
+          2.6274304389953613,
+          2.629503011703491,
+          2.6315786838531494,
+          2.6336581707000732,
+          2.6357405185699463,
+          2.637826442718506,
+          2.639915704727173,
+          2.642007827758789,
+          2.644103765487671,
+          2.646202564239502,
+          2.6483049392700195,
+          2.6504108905792236,
+          2.652519941329956,
+          2.654632329940796,
+          2.6567482948303223,
+          2.658867359161377,
+          2.660989999771118,
+          2.663115978240967,
+          2.665245294570923,
+          2.6673779487609863,
+          2.6695139408111572,
+          2.6716537475585938,
+          2.6737966537475586,
+          2.675943374633789,
+          2.678093433380127,
+          2.680246591567993,
+          2.682403564453125,
+          2.684563636779785,
+          2.686727523803711,
+          2.6888949871063232,
+          2.691065549850464,
+          2.693240165710449,
+          2.695417881011963,
+          2.697599172592163,
+          2.69978404045105,
+          2.701972246170044,
+          2.704164505004883,
+          2.70635986328125,
+          2.7085587978363037,
+          2.710761785507202,
+          2.712967872619629,
+          2.7151780128479004,
+          2.7173914909362793,
+          2.7196083068847656,
+          2.7218291759490967,
+          2.724053382873535,
+          2.72628116607666,
+          2.72851300239563,
+          2.730748176574707,
+          2.732987403869629,
+          2.735229730606079,
+          2.737476110458374,
+          2.7397260665893555,
+          2.7419795989990234,
+          2.744237184524536,
+          2.7464981079101562,
+          2.748762845993042,
+          2.7510316371917725,
+          2.7533040046691895,
+          2.755580186843872,
+          2.7578601837158203,
+          2.760143518447876,
+          2.7624311447143555,
+          2.7647221088409424,
+          2.767017126083374,
+          2.7693159580230713,
+          2.771618366241455,
+          2.773925304412842,
+          2.776235580444336,
+          2.7785496711730957,
+          2.7808678150177,
+          2.783189296722412,
+          2.785515308380127,
+          2.7878448963165283,
+          2.7901785373687744,
+          2.792515993118286,
+          2.7948575019836426,
+          2.7972028255462646,
+          2.7995524406433105,
+          2.8019051551818848,
+          2.804262638092041,
+          2.806623697280884,
+          2.8089888095855713,
+          2.8113577365875244,
+          2.8137307167053223,
+          2.816108226776123,
+          2.8184893131256104,
+          2.8208744525909424,
+          2.8232638835906982,
+          2.8256568908691406,
+          2.828054428100586,
+          2.830455780029297,
+          2.8328611850738525,
+          2.835270881652832,
+          2.837684392929077,
+          2.840102434158325,
+          2.842524528503418,
+          2.8449501991271973,
+          2.8473806381225586,
+          2.8498146533966064,
+          2.8522531986236572,
+          2.8546957969665527,
+          2.857142925262451,
+          2.8595941066741943,
+          2.8620493412017822,
+          2.864508867263794,
+          2.8669724464416504,
+          2.8694403171539307,
+          2.8719124794006348,
+          2.874389171600342,
+          2.8768699169158936,
+          2.879354953765869,
+          2.8818440437316895,
+          2.884337902069092,
+          2.886835813522339,
+          2.8893380165100098,
+          2.8918449878692627,
+          2.8943560123443604,
+          2.896871328353882,
+          2.899390935897827,
+          2.9019150733947754,
+          2.9044437408447266,
+          2.9069766998291016,
+          2.9095139503479004,
+          2.9120559692382812,
+          2.914602041244507,
+          2.9171526432037354,
+          2.919708013534546,
+          2.9222676753997803,
+          2.9248318672180176,
+          2.9274003505706787,
+          2.929973602294922,
+          2.932551145553589,
+          2.935133457183838,
+          2.93772029876709,
+          2.9403116703033447,
+          2.9429075717926025,
+          2.9455080032348633,
+          2.948112964630127,
+          2.9507226943969727,
+          2.9533369541168213,
+          2.955955982208252,
+          2.9585797786712646,
+          2.9612081050872803,
+          2.963840961456299,
+          2.9664788246154785,
+          2.969120979309082,
+          2.9717681407928467,
+          2.9744198322296143,
+          2.977076530456543,
+          2.9797375202178955,
+          2.982403516769409,
+          2.985074520111084,
+          2.987750291824341,
+          2.9904305934906006,
+          2.9931156635284424,
+          2.9958057403564453,
+          2.9985008239746094,
+          3.0012004375457764,
+          3.0039048194885254,
+          3.0066146850585938,
+          3.009328842163086,
+          3.0120480060577393,
+          3.014772415161133,
+          3.0175013542175293,
+          3.020235776901245,
+          3.022974729537964,
+          3.0257184505462646,
+          3.0284674167633057,
+          3.031221628189087,
+          3.03398060798645,
+          3.0367443561553955,
+          3.039513349533081,
+          3.042287826538086,
+          3.0450668334960938,
+          3.047851085662842,
+          3.050640344619751,
+          3.0534350872039795,
+          3.056234836578369,
+          3.059039354324341,
+          3.0618491172790527,
+          3.064664363861084,
+          3.0674846172332764,
+          3.07030987739563,
+          3.0731406211853027,
+          3.075976610183716,
+          3.07881760597229,
+          3.0816638469696045,
+          3.0845155715942383,
+          3.0873727798461914,
+          3.0902349948883057,
+          3.09310245513916,
+          3.095975160598755,
+          3.098853588104248,
+          3.1017370223999023,
+          3.104625701904297,
+          3.107520341873169,
+          3.110419988632202,
+          3.1133248805999756,
+          3.1162357330322266,
+          3.1191515922546387,
+          3.122073173522949,
+          3.124999761581421,
+          3.12793231010437,
+          3.1308703422546387,
+          3.1338136196136475,
+          3.136762857437134,
+          3.1397173404693604,
+          3.1426773071289062,
+          3.1456432342529297,
+          3.1486144065856934,
+          3.1515913009643555,
+          3.154573917388916,
+          3.157562255859375,
+          3.1605563163757324,
+          3.163555860519409,
+          3.1665608882904053,
+          3.169572114944458,
+          3.17258882522583,
+          3.1756112575531006,
+          3.1786394119262695,
+          3.181673526763916,
+          3.184713363647461,
+          3.187758684158325,
+          3.190810441970825,
+          3.1938679218292236,
+          3.1969306468963623,
+          3.1999998092651367,
+          3.2030749320983887,
+          3.20615553855896,
+          3.209242343902588,
+          3.2123348712921143,
+          3.2154338359832764,
+          3.218538761138916,
+          3.221649408340454,
+          3.2247660160064697,
+          3.227888584136963,
+          3.231017589569092,
+          3.2341527938842773,
+          3.2372937202453613,
+          3.240440607070923,
+          3.243593692779541,
+          3.246752977371216,
+          3.2499186992645264,
+          3.2530901432037354,
+          3.256268262863159,
+          3.2594523429870605,
+          3.2626426219940186,
+          3.265839099884033,
+          3.269042491912842,
+          3.2722513675689697,
+          3.2754666805267334,
+          3.278688430786133,
+          3.281916379928589,
+          3.285151243209839,
+          3.2883918285369873,
+          3.2916393280029297,
+          3.2948930263519287,
+          3.2981529235839844,
+          3.301419496536255,
+          3.304692268371582,
+          3.3079721927642822,
+          3.31125807762146,
+          3.3145508766174316,
+          3.31784987449646,
+          3.321155548095703,
+          3.324467897415161,
+          3.327786684036255,
+          3.3311123847961426,
+          3.334444761276245,
+          3.3377835750579834,
+          3.3411290645599365,
+          3.3444812297821045,
+          3.3478405475616455,
+          3.3512065410614014,
+          3.354578971862793,
+          3.3579583168029785,
+          3.361344337463379,
+          3.3647372722625732,
+          3.3681373596191406,
+          3.371544122695923,
+          3.374957799911499,
+          3.378378391265869,
+          3.381805658340454,
+          3.385240077972412,
+          3.3886821269989014,
+          3.3921303749084473,
+          3.395585775375366,
+          3.399048328399658,
+          3.402517795562744,
+          3.405994176864624,
+          3.409477949142456,
+          3.412968873977661,
+          3.4164674282073975,
+          3.4199726581573486,
+          3.423485040664673,
+          3.42700457572937,
+          3.4305317401885986,
+          3.434065818786621,
+          3.437607526779175,
+          3.4411561489105225,
+          3.4447121620178223,
+          3.448275566101074,
+          3.4518463611602783,
+          3.4554247856140137,
+          3.4590108394622803,
+          3.462603807449341,
+          3.4662044048309326,
+          3.4698123931884766,
+          3.473428249359131,
+          3.4770517349243164,
+          3.480682373046875,
+          3.484320640563965,
+          3.487966299057007,
+          3.491619825363159,
+          3.495281457901001,
+          3.498950242996216,
+          3.50262713432312,
+          3.5063114166259766,
+          3.5100033283233643,
+          3.5137031078338623,
+          3.517411470413208,
+          3.5211267471313477,
+          3.5248498916625977,
+          3.5285816192626953,
+          3.532320737838745,
+          3.5360677242279053,
+          3.539822578430176,
+          3.5435855388641357,
+          3.5473573207855225,
+          3.5511364936828613,
+          3.5549235343933105,
+          3.558718681335449,
+          3.5625221729278564,
+          3.566333770751953,
+          3.5701537132263184,
+          3.573981523513794,
+          3.577817440032959,
+          3.5816617012023926,
+          3.5855140686035156,
+          3.5893752574920654,
+          3.593244791030884,
+          3.5971224308013916,
+          3.601008176803589,
+          3.604902505874634,
+          3.6088054180145264,
+          3.6127161979675293,
+          3.616636276245117,
+          3.6205644607543945,
+          3.6245014667510986,
+          3.6284468173980713,
+          3.6324007511138916,
+          3.6363632678985596,
+          3.6403350830078125,
+          3.644315004348755,
+          3.648303508758545,
+          3.6523008346557617,
+          3.656306743621826,
+          3.6603219509124756,
+          3.6643457412719727,
+          3.6683785915374756,
+          3.672420024871826,
+          3.6764702796936035,
+          3.6805295944213867,
+          3.684597969055176,
+          3.688675880432129,
+          3.6927623748779297,
+          3.6968576908111572,
+          3.7009620666503906,
+          3.705075979232788,
+          3.7091987133026123,
+          3.7133309841156006,
+          3.7174723148345947,
+          3.7216224670410156,
+          3.7257821559906006,
+          3.7299511432647705,
+          3.7341299057006836,
+          3.7383179664611816,
+          3.7425150871276855,
+          3.7467215061187744,
+          3.7509374618530273,
+          3.7551629543304443,
+          3.7593979835510254,
+          3.7636430263519287,
+          3.767897129058838,
+          3.7721614837646484,
+          3.776434898376465,
+          3.7807180881500244,
+          3.785010814666748,
+          3.7893145084381104,
+          3.7936267852783203,
+          3.7979490756988525,
+          3.802281141281128,
+          3.8066232204437256,
+          3.8109755516052246,
+          3.8153374195098877,
+          3.8197097778320312,
+          3.824091672897339,
+          3.828483819961548,
+          3.8328857421875,
+          3.8372981548309326,
+          3.841721296310425,
+          3.846153974533081,
+          3.8505969047546387,
+          3.8550498485565186,
+          3.859513759613037,
+          3.863987684249878,
+          3.8684723377227783,
+          3.872966766357422,
+          3.877471923828125,
+          3.8819873332977295,
+          3.8865134716033936,
+          3.891050100326538,
+          3.8955979347229004,
+          3.900156259536743,
+          3.9047248363494873,
+          3.909303903579712,
+          3.913893938064575,
+          3.918494939804077,
+          3.9231069087982178,
+          3.927729606628418,
+          3.932363271713257,
+          3.9370076656341553,
+          3.9416630268096924,
+          3.9463295936584473,
+          3.951007843017578,
+          3.9556963443756104,
+          3.9603960514068604,
+          3.965106964111328,
+          3.9698290824890137,
+          3.974562883377075,
+          3.9793074131011963,
+          3.9840638637542725,
+          3.9888312816619873,
+          3.993610143661499,
+          3.9984004497528076,
+          4.003202438354492,
+          4.008016109466553,
+          4.01284122467041,
+          4.0176777839660645,
+          4.022526264190674,
+          4.027386665344238,
+          4.032258033752441,
+          4.0371413230896,
+          4.042037010192871,
+          4.046944618225098,
+          4.051863670349121,
+          4.0567946434021,
+          4.06173849105835,
+          4.0666937828063965,
+          4.071661472320557,
+          4.076640605926514,
+          4.081632137298584,
+          4.086636543273926,
+          4.091652870178223,
+          4.096681594848633,
+          4.101722717285156,
+          4.106776237487793,
+          4.111842155456543,
+          4.116920471191406,
+          4.122011184692383,
+          4.127115249633789,
+          4.13223123550415,
+          4.137360095977783,
+          4.1425018310546875,
+          4.147656440734863,
+          4.1528239250183105,
+          4.158004283905029,
+          4.1631975173950195,
+          4.168403625488281,
+          4.173623085021973,
+          4.178854942321777,
+          4.184100151062012,
+          4.189359188079834,
+          4.1946306228637695,
+          4.199915885925293,
+          4.205214023590088,
+          4.210526466369629,
+          4.215851306915283,
+          4.221189975738525,
+          4.2265424728393555,
+          4.231908321380615,
+          4.237287998199463,
+          4.24268102645874,
+          4.248088359832764,
+          4.253509044647217,
+          4.258944034576416,
+          4.264392375946045,
+          4.269854545593262,
+          4.275331497192383,
+          4.280821800231934,
+          4.2863264083862305,
+          4.291845321655273,
+          4.297379016876221,
+          4.302926063537598,
+          4.308487892150879,
+          4.314063549041748,
+          4.319654941558838,
+          4.325259208679199,
+          4.330878734588623,
+          4.336513042449951,
+          4.342162132263184,
+          4.34782600402832,
+          4.353504180908203,
+          4.359197616577148,
+          4.364906311035156,
+          4.37062931060791,
+          4.376367568969727,
+          4.382120609283447,
+          4.387889385223389,
+          4.393672943115234,
+          4.399472236633301,
+          4.4052863121032715,
+          4.411116123199463,
+          4.416961193084717,
+          4.422821521759033,
+          4.42869758605957,
+          4.434589862823486,
+          4.440497398376465,
+          4.446420669555664,
+          4.452359676361084,
+          4.458314895629883,
+          4.464285850524902,
+          4.470272541046143,
+          4.476275444030762,
+          4.482295036315918,
+          4.488330364227295,
+          4.494381904602051,
+          4.500450134277344,
+          4.506534576416016,
+          4.512635231018066,
+          4.518752574920654,
+          4.524886608123779,
+          4.531037330627441,
+          4.537204742431641,
+          4.543388843536377,
+          4.549590110778809,
+          4.5558085441589355,
+          4.5620436668396,
+          4.568295955657959,
+          4.5745649337768555,
+          4.580852031707764,
+          4.587155818939209,
+          4.593477249145508,
+          4.599815845489502,
+          4.606172561645508,
+          4.612545967102051,
+          4.6189374923706055,
+          4.625346660614014,
+          4.631774425506592,
+          4.638218879699707,
+          4.644681453704834,
+          4.651162624359131,
+          4.6576619148254395,
+          4.66417932510376,
+          4.670714378356934,
+          4.6772685050964355,
+          4.683840751647949,
+          4.690431594848633,
+          4.697041034698486,
+          4.703668594360352,
+          4.710315704345703,
+          4.716980934143066,
+          4.723665237426758,
+          4.730368614196777,
+          4.737091541290283,
+          4.743833065032959,
+          4.750593662261963,
+          4.757373809814453,
+          4.7641730308532715,
+          4.770992279052734,
+          4.777830600738525,
+          4.784688949584961,
+          4.791566848754883,
+          4.798464775085449,
+          4.805381774902344,
+          4.812319278717041,
+          4.819277286529541,
+          4.826254844665527,
+          4.833252906799316,
+          4.84027099609375,
+          4.8473100662231445,
+          4.854369163513184,
+          4.861448764801025,
+          4.86854887008667,
+          4.875670909881592,
+          4.8828125,
+          4.889975547790527,
+          4.897159576416016,
+          4.904365062713623,
+          4.911591529846191,
+          4.918838977813721,
+          4.926108360290527,
+          4.933399200439453,
+          4.94071102142334,
+          4.948045253753662,
+          4.955401420593262,
+          4.9627790451049805,
+          4.970178604125977,
+          4.977600574493408,
+          4.985044956207275,
+          4.99251127243042
+         ],
+         "xaxis": "x2",
+         "yaxis": "y2"
+        },
+        {
+         "nbinsx": 50,
+         "opacity": 0.7,
+         "type": "histogram",
+         "x": [
+          1.9999998807907104,
+          2.0023250579833984,
+          2.0046520233154297,
+          2.006979465484619,
+          2.0093090534210205,
+          2.0116395950317383,
+          2.0139718055725098,
+          2.0163047313690186,
+          2.0186398029327393,
+          2.020975351333618,
+          2.023313045501709,
+          2.025651693344116,
+          2.027991771697998,
+          2.0303330421447754,
+          2.0326759815216064,
+          2.035020112991333,
+          2.0373659133911133,
+          2.039712429046631,
+          2.0420608520507812,
+          2.0444107055664062,
+          2.0467615127563477,
+          2.0491137504577637,
+          2.051467180252075,
+          2.0538220405578613,
+          2.056178331375122,
+          2.0585358142852783,
+          2.060894727706909,
+          2.0632550716400146,
+          2.065617084503174,
+          2.0679800510406494,
+          2.0703446865081787,
+          2.0727100372314453,
+          2.0750772953033447,
+          2.0774457454681396,
+          2.0798158645629883,
+          2.082186698913574,
+          2.084559440612793,
+          2.086933135986328,
+          2.089308261871338,
+          2.0916848182678223,
+          2.094062566757202,
+          2.0964417457580566,
+          2.098822832107544,
+          2.1012046337127686,
+          2.1035878658294678,
+          2.1059725284576416,
+          2.108358860015869,
+          2.110746145248413,
+          2.1131350994110107,
+          2.1155247688293457,
+          2.1179163455963135,
+          2.1203091144561768,
+          2.1227030754089355,
+          2.125098466873169,
+          2.127495288848877,
+          2.1298933029174805,
+          2.132293224334717,
+          2.1346940994262695,
+          2.1370961666107178,
+          2.1394996643066406,
+          2.141904830932617,
+          2.1443111896514893,
+          2.146718978881836,
+          2.14912748336792,
+          2.151538133621216,
+          2.1539502143859863,
+          2.156363010406494,
+          2.1587769985198975,
+          2.1611931324005127,
+          2.1636102199554443,
+          2.1660284996032715,
+          2.1684482097625732,
+          2.1708693504333496,
+          2.1732916831970215,
+          2.175715684890747,
+          2.178140878677368,
+          2.180567741394043,
+          2.182995557785034,
+          2.1854248046875,
+          2.1878552436828613,
+          2.1902875900268555,
+          2.192720413208008,
+          2.195155382156372,
+          2.1975908279418945,
+          2.200028419494629,
+          2.2024667263031006,
+          2.204907178878784,
+          2.207348346710205,
+          2.209791421890259,
+          2.212235450744629,
+          2.2146809101104736,
+          2.217127561569214,
+          2.219576120376587,
+          2.2220258712768555,
+          2.2244765758514404,
+          2.226928472518921,
+          2.229382276535034,
+          2.231837034225464,
+          2.234293222427368,
+          2.236750841140747,
+          2.2392096519470215,
+          2.2416698932647705,
+          2.2441320419311523,
+          2.2465949058532715,
+          2.2490594387054443,
+          2.2515249252319336,
+          2.2539920806884766,
+          2.256460428237915,
+          2.2589306831359863,
+          2.2614011764526367,
+          2.263874053955078,
+          2.266347885131836,
+          2.2688229084014893,
+          2.2712996006011963,
+          2.2737772464752197,
+          2.2762563228607178,
+          2.2787370681762695,
+          2.281219005584717,
+          2.2837021350860596,
+          2.286186695098877,
+          2.288673162460327,
+          2.2911605834960938,
+          2.293649196624756,
+          2.2961390018463135,
+          2.298630475997925,
+          2.3011231422424316,
+          2.303617238998413,
+          2.30611252784729,
+          2.3086097240448,
+          2.3111073970794678,
+          2.3136072158813477,
+          2.3161075115203857,
+          2.318610429763794,
+          2.3211135864257812,
+          2.3236186504364014,
+          2.326124906539917,
+          2.328632354736328,
+          2.331141233444214,
+          2.3336517810821533,
+          2.3361637592315674,
+          2.338676691055298,
+          2.3411905765533447,
+          2.3437066078186035,
+          2.3462233543395996,
+          2.3487420082092285,
+          2.351261615753174,
+          2.3537826538085938,
+          2.3563051223754883,
+          2.3588292598724365,
+          2.361354112625122,
+          2.3638811111450195,
+          2.366408348083496,
+          2.3689379692077637,
+          2.3714685440063477,
+          2.374000310897827,
+          2.3765335083007812,
+          2.379068374633789,
+          2.3816041946411133,
+          2.384141445159912,
+          2.3866801261901855,
+          2.3892199993133545,
+          2.3917617797851562,
+          2.3943042755126953,
+          2.396848440170288,
+          2.3993937969207764,
+          2.40194034576416,
+          2.4044888019561768,
+          2.4070382118225098,
+          2.4095892906188965,
+          2.4121413230895996,
+          2.4146947860717773,
+          2.4172496795654297,
+          2.4198057651519775,
+          2.42236328125,
+          2.424922227859497,
+          2.4274823665618896,
+          2.430044412612915,
+          2.4326069355010986,
+          2.435171604156494,
+          2.437737464904785,
+          2.4403045177459717,
+          2.4428727626800537,
+          2.4454424381256104,
+          2.4480133056640625,
+          2.4505860805511475,
+          2.453160285949707,
+          2.455734968185425,
+          2.4583117961883545,
+          2.4608895778656006,
+          2.463468313217163,
+          2.4660491943359375,
+          2.468630790710449,
+          2.4712140560150146,
+          2.4737985134124756,
+          2.4763848781585693,
+          2.4789719581604004,
+          2.4815609455108643,
+          2.4841506481170654,
+          2.4867422580718994,
+          2.48933482170105,
+          2.491929292678833,
+          2.4945242404937744,
+          2.4971210956573486,
+          2.4997189044952393,
+          2.5023181438446045,
+          2.5049192905426025,
+          2.507521867752075,
+          2.510124921798706,
+          2.512730121612549,
+          2.515336036682129,
+          2.5179436206817627,
+          2.520552396774292,
+          2.523162603378296,
+          2.5257744789123535,
+          2.5283877849578857,
+          2.5310018062591553,
+          2.5336177349090576,
+          2.536234140396118,
+          2.5388529300689697,
+          2.5414724349975586,
+          2.544093608856201,
+          2.5467159748077393,
+          2.549339532852173,
+          2.5519649982452393,
+          2.5545918941497803,
+          2.5572192668914795,
+          2.5598485469818115,
+          2.562479019165039,
+          2.565110921859741,
+          2.567744493484497,
+          2.570378541946411,
+          2.573014736175537,
+          2.5756516456604004,
+          2.5782904624938965,
+          2.580930471420288,
+          2.5835721492767334,
+          2.586214780807495,
+          2.5888586044311523,
+          2.591503858566284,
+          2.5941505432128906,
+          2.5967986583709717,
+          2.5994484424591064,
+          2.6020994186401367,
+          2.6047515869140625,
+          2.607404947280884,
+          2.6100597381591797,
+          2.612715721130371,
+          2.615373373031616,
+          2.618032217025757,
+          2.620692253112793,
+          2.6233537197113037,
+          2.626016616821289,
+          2.6286816596984863,
+          2.631347179412842,
+          2.634014129638672,
+          2.6366825103759766,
+          2.6393520832061768,
+          2.6420233249664307,
+          2.64469575881958,
+          2.647369384765625,
+          2.6500449180603027,
+          2.6527209281921387,
+          2.6553988456726074,
+          2.6580777168273926,
+          2.6607584953308105,
+          2.663440227508545,
+          2.666123390197754,
+          2.6688082218170166,
+          2.6714937686920166,
+          2.6741812229156494,
+          2.676870107650757,
+          2.6795597076416016,
+          2.682251214981079,
+          2.684943914413452,
+          2.6876378059387207,
+          2.690333127975464,
+          2.6930301189422607,
+          2.695727825164795,
+          2.698427438735962,
+          2.7011282444000244,
+          2.7038307189941406,
+          2.706533193588257,
+          2.7092387676239014,
+          2.711944818496704,
+          2.7146522998809814,
+          2.7173614501953125,
+          2.720071315765381,
+          2.722783088684082,
+          2.725496530532837,
+          2.728210210800171,
+          2.730926275253296,
+          2.733643054962158,
+          2.736361265182495,
+          2.7390809059143066,
+          2.7418019771575928,
+          2.7445242404937744,
+          2.7472479343414307,
+          2.7499728202819824,
+          2.752700090408325,
+          2.755427360534668,
+          2.7581567764282227,
+          2.7608871459960938,
+          2.7636189460754395,
+          2.7663521766662598,
+          2.7690865993499756,
+          2.771822452545166,
+          2.7745602130889893,
+          2.7772979736328125,
+          2.780038595199585,
+          2.7827799320220947,
+          2.7855224609375,
+          2.78826642036438,
+          2.7910118103027344,
+          2.7937586307525635,
+          2.796506404876709,
+          2.7992560863494873,
+          2.8020071983337402,
+          2.8047587871551514,
+          2.8075125217437744,
+          2.810267210006714,
+          2.813023328781128,
+          2.8157806396484375,
+          2.818539619445801,
+          2.8212995529174805,
+          2.824061870574951,
+          2.8268239498138428,
+          2.8295888900756836,
+          2.8323545455932617,
+          2.8351213932037354,
+          2.8378896713256836,
+          2.8406591415405273,
+          2.8434300422668457,
+          2.8462023735046387,
+          2.8489761352539062,
+          2.8517513275146484,
+          2.854527473449707,
+          2.8573057651519775,
+          2.8600850105285645,
+          2.8628652095794678,
+          2.865647077560425,
+          2.8684301376342773,
+          2.8712146282196045,
+          2.8740007877349854,
+          2.8767879009246826,
+          2.8795769214630127,
+          2.882366418838501,
+          2.885157823562622,
+          2.8879504203796387,
+          2.89074444770813,
+          2.8935396671295166,
+          2.896336317062378,
+          2.8991341590881348,
+          2.9019343852996826,
+          2.9047341346740723,
+          2.9075369834899902,
+          2.9103403091430664,
+          2.913145065307617,
+          2.9159510135650635,
+          2.9187583923339844,
+          2.92156720161438,
+          2.92437744140625,
+          2.927189350128174,
+          2.930001974105835,
+          2.93281626701355,
+          2.93563175201416,
+          2.938448905944824,
+          2.941267251968384,
+          2.944086790084839,
+          2.9469077587127686,
+          2.9497299194335938,
+          2.9525539875030518,
+          2.955378532409668,
+          2.9582056999206543,
+          2.9610331058502197,
+          2.963862419128418,
+          2.9666926860809326,
+          2.969524621963501,
+          2.9723575115203857,
+          2.975192070007324,
+          2.978027820587158,
+          2.980865240097046,
+          2.983703374862671,
+          2.986544132232666,
+          2.9893853664398193,
+          2.992227792739868,
+          2.9950716495513916,
+          2.9979169368743896,
+          3.000763416290283,
+          3.0036113262176514,
+          3.006460666656494,
+          3.009312152862549,
+          3.0121636390686035,
+          3.015017509460449,
+          3.0178720951080322,
+          3.020728349685669,
+          3.023585557937622,
+          3.026444435119629,
+          3.0293045043945312,
+          3.0321667194366455,
+          3.0350286960601807,
+          3.037893772125244,
+          3.0407583713531494,
+          3.043626070022583,
+          3.046494245529175,
+          3.049363851547241,
+          3.052234649658203,
+          3.0551068782806396,
+          3.057981014251709,
+          3.0608558654785156,
+          3.063732147216797,
+          3.0666098594665527,
+          3.0694892406463623,
+          3.072369337081909,
+          3.075251340866089,
+          3.078134298324585,
+          3.0810189247131348,
+          3.083904504776001,
+          3.086791753768921,
+          3.0896809101104736,
+          3.0925700664520264,
+          3.0954620838165283,
+          3.0983545780181885,
+          3.101248264312744,
+          3.1041436195373535,
+          3.1070401668548584,
+          3.109938144683838,
+          3.112837791442871,
+          3.1157379150390625,
+          3.118640661239624,
+          3.121544122695923,
+          3.124448776245117,
+          3.127354860305786,
+          3.1302621364593506,
+          3.1331708431243896,
+          3.1360809803009033,
+          3.1389923095703125,
+          3.1419055461883545,
+          3.1448192596435547,
+          3.147735595703125,
+          3.1506524085998535,
+          3.1535706520080566,
+          3.1564900875091553,
+          3.1594109535217285,
+          3.1623332500457764,
+          3.165257692337036,
+          3.1681816577911377,
+          3.1711089611053467,
+          3.1740360260009766,
+          3.1769649982452393,
+          3.1798958778381348,
+          3.1828272342681885,
+          3.185760498046875,
+          3.1886954307556152,
+          3.1916308403015137,
+          3.194568634033203,
+          3.1975061893463135,
+          3.200446844100952,
+          3.203387975692749,
+          3.2063305377960205,
+          3.2092742919921875,
+          3.212219476699829,
+          3.2151660919189453,
+          3.2181143760681152,
+          3.2210633754730225,
+          3.2240142822265625,
+          3.226966381072998,
+          3.229919672012329,
+          3.232874631881714,
+          3.235830545425415,
+          3.23878812789917,
+          3.241746664047241,
+          3.244706869125366,
+          3.247668981552124,
+          3.2506308555603027,
+          3.2535958290100098,
+          3.256561279296875,
+          3.259528160095215,
+          3.26249623298645,
+          3.26546573638916,
+          3.2684366703033447,
+          3.271409034729004,
+          3.2743828296661377,
+          3.277357339859009,
+          3.280333995819092,
+          3.2833120822906494,
+          3.2862911224365234,
+          3.289271354675293,
+          3.292253017425537,
+          3.295236110687256,
+          3.29822039604187,
+          3.301206588745117,
+          3.3041932582855225,
+          3.3071820735931396,
+          3.3101718425750732,
+          3.3131635189056396,
+          3.3161559104919434,
+          3.3191492557525635,
+          3.3221449851989746,
+          3.325141429901123,
+          3.328139305114746,
+          3.3311386108398438,
+          3.334139108657837,
+          3.337141990661621,
+          3.3401453495025635,
+          3.343149423599243,
+          3.3461554050445557,
+          3.349163293838501,
+          3.3521718978881836,
+          3.355181932449341,
+          3.3581933975219727,
+          3.3612060546875,
+          3.364220142364502,
+          3.3672356605529785,
+          3.370253324508667,
+          3.3732714653015137,
+          3.376291036605835,
+          3.3793118000030518,
+          3.382333993911743,
+          3.385357618331909,
+          3.3883824348449707,
+          3.391409158706665,
+          3.3944365978240967,
+          3.397465705871582,
+          3.400496006011963,
+          3.4035279750823975,
+          3.4065611362457275,
+          3.409595489501953,
+          3.412631034851074,
+          3.415668249130249,
+          3.4187066555023193,
+          3.421746253967285,
+          3.424788236618042,
+          3.427830696105957,
+          3.4308745861053467,
+          3.433919668197632,
+          3.4369661808013916,
+          3.440014123916626,
+          3.443063259124756,
+          3.4461138248443604,
+          3.4491662979125977,
+          3.452219009399414,
+          3.4552736282348633,
+          3.4583306312561035,
+          3.461387872695923,
+          3.464446544647217,
+          3.4675066471099854,
+          3.4705679416656494,
+          3.473630666732788,
+          3.4766948223114014,
+          3.4797606468200684,
+          3.4828274250030518,
+          3.4858953952789307,
+          3.4889655113220215,
+          3.4920363426208496,
+          3.4951083660125732,
+          3.4981822967529297,
+          3.5012567043304443,
+          3.504333019256592,
+          3.5074105262756348,
+          3.5104904174804688,
+          3.513570785522461,
+          3.5166523456573486,
+          3.5197348594665527,
+          3.522819757461548,
+          3.5259053707122803,
+          3.5289924144744873,
+          3.532081127166748,
+          3.5351710319519043,
+          3.538261651992798,
+          3.541353940963745,
+          3.5444488525390625,
+          3.547544002532959,
+          3.550640344619751,
+          3.5537381172180176,
+          3.556837320327759,
+          3.5599379539489746,
+          3.563039779663086,
+          3.56614351272583,
+          3.5692481994628906,
+          3.5723540782928467,
+          3.5754618644714355,
+          3.578570604324341,
+          3.5816805362701416,
+          3.584791898727417,
+          3.587904930114746,
+          3.5910186767578125,
+          3.5941340923309326,
+          3.5972516536712646,
+          3.600369691848755,
+          3.6034891605377197,
+          3.606610059738159,
+          3.609732151031494,
+          3.6128556728363037,
+          3.615980625152588,
+          3.6191067695617676,
+          3.6222352981567383,
+          3.62536358833313,
+          3.6284940242767334,
+          3.6316261291503906,
+          3.634758949279785,
+          3.6378931999206543,
+          3.641028881072998,
+          3.6441659927368164,
+          3.6473042964935303,
+          3.6504440307617188,
+          3.6535861492156982,
+          3.6567280292510986,
+          3.65987229347229,
+          3.6630170345306396,
+          3.666163921356201,
+          3.669311761856079,
+          3.6724607944488525,
+          3.675611734390259,
+          3.6787636280059814,
+          3.6819164752960205,
+          3.6850714683532715,
+          3.688227891921997,
+          3.691385269165039,
+          3.6945438385009766,
+          3.6977038383483887,
+          3.7008650302886963,
+          3.7040278911590576,
+          3.7071919441223145,
+          3.710358142852783,
+          3.713524341583252,
+          3.7166924476623535,
+          3.7198615074157715,
+          3.7230331897735596,
+          3.726205348968506,
+          3.7293789386749268,
+          3.732553720474243,
+          3.735729932785034,
+          3.7389073371887207,
+          3.742086410522461,
+          3.745266914367676,
+          3.7484490871429443,
+          3.75163197517395,
+          3.7548162937164307,
+          3.7580020427703857,
+          3.7611889839172363,
+          3.7643773555755615,
+          3.7675673961639404,
+          3.770758628845215,
+          3.7739508152008057,
+          3.7771451473236084,
+          3.7803401947021484,
+          3.783536672592163,
+          3.7867345809936523,
+          3.789933681488037,
+          3.7931342124938965,
+          3.7963359355926514,
+          3.7995402812957764,
+          3.8027443885803223,
+          3.805950164794922,
+          3.809157371520996,
+          3.812366485595703,
+          3.8155765533447266,
+          3.8187878131866455,
+          3.822000503540039,
+          3.8252148628234863,
+          3.828429937362671,
+          3.831646680831909,
+          3.834865093231201,
+          3.8380849361419678,
+          3.841305732727051,
+          3.84452748298645,
+          3.8477513790130615,
+          3.8509762287139893,
+          3.8542022705078125,
+          3.8574302196502686,
+          3.860659122467041,
+          3.863889455795288,
+          3.8671209812164307,
+          3.870354413986206,
+          3.873588800430298,
+          3.876824378967285,
+          3.8800618648529053,
+          3.8832995891571045,
+          3.8865392208099365,
+          3.8897812366485596,
+          3.893023729324341,
+          3.8962669372558594,
+          3.8995120525360107,
+          3.902758836746216,
+          3.9060068130493164,
+          3.9092557430267334,
+          3.912506341934204,
+          3.9157586097717285,
+          3.9190118312835693,
+          3.9222660064697266,
+          3.9255218505859375,
+          3.9287800788879395,
+          3.9320385456085205,
+          3.935297966003418,
+          3.9385597705841064,
+          3.9418225288391113,
+          3.9450864791870117,
+          3.9483518600463867,
+          3.9516189098358154,
+          3.9548871517181396,
+          3.9581563472747803,
+          3.961427688598633,
+          3.9646997451782227,
+          3.967973232269287,
+          3.9712483882904053,
+          3.974524736404419,
+          3.97780179977417,
+          3.981081008911133,
+          3.9843616485595703,
+          3.987643241882324,
+          3.9909257888793945,
+          3.9942104816436768,
+          3.9974961280822754,
+          4.0007829666137695,
+          4.004071235656738,
+          4.007361888885498,
+          4.010653018951416,
+          4.01394510269165,
+          4.017238140106201,
+          4.020534038543701,
+          4.023830413818359,
+          4.027128219604492,
+          4.0304274559021,
+          4.033727645874023,
+          4.03702974319458,
+          4.040332794189453,
+          4.043638229370117,
+          4.0469441413879395,
+          4.050251483917236,
+          4.053560256958008,
+          4.056869983673096,
+          4.060181140899658,
+          4.063493728637695,
+          4.066807746887207,
+          4.070123195648193,
+          4.073440074920654,
+          4.076758861541748,
+          4.080078125,
+          4.083398818969727,
+          4.086720943450928,
+          4.0900444984436035,
+          4.093369483947754,
+          4.096695423126221,
+          4.1000237464904785,
+          4.1033525466918945,
+          4.106681823730469,
+          4.110013484954834,
+          4.11334753036499,
+          4.1166815757751465,
+          4.120017051696777,
+          4.123353958129883,
+          4.126692295074463,
+          4.130032062530518,
+          4.133372783660889,
+          4.136716365814209,
+          4.140059947967529,
+          4.143404960632324,
+          4.146751403808594,
+          4.150099277496338,
+          4.153448104858398,
+          4.156798839569092,
+          4.160150527954102,
+          4.163503646850586,
+          4.166858196258545,
+          4.1702141761779785,
+          4.173572063446045,
+          4.176930904388428,
+          4.180290699005127,
+          4.183651924133301,
+          4.187014579772949,
+          4.190378665924072,
+          4.193743705749512,
+          4.1971116065979,
+          4.200479507446289,
+          4.203847885131836,
+          4.20721960067749,
+          4.210591793060303,
+          4.213964939117432,
+          4.217339992523193,
+          4.2207159996032715,
+          4.224093437194824,
+          4.227472305297852,
+          4.2308526039123535,
+          4.234234809875488,
+          4.2376179695129395,
+          4.241002082824707,
+          4.244387626647949,
+          4.247774600982666,
+          4.251163005828857,
+          4.254552364349365,
+          4.257943630218506,
+          4.261336803436279,
+          4.2647294998168945,
+          4.268125534057617,
+          4.27152156829834,
+          4.274919509887695,
+          4.278318405151367,
+          4.281719207763672,
+          4.285120964050293,
+          4.288524150848389,
+          4.291929244995117,
+          4.295335292816162,
+          4.298742294311523,
+          4.302151203155518,
+          4.305561065673828,
+          4.308972358703613,
+          4.312384605407715,
+          4.315799713134766,
+          4.3192138671875,
+          4.322630405426025,
+          4.326048374176025,
+          4.329468727111816,
+          4.332889556884766,
+          4.3363118171691895,
+          4.33973503112793,
+          4.3431596755981445,
+          4.346585750579834,
+          4.350013256072998,
+          4.353443145751953,
+          4.356873512268066,
+          4.360304832458496,
+          4.363736629486084,
+          4.367171764373779,
+          4.370607376098633,
+          4.374044418334961,
+          4.3774824142456055,
+          4.380922317504883,
+          4.384363174438477,
+          4.387806415557861,
+          4.391250133514404,
+          4.394695281982422,
+          4.398141384124756,
+          4.401589393615723,
+          4.405038356781006,
+          4.408488750457764,
+          4.4119415283203125,
+          4.4153947830200195,
+          4.418848037719727,
+          4.422303676605225,
+          4.425762176513672,
+          4.429220676422119,
+          4.432680606842041,
+          4.436141490936279,
+          4.43960428237915,
+          4.443068027496338,
+          4.446533203125,
+          4.449999809265137,
+          4.4534687995910645,
+          4.45693826675415,
+          4.460409164428711,
+          4.463881015777588,
+          4.4673542976379395,
+          4.470829010009766,
+          4.474305152893066,
+          4.477782726287842,
+          4.481261253356934,
+          4.484741687774658,
+          4.488224029541016,
+          4.491706848144531,
+          4.4951910972595215,
+          4.498676776885986,
+          4.502163410186768,
+          4.505651950836182,
+          4.509141445159912,
+          4.512633323669434,
+          4.516125679016113,
+          4.519618034362793,
+          4.523114204406738,
+          4.526610374450684,
+          4.530108451843262,
+          4.533607482910156,
+          4.537107467651367,
+          4.540609359741211,
+          4.544112682342529,
+          4.547616958618164,
+          4.55112361907959,
+          4.554630756378174,
+          4.558139324188232,
+          4.561649322509766,
+          4.565160274505615,
+          4.568673133850098,
+          4.5721869468688965,
+          4.57570219039917,
+          4.579218864440918,
+          4.582736968994141,
+          4.586256980895996,
+          4.589777946472168,
+          4.593299865722656,
+          4.596823215484619,
+          4.600347995758057,
+          4.6038737297058105,
+          4.607401371002197,
+          4.610930919647217,
+          4.614461421966553,
+          4.617992877960205,
+          4.621525287628174,
+          4.625059604644775,
+          4.628593921661377,
+          4.632132053375244,
+          4.635670185089111,
+          4.639209747314453,
+          4.642751693725586,
+          4.6462931632995605,
+          4.649836540222168,
+          4.653382778167725,
+          4.656929016113281,
+          4.6604766845703125,
+          4.664025783538818,
+          4.667575836181641,
+          4.671127796173096,
+          4.674680709838867,
+          4.6782355308532715,
+          4.681791305541992,
+          4.685349464416504,
+          4.688906669616699,
+          4.69246768951416,
+          4.696028709411621,
+          4.699591159820557,
+          4.703155040740967,
+          4.706721305847168,
+          4.710287094116211,
+          4.713855743408203,
+          4.717424392700195,
+          4.720995903015137,
+          4.724567890167236,
+          4.7281413078308105,
+          4.731715679168701,
+          4.735292911529541,
+          4.7388691902160645,
+          4.742447853088379,
+          4.746027946472168,
+          4.749609470367432,
+          4.753193378448486,
+          4.756777763366699,
+          4.7603631019592285,
+          4.763949871063232,
+          4.767538070678711,
+          4.7711286544799805,
+          4.774718761444092,
+          4.778310775756836,
+          4.781904697418213,
+          4.785500526428223,
+          4.789095878601074,
+          4.792693614959717,
+          4.796293258666992,
+          4.799893856048584,
+          4.803495407104492,
+          4.80709981918335,
+          4.810702800750732,
+          4.814309597015381,
+          4.817915916442871,
+          4.821525573730469,
+          4.825135231018066,
+          4.828746318817139,
+          4.832359790802002,
+          4.835973739624023,
+          4.839588165283203,
+          4.843204498291016,
+          4.846823692321777,
+          4.850442886352539,
+          4.854063510894775,
+          4.857684135437012,
+          4.861308574676514,
+          4.864933490753174,
+          4.86855936050415,
+          4.872187614440918,
+          4.875815391540527,
+          4.879445552825928,
+          4.883078098297119,
+          4.8867106437683105,
+          4.89034366607666,
+          4.893980503082275,
+          4.897617340087891,
+          4.9012556076049805,
+          4.904894828796387,
+          4.908535957336426,
+          4.912178039550781,
+          4.915822505950928,
+          4.919466495513916,
+          4.923113822937012,
+          4.926761627197266,
+          4.930410385131836,
+          4.934061050415039,
+          4.937713623046875,
+          4.941365718841553,
+          4.945021152496338,
+          4.948677062988281,
+          4.952333927154541,
+          4.955991268157959,
+          4.959651947021484,
+          4.963313102722168,
+          4.966975688934326,
+          4.970639705657959,
+          4.974304676055908,
+          4.977972507476807,
+          4.981639385223389,
+          4.985309600830078,
+          4.988980293273926,
+          4.992652416229248,
+          4.996325492858887
+         ],
+         "xaxis": "x3",
+         "yaxis": "y3"
+        },
+        {
+         "nbinsx": 50,
+         "opacity": 0.7,
+         "type": "histogram",
+         "x": [
+          2,
+          2.001833438873291,
+          2.0036685466766357,
+          2.005505323410034,
+          2.0073437690734863,
+          2.009183883666992,
+          2.011025905609131,
+          2.012869119644165,
+          2.014714479446411,
+          2.016561508178711,
+          2.0184099674224854,
+          2.0202603340148926,
+          2.0221123695373535,
+          2.023966073989868,
+          2.0258214473724365,
+          2.0276784896850586,
+          2.0295372009277344,
+          2.031397819519043,
+          2.033259868621826,
+          2.0351240634918213,
+          2.036989688873291,
+          2.0388569831848145,
+          2.0407259464263916,
+          2.0425965785980225,
+          2.044469118118286,
+          2.0463433265686035,
+          2.0482192039489746,
+          2.0500967502593994,
+          2.051976203918457,
+          2.0538573265075684,
+          2.0557401180267334,
+          2.057624340057373,
+          2.0595107078552246,
+          2.06139874458313,
+          2.063288450241089,
+          2.0651798248291016,
+          2.067073106765747,
+          2.0689680576324463,
+          2.070864677429199,
+          2.072763204574585,
+          2.0746631622314453,
+          2.0765652656555176,
+          2.0784685611724854,
+          2.080374002456665,
+          2.0822811126708984,
+          2.0841898918151855,
+          2.0861005783081055,
+          2.088012933731079,
+          2.0899269580841064,
+          2.0918428897857666,
+          2.0937604904174805,
+          2.095679759979248,
+          2.0976009368896484,
+          2.0995237827301025,
+          2.1014485359191895,
+          2.10337495803833,
+          2.1053032875061035,
+          2.1072332859039307,
+          2.1091647148132324,
+          2.111098289489746,
+          2.1130335330963135,
+          2.1149706840515137,
+          2.1169095039367676,
+          2.118849992752075,
+          2.1207923889160156,
+          2.122736692428589,
+          2.124682664871216,
+          2.1266300678253174,
+          2.128579616546631,
+          2.130530834197998,
+          2.132483959197998,
+          2.134438991546631,
+          2.1363956928253174,
+          2.1383540630340576,
+          2.1403143405914307,
+          2.1422765254974365,
+          2.144240379333496,
+          2.1462059020996094,
+          2.1481733322143555,
+          2.1501426696777344,
+          2.152113676071167,
+          2.1540863513946533,
+          2.1560611724853516,
+          2.1580376625061035,
+          2.1600160598754883,
+          2.1619961261749268,
+          2.163978099822998,
+          2.165961742401123,
+          2.167947292327881,
+          2.1699347496032715,
+          2.171923875808716,
+          2.173914909362793,
+          2.175907850265503,
+          2.1779024600982666,
+          2.179898977279663,
+          2.1818971633911133,
+          2.1838972568511963,
+          2.185899496078491,
+          2.1879031658172607,
+          2.189908981323242,
+          2.1919164657592773,
+          2.1939258575439453,
+          2.195936918258667,
+          2.1979501247406006,
+          2.199965000152588,
+          2.201981544494629,
+          2.204000234603882,
+          2.2060208320617676,
+          2.208043098449707,
+          2.2100670337677,
+          2.2120931148529053,
+          2.214120864868164,
+          2.2161505222320557,
+          2.218182325363159,
+          2.2202155590057373,
+          2.2222509384155273,
+          2.22428822517395,
+          2.2263271808624268,
+          2.228368043899536,
+          2.2304108142852783,
+          2.2324554920196533,
+          2.234502077102661,
+          2.2365503311157227,
+          2.238600492477417,
+          2.2406527996063232,
+          2.242706775665283,
+          2.244762659072876,
+          2.2468204498291016,
+          2.248880386352539,
+          2.250941753387451,
+          2.253005266189575,
+          2.255070686340332,
+          2.2571377754211426,
+          2.259207010269165,
+          2.261277914047241,
+          2.2633509635925293,
+          2.26542592048645,
+          2.267502546310425,
+          2.2695813179016113,
+          2.2716617584228516,
+          2.2737441062927246,
+          2.2758283615112305,
+          2.2779147624969482,
+          2.2800028324127197,
+          2.2820932865142822,
+          2.2841851711273193,
+          2.2862789630889893,
+          2.288374900817871,
+          2.2904727458953857,
+          2.292572259902954,
+          2.2946739196777344,
+          2.2967774868011475,
+          2.2988831996917725,
+          2.300990581512451,
+          2.3030998706817627,
+          2.305211067199707,
+          2.3073244094848633,
+          2.3094394207000732,
+          2.311556577682495,
+          2.3136754035949707,
+          2.3157966136932373,
+          2.3179194927215576,
+          2.32004451751709,
+          2.322171211242676,
+          2.3242998123168945,
+          2.326430559158325,
+          2.3285632133483887,
+          2.330698013305664,
+          2.332834482192993,
+          2.334972858428955,
+          2.337113618850708,
+          2.3392558097839355,
+          2.341400384902954,
+          2.3435468673706055,
+          2.3456952571868896,
+          2.3478455543518066,
+          2.3499977588653564,
+          2.352151870727539,
+          2.3543083667755127,
+          2.356466293334961,
+          2.3586268424987793,
+          2.3607888221740723,
+          2.362952947616577,
+          2.365119218826294,
+          2.3672873973846436,
+          2.369457483291626,
+          2.371629476547241,
+          2.3738036155700684,
+          2.3759796619415283,
+          2.3781578540802,
+          2.380337953567505,
+          2.3825199604034424,
+          2.3847038745880127,
+          2.386890172958374,
+          2.389078140258789,
+          2.391268253326416,
+          2.393460512161255,
+          2.3956544399261475,
+          2.397850513458252,
+          2.4000487327575684,
+          2.4022488594055176,
+          2.4044508934020996,
+          2.4066553115844727,
+          2.4088613986968994,
+          2.411069631576538,
+          2.4132800102233887,
+          2.415492296218872,
+          2.4177064895629883,
+          2.4199228286743164,
+          2.4221413135528564,
+          2.4243617057800293,
+          2.426584005355835,
+          2.4288084506988525,
+          2.431035041809082,
+          2.4332635402679443,
+          2.4354941844940186,
+          2.4377267360687256,
+          2.4399616718292236,
+          2.4421985149383545,
+          2.444437265396118,
+          2.4466779232025146,
+          2.448920726776123,
+          2.4511656761169434,
+          2.4534127712249756,
+          2.4556617736816406,
+          2.4579129219055176,
+          2.4601662158966064,
+          2.462421417236328,
+          2.4646787643432617,
+          2.4669382572174072,
+          2.4691996574401855,
+          2.4714629650115967,
+          2.473728895187378,
+          2.475996494293213,
+          2.4782662391662598,
+          2.4805381298065186,
+          2.48281192779541,
+          2.4850881099700928,
+          2.487366199493408,
+          2.4896464347839355,
+          2.4919285774230957,
+          2.494213104248047,
+          2.496499538421631,
+          2.4987881183624268,
+          2.5010786056518555,
+          2.503371477127075,
+          2.5056662559509277,
+          2.5079634189605713,
+          2.5102622509002686,
+          2.512563705444336,
+          2.514866828918457,
+          2.51717209815979,
+          2.519479751586914,
+          2.52178955078125,
+          2.5241012573242188,
+          2.5264151096343994,
+          2.528730869293213,
+          2.5310492515563965,
+          2.533369302749634,
+          2.535691738128662,
+          2.5380163192749023,
+          2.5403428077697754,
+          2.5426716804504395,
+          2.5450026988983154,
+          2.547335624694824,
+          2.549670696258545,
+          2.5520079135894775,
+          2.554347515106201,
+          2.5566890239715576,
+          2.559032917022705,
+          2.5613789558410645,
+          2.5637266635894775,
+          2.5660769939422607,
+          2.5684292316436768,
+          2.570783853530884,
+          2.5731403827667236,
+          2.5754995346069336,
+          2.5778603553771973,
+          2.580223798751831,
+          2.5825886726379395,
+          2.584956169128418,
+          2.5873258113861084,
+          2.58969783782959,
+          2.592071771621704,
+          2.5944480895996094,
+          2.5968263149261475,
+          2.5992069244384766,
+          2.6015896797180176,
+          2.6039745807647705,
+          2.6063616275787354,
+          2.608750820159912,
+          2.61114239692688,
+          2.6135358810424805,
+          2.615931987762451,
+          2.6183300018310547,
+          2.62073016166687,
+          2.6231327056884766,
+          2.625537157058716,
+          2.627944231033325,
+          2.6303532123565674,
+          2.6327643394470215,
+          2.6351780891418457,
+          2.6375935077667236,
+          2.6400115489959717,
+          2.6424317359924316,
+          2.6448538303375244,
+          2.6472787857055664,
+          2.649705410003662,
+          2.652134656906128,
+          2.6545655727386475,
+          2.656999111175537,
+          2.6594347953796387,
+          2.661872625350952,
+          2.6643130779266357,
+          2.666755437850952,
+          2.6691999435424805,
+          2.6716468334198,
+          2.674095869064331,
+          2.6765475273132324,
+          2.6790008544921875,
+          2.6814568042755127,
+          2.68391489982605,
+          2.686375379562378,
+          2.688838005065918,
+          2.691303014755249,
+          2.693769931793213,
+          2.696239471435547,
+          2.6987109184265137,
+          2.7011852264404297,
+          2.7036612033843994,
+          2.70613956451416,
+          2.708620548248291,
+          2.7111034393310547,
+          2.7135889530181885,
+          2.716076374053955,
+          2.718566417694092,
+          2.7210583686828613,
+          2.723552703857422,
+          2.7260496616363525,
+          2.728548526763916,
+          2.7310500144958496,
+          2.733553409576416,
+          2.7360594272613525,
+          2.7385671138763428,
+          2.7410778999328613,
+          2.7435903549194336,
+          2.746105670928955,
+          2.7486228942871094,
+          2.751142978668213,
+          2.75366473197937,
+          2.7561888694763184,
+          2.7587156295776367,
+          2.761244535446167,
+          2.763775587081909,
+          2.7663094997406006,
+          2.768845558166504,
+          2.771383762359619,
+          2.7739243507385254,
+          2.7764670848846436,
+          2.779012680053711,
+          2.781559944152832,
+          2.7841098308563232,
+          2.7866618633270264,
+          2.7892162799835205,
+          2.7917733192443848,
+          2.794332504272461,
+          2.7968943119049072,
+          2.7994580268859863,
+          2.8020246028900146,
+          2.804593086242676,
+          2.807164192199707,
+          2.80973744392395,
+          2.8123130798339844,
+          2.8148913383483887,
+          2.817471742630005,
+          2.820054769515991,
+          2.8226397037506104,
+          2.8252270221710205,
+          2.82781720161438,
+          2.830409288406372,
+          2.8330042362213135,
+          2.8356010913848877,
+          2.838200569152832,
+          2.8408024311065674,
+          2.8434064388275146,
+          2.846013307571411,
+          2.8486220836639404,
+          2.851233720779419,
+          2.8538472652435303,
+          2.8564634323120117,
+          2.8590822219848633,
+          2.8617029190063477,
+          2.8643264770507812,
+          2.8669521808624268,
+          2.8695805072784424,
+          2.87221097946167,
+          2.8748438358306885,
+          2.877479076385498,
+          2.8801169395446777,
+          2.8827571868896484,
+          2.8854000568389893,
+          2.888044834136963,
+          2.8906922340393066,
+          2.8933424949645996,
+          2.8959946632385254,
+          2.8986496925354004,
+          2.901306629180908,
+          2.9039666652679443,
+          2.9066286087036133,
+          2.9092929363250732,
+          2.9119601249694824,
+          2.9146294593811035,
+          2.9173014163970947,
+          2.919975757598877,
+          2.9226527214050293,
+          2.9253318309783936,
+          2.928013324737549,
+          2.930697202682495,
+          2.933384418487549,
+          2.936073064804077,
+          2.938764810562134,
+          2.9414587020874023,
+          2.944154977798462,
+          2.9468541145324707,
+          2.9495556354522705,
+          2.9522595405578613,
+          2.954965591430664,
+          2.957674741744995,
+          2.960386037826538,
+          2.963099479675293,
+          2.965816020965576,
+          2.9685347080230713,
+          2.9712560176849365,
+          2.973979949951172,
+          2.9767065048217773,
+          2.9794349670410156,
+          2.982166051864624,
+          2.9848997592926025,
+          2.9876363277435303,
+          2.990375280380249,
+          2.9931163787841797,
+          2.9958600997924805,
+          2.9986066818237305,
+          3.0013554096221924,
+          3.0041069984436035,
+          3.0068607330322266,
+          3.0096170902252197,
+          3.012376308441162,
+          3.0151374340057373,
+          3.017901659011841,
+          3.0206682682037354,
+          3.023437023162842,
+          3.0262088775634766,
+          3.0289828777313232,
+          3.031759738922119,
+          3.034538984298706,
+          3.037320613861084,
+          3.040104866027832,
+          3.0428919792175293,
+          3.0456814765930176,
+          3.048473358154297,
+          3.0512678623199463,
+          3.054065227508545,
+          3.0568647384643555,
+          3.0596671104431152,
+          3.062471866607666,
+          3.065279245376587,
+          3.068089246749878,
+          3.070901870727539,
+          3.0737171173095703,
+          3.0765347480773926,
+          3.079354763031006,
+          3.0821778774261475,
+          3.085003137588501,
+          3.087831497192383,
+          3.0906620025634766,
+          3.0934951305389404,
+          3.0963311195373535,
+          3.0991697311401367,
+          3.102010726928711,
+          3.104854106903076,
+          3.1077003479003906,
+          3.1105494499206543,
+          3.11340069770813,
+          3.116255044937134,
+          3.1191115379333496,
+          3.1219706535339355,
+          3.12483286857605,
+          3.127697229385376,
+          3.1305646896362305,
+          3.133434534072876,
+          3.1363067626953125,
+          3.1391820907592773,
+          3.1420600414276123,
+          3.144940137863159,
+          3.1478230953216553,
+          3.1507084369659424,
+          3.153597116470337,
+          3.1564881801605225,
+          3.159381628036499,
+          3.1622776985168457,
+          3.1651768684387207,
+          3.1680781841278076,
+          3.1709823608398438,
+          3.173888921737671,
+          3.1767988204956055,
+          3.179710865020752,
+          3.1826255321502686,
+          3.1855432987213135,
+          3.1884634494781494,
+          3.1913864612579346,
+          3.1943118572235107,
+          3.1972403526306152,
+          3.2001712322235107,
+          3.2031047344207764,
+          3.2060413360595703,
+          3.208980083465576,
+          3.2119216918945312,
+          3.2148663997650146,
+          3.217813491821289,
+          3.2207632064819336,
+          3.2237155437469482,
+          3.226670742034912,
+          3.229628801345825,
+          3.2325897216796875,
+          3.2355527877807617,
+          3.238518714904785,
+          3.241487741470337,
+          3.244459629058838,
+          3.247433662414551,
+          3.250410318374634,
+          3.253390312194824,
+          3.2563726902008057,
+          3.2593576908111572,
+          3.262345790863037,
+          3.265336275100708,
+          3.268329381942749,
+          3.2713253498077393,
+          3.274324417114258,
+          3.2773263454437256,
+          3.2803304195404053,
+          3.283337354660034,
+          3.2863476276397705,
+          3.289360284805298,
+          3.2923755645751953,
+          3.295393705368042,
+          3.298414468765259,
+          3.301438331604004,
+          3.30446457862854,
+          3.3074941635131836,
+          3.310525894165039,
+          3.3135604858398438,
+          3.316598415374756,
+          3.319638729095459,
+          3.3226819038391113,
+          3.325727701187134,
+          3.3287768363952637,
+          3.3318281173706055,
+          3.3348822593688965,
+          3.337939739227295,
+          3.3409993648529053,
+          3.344061851501465,
+          3.347127676010132,
+          3.350196361541748,
+          3.3532674312591553,
+          3.3563411235809326,
+          3.359417676925659,
+          3.362497568130493,
+          3.365579843521118,
+          3.3686654567718506,
+          3.371753215789795,
+          3.374844551086426,
+          3.3779380321502686,
+          3.3810346126556396,
+          3.384134292602539,
+          3.3872363567352295,
+          3.390341281890869,
+          3.393449544906616,
+          3.3965601921081543,
+          3.3996739387512207,
+          3.4027903079986572,
+          3.405909538269043,
+          3.409032106399536,
+          3.4121572971343994,
+          3.415285110473633,
+          3.4184157848358154,
+          3.4215493202209473,
+          3.4246866703033447,
+          3.427825927734375,
+          3.4309680461883545,
+          3.434113025665283,
+          3.4372613430023193,
+          3.4404122829437256,
+          3.443565845489502,
+          3.446722984313965,
+          3.4498822689056396,
+          3.453045129776001,
+          3.4562103748321533,
+          3.459378957748413,
+          3.462550163269043,
+          3.465724229812622,
+          3.4689009189605713,
+          3.472081184387207,
+          3.475264310836792,
+          3.478450059890747,
+          3.4816386699676514,
+          3.484830141067505,
+          3.488024950027466,
+          3.4912221431732178,
+          3.4944229125976562,
+          3.4976260662078857,
+          3.5008327960968018,
+          3.504041910171509,
+          3.507254123687744,
+          3.5104691982269287,
+          3.5136871337890625,
+          3.5169084072113037,
+          3.520132303237915,
+          3.5233592987060547,
+          3.5265891551971436,
+          3.52982234954834,
+          3.533057928085327,
+          3.5362966060638428,
+          3.539538621902466,
+          3.542782783508301,
+          3.5460307598114014,
+          3.549281120300293,
+          3.5525355339050293,
+          3.5557916164398193,
+          3.559051513671875,
+          3.5623137950897217,
+          3.565579414367676,
+          3.568848133087158,
+          3.572119951248169,
+          3.57539439201355,
+          3.578671932220459,
+          3.5819528102874756,
+          3.585236072540283,
+          3.5885231494903564,
+          3.5918126106262207,
+          3.595104932785034,
+          3.598400831222534,
+          3.6016998291015625,
+          3.605001449584961,
+          3.6083059310913086,
+          3.6116139888763428,
+          3.614924192428589,
+          3.618238687515259,
+          3.6215555667877197,
+          3.624875545501709,
+          3.6281979084014893,
+          3.6315243244171143,
+          3.6348536014556885,
+          3.6381850242614746,
+          3.6415205001831055,
+          3.6448590755462646,
+          3.648200035095215,
+          3.6515438556671143,
+          3.6548914909362793,
+          3.6582422256469727,
+          3.6615960597991943,
+          3.664952039718628,
+          3.6683120727539062,
+          3.671674966812134,
+          3.6750407218933105,
+          3.6784095764160156,
+          3.681781768798828,
+          3.685157299041748,
+          3.688534736633301,
+          3.6919164657592773,
+          3.695300579071045,
+          3.698688507080078,
+          3.7020788192749023,
+          3.705472946166992,
+          3.708869457244873,
+          3.7122693061828613,
+          3.715672731399536,
+          3.71907901763916,
+          3.7224881649017334,
+          3.725900411605835,
+          3.729316473007202,
+          3.7327349185943604,
+          3.736156940460205,
+          3.739581823348999,
+          3.7430098056793213,
+          3.746441125869751,
+          3.749875545501709,
+          3.7533133029937744,
+          3.75675368309021,
+          3.760197401046753,
+          3.7636446952819824,
+          3.767094850540161,
+          3.7705483436584473,
+          3.7740046977996826,
+          3.7774641513824463,
+          3.7809271812438965,
+          3.784393072128296,
+          3.787862539291382,
+          3.791334390640259,
+          3.7948100566864014,
+          3.7982890605926514,
+          3.8017709255218506,
+          3.805255889892578,
+          3.808744430541992,
+          3.8122363090515137,
+          3.815730333328247,
+          3.819228410720825,
+          3.8227298259735107,
+          3.8262341022491455,
+          3.8297414779663086,
+          3.833252429962158,
+          3.8367667198181152,
+          3.8402836322784424,
+          3.843803882598877,
+          3.847327470779419,
+          3.8508546352386475,
+          3.854384422302246,
+          3.8579182624816895,
+          3.861454486846924,
+          3.8649942874908447,
+          3.868537187576294,
+          3.8720836639404297,
+          3.875633478164673,
+          3.8791861534118652,
+          3.882742166519165,
+          3.8863017559051514,
+          3.889864206314087,
+          3.893429756164551,
+          3.8969993591308594,
+          3.900571584701538,
+          3.9041473865509033,
+          3.907726287841797,
+          3.911308765411377,
+          3.9148941040039062,
+          3.918482780456543,
+          3.9220752716064453,
+          3.925670862197876,
+          3.929269313812256,
+          3.932871103286743,
+          3.936476707458496,
+          3.9400851726531982,
+          3.943696975708008,
+          3.9473118782043457,
+          3.9509313106536865,
+          3.954552412033081,
+          3.9581780433654785,
+          3.961805820465088,
+          3.9654383659362793,
+          3.9690732955932617,
+          3.9727115631103516,
+          3.976353168487549,
+          3.97999906539917,
+          3.983647584915161,
+          3.9872992038726807,
+          3.9909541606903076,
+          3.9946129322052,
+          3.998274803161621,
+          4.00193977355957,
+          4.005608558654785,
+          4.009281158447266,
+          4.012956142425537,
+          4.016634464263916,
+          4.020317077636719,
+          4.0240020751953125,
+          4.027690887451172,
+          4.031383514404297,
+          4.035079479217529,
+          4.038778305053711,
+          4.04248046875,
+          4.046186447143555,
+          4.049895286560059,
+          4.053608417510986,
+          4.057323932647705,
+          4.061043739318848,
+          4.0647664070129395,
+          4.068492412567139,
+          4.072221755981445,
+          4.075955390930176,
+          4.079691410064697,
+          4.083431243896484,
+          4.087174892425537,
+          4.090921878814697,
+          4.094671249389648,
+          4.098425388336182,
+          4.102182388305664,
+          4.105942726135254,
+          4.109706878662109,
+          4.113474369049072,
+          4.117245197296143,
+          4.12101936340332,
+          4.124797344207764,
+          4.1285786628723145,
+          4.132363319396973,
+          4.136151313781738,
+          4.139942646026611,
+          4.143738746643066,
+          4.147536754608154,
+          4.151339054107666,
+          4.155144214630127,
+          4.158953666687012,
+          4.162765979766846,
+          4.1665825843811035,
+          4.170401573181152,
+          4.174224376678467,
+          4.178051471710205,
+          4.181881427764893,
+          4.185715198516846,
+          4.189551830291748,
+          4.193392276763916,
+          4.19723653793335,
+          4.201084136962891,
+          4.204935550689697,
+          4.208790302276611,
+          4.212648391723633,
+          4.21651029586792,
+          4.2203755378723145,
+          4.224244594573975,
+          4.228116989135742,
+          4.231992721557617,
+          4.235872745513916,
+          4.239755153656006,
+          4.243642330169678,
+          4.247532367706299,
+          4.251425743103027,
+          4.25532341003418,
+          4.259224891662598,
+          4.263128280639648,
+          4.2670369148254395,
+          4.270948886871338,
+          4.2748637199401855,
+          4.278782367706299,
+          4.282705307006836,
+          4.2866315841674805,
+          4.290560245513916,
+          4.294493675231934,
+          4.298430919647217,
+          4.302371025085449,
+          4.306314945220947,
+          4.310262203216553,
+          4.31421422958374,
+          4.318169116973877,
+          4.322126865386963,
+          4.326089382171631,
+          4.330055236816406,
+          4.334023952484131,
+          4.3379974365234375,
+          4.341973781585693,
+          4.345954895019531,
+          4.34993839263916,
+          4.353926181793213,
+          4.357917308807373,
+          4.361912250518799,
+          4.36591100692749,
+          4.369913101196289,
+          4.373919486999512,
+          4.377928733825684,
+          4.381942272186279,
+          4.385959148406982,
+          4.389980316162109,
+          4.3940043449401855,
+          4.3980326652526855,
+          4.402064323425293,
+          4.406099796295166,
+          4.4101386070251465,
+          4.414181232452393,
+          4.4182281494140625,
+          4.422277927398682,
+          4.426332473754883,
+          4.430389881134033,
+          4.434451580047607,
+          4.438516139984131,
+          4.442584991455078,
+          4.446657657623291,
+          4.4507341384887695,
+          4.454813480377197,
+          4.458898067474365,
+          4.462985515594482,
+          4.467076778411865,
+          4.4711713790893555,
+          4.4752702713012695,
+          4.479372978210449,
+          4.483478546142578,
+          4.487588882446289,
+          4.491703033447266,
+          4.495820999145508,
+          4.499941825866699,
+          4.5040669441223145,
+          4.5081963539123535,
+          4.512328147888184,
+          4.516465187072754,
+          4.52060604095459,
+          4.524750232696533,
+          4.528897285461426,
+          4.533049583435059,
+          4.537204742431641,
+          4.541363716125488,
+          4.545526504516602,
+          4.549694061279297,
+          4.553864479064941,
+          4.558039665222168,
+          4.562217712402344,
+          4.566400051116943,
+          4.57058572769165,
+          4.574775695800781,
+          4.578969478607178,
+          4.58316707611084,
+          4.587368965148926,
+          4.591573715209961,
+          4.595783233642578,
+          4.599996089935303,
+          4.604213237762451,
+          4.608433723449707,
+          4.612658500671387,
+          4.616887092590332,
+          4.621119022369385,
+          4.6253557205200195,
+          4.629595756530762,
+          4.633840084075928,
+          4.638086795806885,
+          4.642339706420898,
+          4.646595001220703,
+          4.650854587554932,
+          4.655117511749268,
+          4.659385681152344,
+          4.663657188415527,
+          4.66793155670166,
+          4.672211170196533,
+          4.676494598388672,
+          4.680781364440918,
+          4.68507194519043,
+          4.689366340637207,
+          4.693665504455566,
+          4.69796895980835,
+          4.702274799346924,
+          4.70658540725708,
+          4.71090030670166,
+          4.715219020843506,
+          4.719541072845459,
+          4.723867893218994,
+          4.728198528289795,
+          4.732532024383545,
+          4.736870765686035,
+          4.741212844848633,
+          4.7455596923828125,
+          4.7499098777771,
+          4.7542643547058105,
+          4.758622646331787,
+          4.762984275817871,
+          4.767351150512695,
+          4.771721839904785,
+          4.776095867156982,
+          4.780473709106445,
+          4.78485631942749,
+          4.789242744445801,
+          4.793633460998535,
+          4.798027515411377,
+          4.802426338195801,
+          4.806828498840332,
+          4.811234474182129,
+          4.815645694732666,
+          4.820059776306152,
+          4.8244781494140625,
+          4.828900337219238,
+          4.833327770233154,
+          4.837758541107178,
+          4.842193126678467,
+          4.84663200378418,
+          4.851075172424316,
+          4.855522155761719,
+          4.859972953796387,
+          4.8644280433654785,
+          4.868887901306152,
+          4.873351097106934,
+          4.877818584442139,
+          4.882289886474609,
+          4.886765956878662,
+          4.891245365142822,
+          4.895729064941406,
+          4.900217056274414,
+          4.904709815979004,
+          4.909205436706543,
+          4.913705825805664,
+          4.918210506439209,
+          4.9227190017700195,
+          4.927231311798096,
+          4.931748390197754,
+          4.936269760131836,
+          4.940794944763184,
+          4.945323944091797,
+          4.949857711791992,
+          4.954394817352295,
+          4.958937168121338,
+          4.963481903076172,
+          4.968032360076904,
+          4.9725871086120605,
+          4.977145195007324,
+          4.981707572937012,
+          4.986274719238281,
+          4.990845680236816,
+          4.995420455932617
+         ],
+         "xaxis": "x4",
+         "yaxis": "y4"
+        }
+       ],
+       "layout": {
+        "annotations": [
+         {
+          "font": {
+           "size": 16
+          },
+          "showarrow": false,
+          "text": "Uniform",
+          "x": 0.225,
+          "xanchor": "center",
+          "xref": "paper",
+          "y": 1,
+          "yanchor": "bottom",
+          "yref": "paper"
+         },
+         {
+          "font": {
+           "size": 16
+          },
+          "showarrow": false,
+          "text": "Linear in Disparity",
+          "x": 0.775,
+          "xanchor": "center",
+          "xref": "paper",
+          "y": 1,
+          "yanchor": "bottom",
+          "yref": "paper"
+         },
+         {
+          "font": {
+           "size": 16
+          },
+          "showarrow": false,
+          "text": "Square Root",
+          "x": 0.225,
+          "xanchor": "center",
+          "xref": "paper",
+          "y": 0.45,
+          "yanchor": "bottom",
+          "yref": "paper"
+         },
+         {
+          "font": {
+           "size": 16
+          },
+          "showarrow": false,
+          "text": "Log Sampler",
+          "x": 0.775,
+          "xanchor": "center",
+          "xref": "paper",
+          "y": 0.45,
+          "yanchor": "bottom",
+          "yref": "paper"
+         }
+        ],
+        "height": 700,
+        "hovermode": false,
+        "margin": {
+         "b": 20,
+         "l": 20,
+         "r": 20,
+         "t": 50
+        },
+        "showlegend": false,
+        "template": {
+         "data": {
+          "bar": [
+           {
+            "error_x": {
+             "color": "#2a3f5f"
+            },
+            "error_y": {
+             "color": "#2a3f5f"
+            },
+            "marker": {
+             "line": {
+              "color": "#E5ECF6",
+              "width": 0.5
+             },
+             "pattern": {
+              "fillmode": "overlay",
+              "size": 10,
+              "solidity": 0.2
+             }
+            },
+            "type": "bar"
+           }
+          ],
+          "barpolar": [
+           {
+            "marker": {
+             "line": {
+              "color": "#E5ECF6",
+              "width": 0.5
+             },
+             "pattern": {
+              "fillmode": "overlay",
+              "size": 10,
+              "solidity": 0.2
+             }
+            },
+            "type": "barpolar"
+           }
+          ],
+          "carpet": [
+           {
+            "aaxis": {
+             "endlinecolor": "#2a3f5f",
+             "gridcolor": "white",
+             "linecolor": "white",
+             "minorgridcolor": "white",
+             "startlinecolor": "#2a3f5f"
+            },
+            "baxis": {
+             "endlinecolor": "#2a3f5f",
+             "gridcolor": "white",
+             "linecolor": "white",
+             "minorgridcolor": "white",
+             "startlinecolor": "#2a3f5f"
+            },
+            "type": "carpet"
+           }
+          ],
+          "choropleth": [
+           {
+            "colorbar": {
+             "outlinewidth": 0,
+             "ticks": ""
+            },
+            "type": "choropleth"
+           }
+          ],
+          "contour": [
+           {
+            "colorbar": {
+             "outlinewidth": 0,
+             "ticks": ""
+            },
+            "colorscale": [
+             [
+              0,
+              "#0d0887"
+             ],
+             [
+              0.1111111111111111,
+              "#46039f"
+             ],
+             [
+              0.2222222222222222,
+              "#7201a8"
+             ],
+             [
+              0.3333333333333333,
+              "#9c179e"
+             ],
+             [
+              0.4444444444444444,
+              "#bd3786"
+             ],
+             [
+              0.5555555555555556,
+              "#d8576b"
+             ],
+             [
+              0.6666666666666666,
+              "#ed7953"
+             ],
+             [
+              0.7777777777777778,
+              "#fb9f3a"
+             ],
+             [
+              0.8888888888888888,
+              "#fdca26"
+             ],
+             [
+              1,
+              "#f0f921"
+             ]
+            ],
+            "type": "contour"
+           }
+          ],
+          "contourcarpet": [
+           {
+            "colorbar": {
+             "outlinewidth": 0,
+             "ticks": ""
+            },
+            "type": "contourcarpet"
+           }
+          ],
+          "heatmap": [
+           {
+            "colorbar": {
+             "outlinewidth": 0,
+             "ticks": ""
+            },
+            "colorscale": [
+             [
+              0,
+              "#0d0887"
+             ],
+             [
+              0.1111111111111111,
+              "#46039f"
+             ],
+             [
+              0.2222222222222222,
+              "#7201a8"
+             ],
+             [
+              0.3333333333333333,
+              "#9c179e"
+             ],
+             [
+              0.4444444444444444,
+              "#bd3786"
+             ],
+             [
+              0.5555555555555556,
+              "#d8576b"
+             ],
+             [
+              0.6666666666666666,
+              "#ed7953"
+             ],
+             [
+              0.7777777777777778,
+              "#fb9f3a"
+             ],
+             [
+              0.8888888888888888,
+              "#fdca26"
+             ],
+             [
+              1,
+              "#f0f921"
+             ]
+            ],
+            "type": "heatmap"
+           }
+          ],
+          "heatmapgl": [
+           {
+            "colorbar": {
+             "outlinewidth": 0,
+             "ticks": ""
+            },
+            "colorscale": [
+             [
+              0,
+              "#0d0887"
+             ],
+             [
+              0.1111111111111111,
+              "#46039f"
+             ],
+             [
+              0.2222222222222222,
+              "#7201a8"
+             ],
+             [
+              0.3333333333333333,
+              "#9c179e"
+             ],
+             [
+              0.4444444444444444,
+              "#bd3786"
+             ],
+             [
+              0.5555555555555556,
+              "#d8576b"
+             ],
+             [
+              0.6666666666666666,
+              "#ed7953"
+             ],
+             [
+              0.7777777777777778,
+              "#fb9f3a"
+             ],
+             [
+              0.8888888888888888,
+              "#fdca26"
+             ],
+             [
+              1,
+              "#f0f921"
+             ]
+            ],
+            "type": "heatmapgl"
+           }
+          ],
+          "histogram": [
+           {
+            "marker": {
+             "pattern": {
+              "fillmode": "overlay",
+              "size": 10,
+              "solidity": 0.2
+             }
+            },
+            "type": "histogram"
+           }
+          ],
+          "histogram2d": [
+           {
+            "colorbar": {
+             "outlinewidth": 0,
+             "ticks": ""
+            },
+            "colorscale": [
+             [
+              0,
+              "#0d0887"
+             ],
+             [
+              0.1111111111111111,
+              "#46039f"
+             ],
+             [
+              0.2222222222222222,
+              "#7201a8"
+             ],
+             [
+              0.3333333333333333,
+              "#9c179e"
+             ],
+             [
+              0.4444444444444444,
+              "#bd3786"
+             ],
+             [
+              0.5555555555555556,
+              "#d8576b"
+             ],
+             [
+              0.6666666666666666,
+              "#ed7953"
+             ],
+             [
+              0.7777777777777778,
+              "#fb9f3a"
+             ],
+             [
+              0.8888888888888888,
+              "#fdca26"
+             ],
+             [
+              1,
+              "#f0f921"
+             ]
+            ],
+            "type": "histogram2d"
+           }
+          ],
+          "histogram2dcontour": [
+           {
+            "colorbar": {
+             "outlinewidth": 0,
+             "ticks": ""
+            },
+            "colorscale": [
+             [
+              0,
+              "#0d0887"
+             ],
+             [
+              0.1111111111111111,
+              "#46039f"
+             ],
+             [
+              0.2222222222222222,
+              "#7201a8"
+             ],
+             [
+              0.3333333333333333,
+              "#9c179e"
+             ],
+             [
+              0.4444444444444444,
+              "#bd3786"
+             ],
+             [
+              0.5555555555555556,
+              "#d8576b"
+             ],
+             [
+              0.6666666666666666,
+              "#ed7953"
+             ],
+             [
+              0.7777777777777778,
+              "#fb9f3a"
+             ],
+             [
+              0.8888888888888888,
+              "#fdca26"
+             ],
+             [
+              1,
+              "#f0f921"
+             ]
+            ],
+            "type": "histogram2dcontour"
+           }
+          ],
+          "mesh3d": [
+           {
+            "colorbar": {
+             "outlinewidth": 0,
+             "ticks": ""
+            },
+            "type": "mesh3d"
+           }
+          ],
+          "parcoords": [
+           {
+            "line": {
+             "colorbar": {
+              "outlinewidth": 0,
+              "ticks": ""
+             }
+            },
+            "type": "parcoords"
+           }
+          ],
+          "pie": [
+           {
+            "automargin": true,
+            "type": "pie"
+           }
+          ],
+          "scatter": [
+           {
+            "fillpattern": {
+             "fillmode": "overlay",
+             "size": 10,
+             "solidity": 0.2
+            },
+            "type": "scatter"
+           }
+          ],
+          "scatter3d": [
+           {
+            "line": {
+             "colorbar": {
+              "outlinewidth": 0,
+              "ticks": ""
+             }
+            },
+            "marker": {
+             "colorbar": {
+              "outlinewidth": 0,
+              "ticks": ""
+             }
+            },
+            "type": "scatter3d"
+           }
+          ],
+          "scattercarpet": [
+           {
+            "marker": {
+             "colorbar": {
+              "outlinewidth": 0,
+              "ticks": ""
+             }
+            },
+            "type": "scattercarpet"
+           }
+          ],
+          "scattergeo": [
+           {
+            "marker": {
+             "colorbar": {
+              "outlinewidth": 0,
+              "ticks": ""
+             }
+            },
+            "type": "scattergeo"
+           }
+          ],
+          "scattergl": [
+           {
+            "marker": {
+             "colorbar": {
+              "outlinewidth": 0,
+              "ticks": ""
+             }
+            },
+            "type": "scattergl"
+           }
+          ],
+          "scattermapbox": [
+           {
+            "marker": {
+             "colorbar": {
+              "outlinewidth": 0,
+              "ticks": ""
+             }
+            },
+            "type": "scattermapbox"
+           }
+          ],
+          "scatterpolar": [
+           {
+            "marker": {
+             "colorbar": {
+              "outlinewidth": 0,
+              "ticks": ""
+             }
+            },
+            "type": "scatterpolar"
+           }
+          ],
+          "scatterpolargl": [
+           {
+            "marker": {
+             "colorbar": {
+              "outlinewidth": 0,
+              "ticks": ""
+             }
+            },
+            "type": "scatterpolargl"
+           }
+          ],
+          "scatterternary": [
+           {
+            "marker": {
+             "colorbar": {
+              "outlinewidth": 0,
+              "ticks": ""
+             }
+            },
+            "type": "scatterternary"
+           }
+          ],
+          "surface": [
+           {
+            "colorbar": {
+             "outlinewidth": 0,
+             "ticks": ""
+            },
+            "colorscale": [
+             [
+              0,
+              "#0d0887"
+             ],
+             [
+              0.1111111111111111,
+              "#46039f"
+             ],
+             [
+              0.2222222222222222,
+              "#7201a8"
+             ],
+             [
+              0.3333333333333333,
+              "#9c179e"
+             ],
+             [
+              0.4444444444444444,
+              "#bd3786"
+             ],
+             [
+              0.5555555555555556,
+              "#d8576b"
+             ],
+             [
+              0.6666666666666666,
+              "#ed7953"
+             ],
+             [
+              0.7777777777777778,
+              "#fb9f3a"
+             ],
+             [
+              0.8888888888888888,
+              "#fdca26"
+             ],
+             [
+              1,
+              "#f0f921"
+             ]
+            ],
+            "type": "surface"
+           }
+          ],
+          "table": [
+           {
+            "cells": {
+             "fill": {
+              "color": "#EBF0F8"
+             },
+             "line": {
+              "color": "white"
+             }
+            },
+            "header": {
+             "fill": {
+              "color": "#C8D4E3"
+             },
+             "line": {
+              "color": "white"
+             }
+            },
+            "type": "table"
+           }
+          ]
+         },
+         "layout": {
+          "annotationdefaults": {
+           "arrowcolor": "#2a3f5f",
+           "arrowhead": 0,
+           "arrowwidth": 1
+          },
+          "autotypenumbers": "strict",
+          "coloraxis": {
+           "colorbar": {
+            "outlinewidth": 0,
+            "ticks": ""
+           }
+          },
+          "colorscale": {
+           "diverging": [
+            [
+             0,
+             "#8e0152"
+            ],
+            [
+             0.1,
+             "#c51b7d"
+            ],
+            [
+             0.2,
+             "#de77ae"
+            ],
+            [
+             0.3,
+             "#f1b6da"
+            ],
+            [
+             0.4,
+             "#fde0ef"
+            ],
+            [
+             0.5,
+             "#f7f7f7"
+            ],
+            [
+             0.6,
+             "#e6f5d0"
+            ],
+            [
+             0.7,
+             "#b8e186"
+            ],
+            [
+             0.8,
+             "#7fbc41"
+            ],
+            [
+             0.9,
+             "#4d9221"
+            ],
+            [
+             1,
+             "#276419"
+            ]
+           ],
+           "sequential": [
+            [
+             0,
+             "#0d0887"
+            ],
+            [
+             0.1111111111111111,
+             "#46039f"
+            ],
+            [
+             0.2222222222222222,
+             "#7201a8"
+            ],
+            [
+             0.3333333333333333,
+             "#9c179e"
+            ],
+            [
+             0.4444444444444444,
+             "#bd3786"
+            ],
+            [
+             0.5555555555555556,
+             "#d8576b"
+            ],
+            [
+             0.6666666666666666,
+             "#ed7953"
+            ],
+            [
+             0.7777777777777778,
+             "#fb9f3a"
+            ],
+            [
+             0.8888888888888888,
+             "#fdca26"
+            ],
+            [
+             1,
+             "#f0f921"
+            ]
+           ],
+           "sequentialminus": [
+            [
+             0,
+             "#0d0887"
+            ],
+            [
+             0.1111111111111111,
+             "#46039f"
+            ],
+            [
+             0.2222222222222222,
+             "#7201a8"
+            ],
+            [
+             0.3333333333333333,
+             "#9c179e"
+            ],
+            [
+             0.4444444444444444,
+             "#bd3786"
+            ],
+            [
+             0.5555555555555556,
+             "#d8576b"
+            ],
+            [
+             0.6666666666666666,
+             "#ed7953"
+            ],
+            [
+             0.7777777777777778,
+             "#fb9f3a"
+            ],
+            [
+             0.8888888888888888,
+             "#fdca26"
+            ],
+            [
+             1,
+             "#f0f921"
+            ]
+           ]
+          },
+          "colorway": [
+           "#636efa",
+           "#EF553B",
+           "#00cc96",
+           "#ab63fa",
+           "#FFA15A",
+           "#19d3f3",
+           "#FF6692",
+           "#B6E880",
+           "#FF97FF",
+           "#FECB52"
+          ],
+          "font": {
+           "color": "#2a3f5f"
+          },
+          "geo": {
+           "bgcolor": "white",
+           "lakecolor": "white",
+           "landcolor": "#E5ECF6",
+           "showlakes": true,
+           "showland": true,
+           "subunitcolor": "white"
+          },
+          "hoverlabel": {
+           "align": "left"
+          },
+          "hovermode": "closest",
+          "mapbox": {
+           "style": "light"
+          },
+          "paper_bgcolor": "white",
+          "plot_bgcolor": "#E5ECF6",
+          "polar": {
+           "angularaxis": {
+            "gridcolor": "white",
+            "linecolor": "white",
+            "ticks": ""
+           },
+           "bgcolor": "#E5ECF6",
+           "radialaxis": {
+            "gridcolor": "white",
+            "linecolor": "white",
+            "ticks": ""
+           }
+          },
+          "scene": {
+           "xaxis": {
+            "backgroundcolor": "#E5ECF6",
+            "gridcolor": "white",
+            "gridwidth": 2,
+            "linecolor": "white",
+            "showbackground": true,
+            "ticks": "",
+            "zerolinecolor": "white"
+           },
+           "yaxis": {
+            "backgroundcolor": "#E5ECF6",
+            "gridcolor": "white",
+            "gridwidth": 2,
+            "linecolor": "white",
+            "showbackground": true,
+            "ticks": "",
+            "zerolinecolor": "white"
+           },
+           "zaxis": {
+            "backgroundcolor": "#E5ECF6",
+            "gridcolor": "white",
+            "gridwidth": 2,
+            "linecolor": "white",
+            "showbackground": true,
+            "ticks": "",
+            "zerolinecolor": "white"
+           }
+          },
+          "shapedefaults": {
+           "line": {
+            "color": "#2a3f5f"
+           }
+          },
+          "ternary": {
+           "aaxis": {
+            "gridcolor": "white",
+            "linecolor": "white",
+            "ticks": ""
+           },
+           "baxis": {
+            "gridcolor": "white",
+            "linecolor": "white",
+            "ticks": ""
+           },
+           "bgcolor": "#E5ECF6",
+           "caxis": {
+            "gridcolor": "white",
+            "linecolor": "white",
+            "ticks": ""
+           }
+          },
+          "title": {
+           "x": 0.05
+          },
+          "xaxis": {
+           "automargin": true,
+           "gridcolor": "white",
+           "linecolor": "white",
+           "ticks": "",
+           "title": {
+            "standoff": 15
+           },
+           "zerolinecolor": "white",
+           "zerolinewidth": 2
+          },
+          "yaxis": {
+           "automargin": true,
+           "gridcolor": "white",
+           "linecolor": "white",
+           "ticks": "",
+           "title": {
+            "standoff": 15
+           },
+           "zerolinecolor": "white",
+           "zerolinewidth": 2
+          }
+         }
+        },
+        "xaxis": {
+         "anchor": "y",
+         "domain": [
+          0,
+          0.45
+         ],
+         "matches": "x3",
+         "showticklabels": false
+        },
+        "xaxis2": {
+         "anchor": "y2",
+         "domain": [
+          0.55,
+          1
+         ],
+         "matches": "x4",
+         "showticklabels": false
+        },
+        "xaxis3": {
+         "anchor": "y3",
+         "domain": [
+          0,
+          0.45
+         ],
+         "title": {
+          "text": "Distance"
+         }
+        },
+        "xaxis4": {
+         "anchor": "y4",
+         "domain": [
+          0.55,
+          1
+         ],
+         "title": {
+          "text": "Distance"
+         }
+        },
+        "yaxis": {
+         "anchor": "x",
+         "domain": [
+          0.55,
+          1
+         ],
+         "range": [
+          0,
+          80
+         ],
+         "title": {
+          "text": "# Samples"
+         }
+        },
+        "yaxis2": {
+         "anchor": "x2",
+         "domain": [
+          0.55,
+          1
+         ],
+         "matches": "y",
+         "range": [
+          0,
+          80
+         ],
+         "showticklabels": false
+        },
+        "yaxis3": {
+         "anchor": "x3",
+         "domain": [
+          0,
+          0.45
+         ],
+         "range": [
+          0,
+          80
+         ],
+         "title": {
+          "text": "# Samples"
+         }
+        },
+        "yaxis4": {
+         "anchor": "x4",
+         "domain": [
+          0,
+          0.45
+         ],
+         "matches": "y3",
+         "range": [
+          0,
+          80
+         ],
+         "showticklabels": false
+        }
+       }
+      },
+      "text/html": [
+       "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# COLLAPSED\n", + "import torch\n", + "from nerfstudio.cameras.rays import RayBundle\n", + "from nerfstudio.model_components import ray_sampler\n", + "import plotly.graph_objects as go\n", + "from plotly.subplots import make_subplots\n", + "\n", + "\n", + "num_samples = 1000\n", + "near = 2\n", + "far = 5\n", + "train_stratified = False\n", + "\n", + "samplers = [\n", + " ray_sampler.UniformSampler,\n", + " ray_sampler.LinearDisparitySampler,\n", + " ray_sampler.SqrtSampler,\n", + " ray_sampler.LogSampler,\n", + "]\n", + "\n", + "fig = make_subplots(\n", + " rows=2,\n", + " cols=2,\n", + " subplot_titles=(\"Uniform\", \"Linear in Disparity\", \"Square Root\", \"Log Sampler\"),\n", + " shared_xaxes=True,\n", + " shared_yaxes=True,\n", + " vertical_spacing=0.1,\n", + ")\n", + "\n", + "for i, Sampler in enumerate(samplers):\n", + " sampler = Sampler(num_samples=num_samples, train_stratified=train_stratified)\n", + "\n", + " ray_bundle = RayBundle(\n", + " origins=torch.ones([1, 3]),\n", + " directions=torch.ones([1, 3]),\n", + " pixel_area=torch.ones([1, 1]),\n", + " nears=torch.ones([1, 1]) * near,\n", + " fars=torch.ones([1, 1]) * far,\n", + " )\n", + "\n", + " samples = sampler.generate_ray_samples(ray_bundle)\n", + "\n", + " trace = go.Histogram(x=samples.frustums.starts[0, :, 0], nbinsx=50)\n", + " fig.append_trace(trace, i // 2 + 1, i % 2 + 1)\n", + "\n", + "fig.update_yaxes(title_text=\"# Samples\", row=1, col=1)\n", + "fig.update_yaxes(title_text=\"# Samples\", row=2, col=1)\n", + "fig.update_xaxes(title_text=\"Distance\", row=2, col=1)\n", + "fig.update_xaxes(title_text=\"Distance\", row=2, col=2)\n", + "\n", + "# Overlay both histograms\n", + "fig.update_layout(height=700, hovermode=False, showlegend=False, margin=dict(l=20, r=20, t=50, b=20))\n", + "fig.update_yaxes(range=[0, 80])\n", + "fig.update_traces(opacity=0.7)\n", + "fig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## PDF Sampler\n", + "\n", + "The Probability Distribution Function (PDF) Sampler generates samples that match a given distribution. \n", + "\n", + "In the example below we first create a `UniformSampler` to generate a set of initial samples. We then assign weights to each of these samples to define the PDF (here it is an arbitrary function, but usually you would use the predicted weights from the field). The left plot the target PDF, on the right we plot a histogram of samples generated from the `PDFSampler`." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "tags": [ + "hide-input" + ] + }, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "opacity": 0.7, + "type": "scatter", + "x": [ + 2, + 2.1500000953674316, + 2.1500000953674316, + 2.299999952316284, + 2.299999952316284, + 2.450000047683716, + 2.450000047683716, + 2.5999999046325684, + 2.5999999046325684, + 2.75, + 2.75, + 2.9000000953674316, + 2.9000000953674316, + 3.049999952316284, + 3.049999952316284, + 3.200000047683716, + 3.200000047683716, + 3.3499999046325684, + 3.3499999046325684, + 3.5, + 3.5, + 3.6500000953674316, + 3.6500000953674316, + 3.799999952316284, + 3.799999952316284, + 3.950000047683716, + 3.950000047683716, + 4.100000381469727, + 4.100000381469727, + 4.25, + 4.25, + 4.400000095367432, + 4.400000095367432, + 4.550000190734863, + 4.550000190734863, + 4.699999809265137, + 4.699999809265137, + 4.849999904632568, + 4.849999904632568, + 5 + ], + "xaxis": "x", + "y": [ + 0.013052567839622498, + 0.013052567839622498, + 0.03800889104604721, + 0.03800889104604721, + 0.057813677936792374, + 0.057813677936792374, + 0.06855124980211258, + 0.06855124980211258, + 0.06847988814115524, + 0.06847988814115524, + 0.058445800095796585, + 0.058445800095796585, + 0.041673533618450165, + 0.041673533618450165, + 0.022983169183135033, + 0.022983169183135033, + 0.007623155601322651, + 0.007623155601322651, + 0, + 0, + 0.002611340256407857, + 0.002611340256407857, + 0.015439355745911598, + 0.015439355745911598, + 0.03595082834362984, + 0.03595082834362984, + 0.05970405042171478, + 0.05970405042171478, + 0.0814160406589508, + 0.0814160406589508, + 0.09623293578624725, + 0.09623293578624725, + 0.10089751332998276, + 0.10089751332998276, + 0.09453219175338745, + 0.09453219175338745, + 0.07884885370731354, + 0.07884885370731354, + 0.057734981179237366, + 0.057734981179237366 + ], + "yaxis": "y" + }, + { + "nbinsx": 100, + "opacity": 0.7, + "type": "histogram", + "x": [ + 2.0039002895355225, + 2.0117006301879883, + 2.019501209259033, + 2.027301549911499, + 2.035102128982544, + 2.0429024696350098, + 2.0507028102874756, + 2.0585033893585205, + 2.0663037300109863, + 2.074104070663452, + 2.081904649734497, + 2.089704990386963, + 2.097505569458008, + 2.1053059101104736, + 2.1131062507629395, + 2.1209068298339844, + 2.12870717048645, + 2.136507749557495, + 2.144308090209961, + 2.151012420654297, + 2.1547579765319824, + 2.158503532409668, + 2.1622490882873535, + 2.165994644165039, + 2.1697402000427246, + 2.17348575592041, + 2.1772313117980957, + 2.1809771060943604, + 2.184722423553467, + 2.1884679794311523, + 2.192213535308838, + 2.1959590911865234, + 2.199704647064209, + 2.2034502029418945, + 2.207195997238159, + 2.2109413146972656, + 2.214686870574951, + 2.218432664871216, + 2.2221782207489014, + 2.225923538208008, + 2.2296690940856934, + 2.233414888381958, + 2.2371604442596436, + 2.24090576171875, + 2.2446515560150146, + 2.2483971118927, + 2.2521424293518066, + 2.2558882236480713, + 2.259633779525757, + 2.2633793354034424, + 2.267124891281128, + 2.2708704471588135, + 2.274616003036499, + 2.2783615589141846, + 2.28210711479187, + 2.2858526706695557, + 2.289598226547241, + 2.2933437824249268, + 2.2970893383026123, + 2.300590991973877, + 2.3032426834106445, + 2.305894374847412, + 2.3085460662841797, + 2.3111977577209473, + 2.313849449157715, + 2.3165011405944824, + 2.31915283203125, + 2.3218045234680176, + 2.324456214904785, + 2.3271079063415527, + 2.3297595977783203, + 2.332411289215088, + 2.3350629806518555, + 2.337714672088623, + 2.3403663635253906, + 2.343018054962158, + 2.3456695079803467, + 2.3483211994171143, + 2.350973129272461, + 2.3536248207092285, + 2.356276273727417, + 2.3589279651641846, + 2.361579656600952, + 2.3642313480377197, + 2.3668830394744873, + 2.369534730911255, + 2.3721864223480225, + 2.37483811378479, + 2.3774898052215576, + 2.380141496658325, + 2.3827931880950928, + 2.3854446411132812, + 2.388096570968628, + 2.3907480239868164, + 2.393399715423584, + 2.3960514068603516, + 2.398703098297119, + 2.4013547897338867, + 2.4040064811706543, + 2.406658172607422, + 2.4093098640441895, + 2.411961555480957, + 2.4146132469177246, + 2.417264938354492, + 2.4199166297912598, + 2.4225683212280273, + 2.425220012664795, + 2.4278717041015625, + 2.43052339553833, + 2.4331750869750977, + 2.4358267784118652, + 2.438478469848633, + 2.4411301612854004, + 2.443781852722168, + 2.4464335441589355, + 2.449085235595703, + 2.4514994621276855, + 2.4537887573242188, + 2.456077814102173, + 2.458367109298706, + 2.46065616607666, + 2.4629454612731934, + 2.4652347564697266, + 2.4675238132476807, + 2.469813108444214, + 2.472102165222168, + 2.474391460418701, + 2.4766807556152344, + 2.4789698123931885, + 2.4812591075897217, + 2.483548402786255, + 2.485837459564209, + 2.488126754760742, + 2.4904160499572754, + 2.4927051067352295, + 2.4949944019317627, + 2.497283458709717, + 2.49957275390625, + 2.501862049102783, + 2.5041511058807373, + 2.5064404010772705, + 2.5087296962738037, + 2.511018753051758, + 2.513308048248291, + 2.515597343444824, + 2.5178864002227783, + 2.5201756954193115, + 2.5224647521972656, + 2.524754047393799, + 2.527043342590332, + 2.529332399368286, + 2.5316216945648193, + 2.5339109897613525, + 2.5362000465393066, + 2.53848934173584, + 2.540778636932373, + 2.543067693710327, + 2.5453569889068604, + 2.5476460456848145, + 2.5499353408813477, + 2.552224636077881, + 2.554513692855835, + 2.556802988052368, + 2.5590920448303223, + 2.5613813400268555, + 2.5636706352233887, + 2.565959930419922, + 2.568248987197876, + 2.570538282394409, + 2.5728273391723633, + 2.5751166343688965, + 2.5774059295654297, + 2.579694986343384, + 2.581984281539917, + 2.58427357673645, + 2.5865626335144043, + 2.5888519287109375, + 2.5911412239074707, + 2.593430280685425, + 2.595719575881958, + 2.598008632659912, + 2.6002981662750244, + 2.6025896072387695, + 2.6048808097839355, + 2.6071720123291016, + 2.6094634532928467, + 2.611754894256592, + 2.6140458583831787, + 2.616337299346924, + 2.61862850189209, + 2.620919704437256, + 2.623211145401001, + 2.625502586364746, + 2.627793788909912, + 2.630084991455078, + 2.632376194000244, + 2.6346676349639893, + 2.6369590759277344, + 2.6392502784729004, + 2.6415414810180664, + 2.6438326835632324, + 2.6461238861083984, + 2.6484153270721436, + 2.6507067680358887, + 2.6529979705810547, + 2.6552891731262207, + 2.6575803756713867, + 2.659871816635132, + 2.662163257598877, + 2.664454460144043, + 2.666745662689209, + 2.669036865234375, + 2.671328067779541, + 2.673619508743286, + 2.6759109497070312, + 2.6782021522521973, + 2.6804933547973633, + 2.6827845573425293, + 2.6850759983062744, + 2.6873672008514404, + 2.6896584033966064, + 2.6919498443603516, + 2.6942410469055176, + 2.6965322494506836, + 2.6988236904144287, + 2.701115131378174, + 2.70340633392334, + 2.705697536468506, + 2.707988739013672, + 2.710280179977417, + 2.712571620941162, + 2.714862823486328, + 2.717154026031494, + 2.71944522857666, + 2.721736431121826, + 2.724027633666992, + 2.7263193130493164, + 2.7286105155944824, + 2.7309017181396484, + 2.7331929206848145, + 2.7354843616485596, + 2.7377758026123047, + 2.7400670051574707, + 2.7423582077026367, + 2.7446494102478027, + 2.7469406127929688, + 2.749232053756714, + 2.751746654510498, + 2.754373788833618, + 2.7570009231567383, + 2.7596282958984375, + 2.7622551918029785, + 2.7648825645446777, + 2.767509698867798, + 2.770136833190918, + 2.772764205932617, + 2.7753913402557373, + 2.7780184745788574, + 2.7806458473205566, + 2.7832727432250977, + 2.785900115966797, + 2.788527488708496, + 2.791154384613037, + 2.7937817573547363, + 2.7964086532592773, + 2.7990360260009766, + 2.8016631603240967, + 2.804290294647217, + 2.806917667388916, + 2.8095450401306152, + 2.8121719360351562, + 2.8147993087768555, + 2.8174264430999756, + 2.8200535774230957, + 2.822680950164795, + 2.825307846069336, + 2.827935218811035, + 2.8305623531341553, + 2.8331894874572754, + 2.8358168601989746, + 2.8384439945220947, + 2.841071128845215, + 2.843698501586914, + 2.846325397491455, + 2.8489527702331543, + 2.8515799045562744, + 2.8542070388793945, + 2.8568344116210938, + 2.8594613075256348, + 2.862088680267334, + 2.864715814590454, + 2.867342948913574, + 2.8699703216552734, + 2.8725974559783936, + 2.8752245903015137, + 2.877851963043213, + 2.880478858947754, + 2.883106231689453, + 2.8857333660125732, + 2.8883605003356934, + 2.8909878730773926, + 2.8936147689819336, + 2.896242141723633, + 2.898869037628174, + 2.901982307434082, + 2.9054622650146484, + 2.908942222595215, + 2.9124221801757812, + 2.9159021377563477, + 2.919382095336914, + 2.9228615760803223, + 2.9263415336608887, + 2.929821491241455, + 2.9333014488220215, + 2.936781406402588, + 2.9402613639831543, + 2.9437413215637207, + 2.947221279144287, + 2.9507012367248535, + 2.95418119430542, + 2.9576611518859863, + 2.9611411094665527, + 2.964621067047119, + 2.9681007862091064, + 2.971580743789673, + 2.9750607013702393, + 2.9785404205322266, + 2.982020378112793, + 2.9855003356933594, + 2.988980293273926, + 2.992460250854492, + 2.9959402084350586, + 2.999420166015625, + 3.0029001235961914, + 3.006380081176758, + 3.009860038757324, + 3.0133399963378906, + 3.016819953918457, + 3.0202996730804443, + 3.02377986907959, + 3.027259588241577, + 3.0307395458221436, + 3.034219264984131, + 3.0376992225646973, + 3.0411791801452637, + 3.04465913772583, + 3.0481390953063965, + 3.0525364875793457, + 3.057988405227661, + 3.0634403228759766, + 3.068892002105713, + 3.0743441581726074, + 3.0797958374023438, + 3.08524751663208, + 3.0906996726989746, + 3.096151351928711, + 3.1016035079956055, + 3.107055187225342, + 3.1125071048736572, + 3.1179590225219727, + 3.123410940170288, + 3.1288628578186035, + 3.134314775466919, + 3.1397666931152344, + 3.14521861076355, + 3.1506705284118652, + 3.1561222076416016, + 3.161573886871338, + 3.1670260429382324, + 3.1724777221679688, + 3.1779298782348633, + 3.1833815574645996, + 3.188833713531494, + 3.1942853927612305, + 3.199737071990967, + 3.209711790084839, + 3.2199153900146484, + 3.230119228363037, + 3.2403225898742676, + 3.2505264282226562, + 3.260730028152466, + 3.2709336280822754, + 3.281137228012085, + 3.2913408279418945, + 3.3015449047088623, + 3.311748504638672, + 3.3219521045684814, + 3.332155704498291, + 3.3423593044281006, + 3.3545167446136475, + 3.3724982738494873, + 3.3904805183410645, + 3.4084625244140625, + 3.4264445304870605, + 3.4444267749786377, + 3.462409019470215, + 3.480390787124634, + 3.498373031616211, + 3.512968063354492, + 3.5272269248962402, + 3.54148530960083, + 3.555744171142578, + 3.570002555847168, + 3.584261417388916, + 3.598519802093506, + 3.612778663635254, + 3.6270365715026855, + 3.6412954330444336, + 3.6527533531188965, + 3.6598219871520996, + 3.6668906211853027, + 3.6739590167999268, + 3.681027889251709, + 3.688096523284912, + 3.695164680480957, + 3.70223331451416, + 3.7093024253845215, + 3.7163705825805664, + 3.7234394550323486, + 3.7305080890655518, + 3.737576484680176, + 3.744645118713379, + 3.751713514328003, + 3.758782386779785, + 3.76585054397583, + 3.7729194164276123, + 3.7799880504608154, + 3.7870564460754395, + 3.7941250801086426, + 3.8006608486175537, + 3.8045742511749268, + 3.8084874153137207, + 3.8124008178710938, + 3.816314220428467, + 3.8202273845672607, + 3.824141025543213, + 3.828054189682007, + 3.831967353820801, + 3.835880756378174, + 3.8397939205169678, + 3.843707323074341, + 3.8476204872131348, + 3.851533889770508, + 3.855447292327881, + 3.859360456466675, + 3.863274097442627, + 3.867187023162842, + 3.871100425720215, + 3.875014066696167, + 3.878927230834961, + 3.882840633392334, + 3.886753797531128, + 3.890666961669922, + 3.894580602645874, + 3.898493528366089, + 3.902407169342041, + 3.906320333480835, + 3.910233497619629, + 3.914147138595581, + 3.918060302734375, + 3.921973705291748, + 3.925887107849121, + 3.929800033569336, + 3.933713674545288, + 3.937626838684082, + 3.941540241241455, + 3.945453643798828, + 3.949366807937622, + 3.952162265777588, + 3.954742193222046, + 3.9573216438293457, + 3.9599015712738037, + 3.9624814987182617, + 3.9650611877441406, + 3.9676411151885986, + 3.9702205657958984, + 3.9728004932403564, + 3.9753804206848145, + 3.9779598712921143, + 3.9805397987365723, + 3.983119487762451, + 3.985699415206909, + 3.988279342651367, + 3.990858793258667, + 3.993438720703125, + 3.996018409729004, + 3.998598098754883, + 4.001177787780762, + 4.003757476806641, + 4.0063371658325195, + 4.008917331695557, + 4.0114970207214355, + 4.014077186584473, + 4.016656398773193, + 4.0192365646362305, + 4.021816253662109, + 4.024395942687988, + 4.026975631713867, + 4.029555320739746, + 4.032135009765625, + 4.034715175628662, + 4.037294387817383, + 4.039874076843262, + 4.042454242706299, + 4.045034408569336, + 4.047614097595215, + 4.050193786621094, + 4.052773475646973, + 4.055353164672852, + 4.0579328536987305, + 4.060512542724609, + 4.063092231750488, + 4.065672397613525, + 4.068252086639404, + 4.070831775665283, + 4.07341194152832, + 4.075991153717041, + 4.078571319580078, + 4.081151008605957, + 4.083730697631836, + 4.086310386657715, + 4.088890075683594, + 4.091469764709473, + 4.09404993057251, + 4.096629619598389, + 4.099209308624268, + 4.1013641357421875, + 4.103331089019775, + 4.105298042297363, + 4.107264995574951, + 4.109231948852539, + 4.111199378967285, + 4.113166332244873, + 4.115133285522461, + 4.117100715637207, + 4.119067668914795, + 4.121034622192383, + 4.123002052307129, + 4.124969005584717, + 4.126935958862305, + 4.128902912139893, + 4.1308698654174805, + 4.132836818695068, + 4.134803771972656, + 4.136771202087402, + 4.138737678527832, + 4.140705108642578, + 4.142672061920166, + 4.144639015197754, + 4.1466064453125, + 4.148573398590088, + 4.150540351867676, + 4.152507781982422, + 4.15447473526001, + 4.156441688537598, + 4.1584086418151855, + 4.160375595092773, + 4.162342548370361, + 4.164309501647949, + 4.166276931762695, + 4.168243885040283, + 4.170210838317871, + 4.172178268432617, + 4.174145221710205, + 4.176112174987793, + 4.178079605102539, + 4.180046558380127, + 4.182013511657715, + 4.183980464935303, + 4.185947418212891, + 4.1879143714904785, + 4.189881324768066, + 4.191848278045654, + 4.193815231323242, + 4.195782661437988, + 4.197749614715576, + 4.199716567993164, + 4.20168399810791, + 4.203650951385498, + 4.205617904663086, + 4.207585334777832, + 4.209551811218262, + 4.211519241333008, + 4.213486194610596, + 4.215453147888184, + 4.2174201011657715, + 4.219387054443359, + 4.2213544845581055, + 4.223321437835693, + 4.225288391113281, + 4.227255821228027, + 4.229222297668457, + 4.231189727783203, + 4.233156681060791, + 4.235123634338379, + 4.237091064453125, + 4.239058017730713, + 4.241024971008301, + 4.242991924285889, + 4.244958877563477, + 4.2469258308410645, + 4.248892784118652, + 4.250740051269531, + 4.252432823181152, + 4.254125595092773, + 4.2558183670043945, + 4.257511138916016, + 4.259203910827637, + 4.2608962059021, + 4.262588977813721, + 4.2642822265625, + 4.265974521636963, + 4.267666816711426, + 4.269359588623047, + 4.271052837371826, + 4.272745132446289, + 4.27443790435791, + 4.276130676269531, + 4.277823448181152, + 4.279515743255615, + 4.2812089920043945, + 4.282901763916016, + 4.2845940589904785, + 4.286286354064941, + 4.287979602813721, + 4.289672374725342, + 4.291364669799805, + 4.293057441711426, + 4.294750213623047, + 4.296442985534668, + 4.298135757446289, + 4.29982852935791, + 4.301521301269531, + 4.303213596343994, + 4.304906368255615, + 4.306599140167236, + 4.308291912078857, + 4.30998420715332, + 4.3116774559021, + 4.313370227813721, + 4.315062522888184, + 4.316755294799805, + 4.318448066711426, + 4.320140838623047, + 4.321833610534668, + 4.323526382446289, + 4.32521915435791, + 4.326911449432373, + 4.328604221343994, + 4.330296993255615, + 4.331989765167236, + 4.333682060241699, + 4.33537483215332, + 4.337067604064941, + 4.3387603759765625, + 4.340453147888184, + 4.342145919799805, + 4.343838691711426, + 4.345530986785889, + 4.34722375869751, + 4.348916530609131, + 4.350609302520752, + 4.352301597595215, + 4.353994369506836, + 4.355687141418457, + 4.357379913330078, + 4.359072685241699, + 4.36076545715332, + 4.362458229064941, + 4.3641510009765625, + 4.365843772888184, + 4.367536544799805, + 4.369228839874268, + 4.370921611785889, + 4.37261438369751, + 4.374307155609131, + 4.375999450683594, + 4.377692222595215, + 4.379384994506836, + 4.381077766418457, + 4.382770538330078, + 4.384463310241699, + 4.38615608215332, + 4.387848377227783, + 4.389541149139404, + 4.391233921051025, + 4.3929266929626465, + 4.394618988037109, + 4.3963117599487305, + 4.398004531860352, + 4.399697303771973, + 4.401331424713135, + 4.402953147888184, + 4.404574871063232, + 4.406196117401123, + 4.407817363739014, + 4.409439563751221, + 4.411060810089111, + 4.41268253326416, + 4.414303779602051, + 4.4159255027771, + 4.41754674911499, + 4.419168472290039, + 4.42078971862793, + 4.4224114418029785, + 4.424032688140869, + 4.425654411315918, + 4.427275657653809, + 4.428897380828857, + 4.430518627166748, + 4.432140350341797, + 4.4337615966796875, + 4.435382843017578, + 4.437005043029785, + 4.438626289367676, + 4.440247535705566, + 4.441868782043457, + 4.443490982055664, + 4.445112228393555, + 4.446733474731445, + 4.448355197906494, + 4.449976444244385, + 4.451598167419434, + 4.453219413757324, + 4.454841136932373, + 4.456462383270264, + 4.4580841064453125, + 4.459705352783203, + 4.461327075958252, + 4.462948322296143, + 4.464570045471191, + 4.466191291809082, + 4.467813014984131, + 4.4694342613220215, + 4.4710564613342285, + 4.472677707672119, + 4.47429895401001, + 4.475920677185059, + 4.477542400360107, + 4.479163646697998, + 4.480784893035889, + 4.4824066162109375, + 4.484028339385986, + 4.485649585723877, + 4.487271308898926, + 4.488893032073975, + 4.490514278411865, + 4.492136001586914, + 4.493757247924805, + 4.4953789710998535, + 4.497000217437744, + 4.498621940612793, + 4.500243186950684, + 4.501864910125732, + 4.503486156463623, + 4.505107879638672, + 4.5067291259765625, + 4.508350849151611, + 4.50997257232666, + 4.511593818664551, + 4.513215065002441, + 4.514836311340332, + 4.516458511352539, + 4.51807975769043, + 4.51970100402832, + 4.521322250366211, + 4.52294397354126, + 4.524565696716309, + 4.526186943054199, + 4.52780818939209, + 4.529430389404297, + 4.5310516357421875, + 4.532672882080078, + 4.534294605255127, + 4.535915851593018, + 4.537537574768066, + 4.539158821105957, + 4.540780544281006, + 4.5424017906188965, + 4.544023513793945, + 4.545645236968994, + 4.547266483306885, + 4.548888206481934, + 4.550540924072266, + 4.5522613525390625, + 4.553980827331543, + 4.55570125579834, + 4.557421684265137, + 4.559141635894775, + 4.560862064361572, + 4.562582015991211, + 4.564302444458008, + 4.5660223960876465, + 4.567742824554443, + 4.56946325302124, + 4.571183681488037, + 4.572904109954834, + 4.574624061584473, + 4.5763444900512695, + 4.578064441680908, + 4.579784393310547, + 4.581504821777344, + 4.583225250244141, + 4.5849456787109375, + 4.586665630340576, + 4.588385581970215, + 4.590106010437012, + 4.59182596206665, + 4.593546390533447, + 4.595266819000244, + 4.596987247467041, + 4.59870719909668, + 4.600427627563477, + 4.602148056030273, + 4.60386848449707, + 4.605587959289551, + 4.607308387756348, + 4.6090288162231445, + 4.610749244689941, + 4.612468719482422, + 4.614189147949219, + 4.615909576416016, + 4.617629528045654, + 4.619349956512451, + 4.621070384979248, + 4.622790813446045, + 4.624510765075684, + 4.626230716705322, + 4.627951622009277, + 4.629671573638916, + 4.631391525268555, + 4.633111953735352, + 4.634832382202148, + 4.636552810668945, + 4.638272762298584, + 4.639992713928223, + 4.6417131423950195, + 4.643433094024658, + 4.645153522491455, + 4.646873950958252, + 4.648594379425049, + 4.6503143310546875, + 4.652034282684326, + 4.653754711151123, + 4.65547513961792, + 4.657195568084717, + 4.6589155197143555, + 4.660635948181152, + 4.662356376647949, + 4.66407585144043, + 4.665796279907227, + 4.667516708374023, + 4.669236660003662, + 4.670957088470459, + 4.672677516937256, + 4.674397945404053, + 4.676117897033691, + 4.67783784866333, + 4.679558277130127, + 4.681278705596924, + 4.682999134063721, + 4.684719085693359, + 4.686439514160156, + 4.688159465789795, + 4.689879417419434, + 4.6915998458862305, + 4.693320274353027, + 4.695040702819824, + 4.696760654449463, + 4.698480606079102, + 4.7002363204956055, + 4.702260494232178, + 4.704284191131592, + 4.706308364868164, + 4.708332538604736, + 4.710355758666992, + 4.712380409240723, + 4.7144036293029785, + 4.716427803039551, + 4.718451976776123, + 4.720475196838379, + 4.722499370574951, + 4.724523067474365, + 4.7265472412109375, + 4.72857141494751, + 4.730594635009766, + 4.732619285583496, + 4.734642505645752, + 4.736666679382324, + 4.7386908531188965, + 4.740714073181152, + 4.742738246917725, + 4.744761943817139, + 4.746786117553711, + 4.748810291290283, + 4.750833511352539, + 4.7528581619262695, + 4.754881381988525, + 4.756905555725098, + 4.75892972946167, + 4.760953426361084, + 4.762977600097656, + 4.76500129699707, + 4.767024993896484, + 4.769049167633057, + 4.7710723876953125, + 4.773097038269043, + 4.775120258331299, + 4.777144432067871, + 4.779168605804443, + 4.781191825866699, + 4.78321647644043, + 4.7852396965026855, + 4.787263870239258, + 4.78928804397583, + 4.791311264038086, + 4.793335914611816, + 4.795359134674072, + 4.7973833084106445, + 4.799407482147217, + 4.801431179046631, + 4.803455352783203, + 4.805479049682617, + 4.807502746582031, + 4.8095269203186035, + 4.811550617218018, + 4.81357479095459, + 4.815598487854004, + 4.817622184753418, + 4.81964635848999, + 4.821669578552246, + 4.823694229125977, + 4.825717449188232, + 4.827741622924805, + 4.829765796661377, + 4.831789016723633, + 4.833813667297363, + 4.835836887359619, + 4.837861061096191, + 4.839885234832764, + 4.841908931732178, + 4.84393310546875, + 4.845956802368164, + 4.847980499267578, + 4.850006103515625, + 4.852660655975342, + 4.855315208435059, + 4.857970237731934, + 4.86062479019165, + 4.863279819488525, + 4.8659348487854, + 4.868589401245117, + 4.871243953704834, + 4.873898506164551, + 4.876553535461426, + 4.879208087921143, + 4.881862640380859, + 4.884518146514893, + 4.887172698974609, + 4.889827728271484, + 4.892482280731201, + 4.895136833190918, + 4.897791862487793, + 4.90044641494751, + 4.903100967407227, + 4.905755996704102, + 4.908410549163818, + 4.911065101623535, + 4.91372013092041, + 4.916375160217285, + 4.919029712677002, + 4.921684265136719, + 4.924339294433594, + 4.9269938468933105, + 4.929648399353027, + 4.932303428649902, + 4.934958457946777, + 4.937613010406494, + 4.940267562866211, + 4.942922592163086, + 4.945577144622803, + 4.948232173919678, + 4.950887203216553, + 4.9535417556762695, + 4.9561967849731445, + 4.958850860595703, + 4.961505889892578, + 4.964160442352295, + 4.96681547164917, + 4.969470500946045, + 4.972125053405762, + 4.974780082702637, + 4.9774346351623535, + 4.9800896644592285, + 4.982744216918945, + 4.98539924621582, + 4.988053321838379, + 4.990708351135254, + 4.993362903594971, + 4.996017932891846 + ], + "xaxis": "x2", + "yaxis": "y2" + } + ], + "layout": { + "annotations": [ + { + "font": { + "size": 16 + }, + "showarrow": false, + "text": "PDF", + "x": 0.225, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "bottom", + "yref": "paper" + }, + { + "font": { + "size": 16 + }, + "showarrow": false, + "text": "Samples", + "x": 0.775, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "bottom", + "yref": "paper" + } + ], + "height": 400, + "hovermode": false, + "margin": { + "b": 20, + "l": 20, + "r": 20, + "t": 50 + }, + "showlegend": false, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "xaxis": { + "anchor": "y", + "domain": [ + 0, + 0.45 + ], + "title": { + "text": "Distance" + } + }, + "xaxis2": { + "anchor": "y2", + "domain": [ + 0.55, + 1 + ], + "title": { + "text": "Distance" + } + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0, + 1 + ] + }, + "yaxis2": { + "anchor": "x2", + "domain": [ + 0, + 1 + ], + "title": { + "text": "# Samples" + } + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# COLLAPSED\n", + "import torch\n", + "from nerfstudio.cameras.rays import RayBundle\n", + "from nerfstudio.model_components import ray_sampler\n", + "import plotly.graph_objects as go\n", + "from plotly.subplots import make_subplots\n", + "\n", + "num_coarse_samples = 20\n", + "num_samples = 1000\n", + "near = 2\n", + "far = 5\n", + "train_stratified = False\n", + "\n", + "fig = make_subplots(\n", + " rows=1,\n", + " cols=2,\n", + " subplot_titles=(\"PDF\", \"Samples\"),\n", + ")\n", + "\n", + "uniform_sampler = ray_sampler.UniformSampler(num_samples=num_coarse_samples, train_stratified=train_stratified)\n", + "pdf_sampler = ray_sampler.PDFSampler(num_samples=num_samples, train_stratified=train_stratified, include_original=False)\n", + "\n", + "ray_bundle = RayBundle(\n", + " origins=torch.ones([1, 3]),\n", + " directions=torch.ones([1, 3]),\n", + " pixel_area=torch.ones([1, 1]),\n", + " nears=torch.ones([1, 1]) * near,\n", + " fars=torch.ones([1, 1]) * far,\n", + ")\n", + "\n", + "coarse_ray_samples = uniform_sampler(ray_bundle)\n", + "\n", + "# Generate arbitrary PDF\n", + "weights = torch.ones(num_coarse_samples)\n", + "weights += torch.sin(torch.linspace(0, 3 * torch.pi, num_coarse_samples))\n", + "weights += torch.sin(torch.linspace(0, 0.5 * torch.pi, num_coarse_samples))\n", + "weights -= torch.min(weights)\n", + "weights /= torch.sum(weights)\n", + "\n", + "samples = pdf_sampler.generate_ray_samples(ray_bundle, coarse_ray_samples, weights[None, :, None], num_samples)\n", + "\n", + "# Plotting stuff\n", + "x = torch.ones((num_coarse_samples * 2))\n", + "x[::2] = coarse_ray_samples.frustums.starts[0, :, 0]\n", + "x[1::2] = coarse_ray_samples.frustums.ends[0, :, 0]\n", + "\n", + "y = torch.ones((num_coarse_samples * 2))\n", + "y[::2] = weights\n", + "y[1::2] = weights\n", + "\n", + "pdf_trace = go.Scatter(x=x, y=y)\n", + "fig.append_trace(pdf_trace, 1, 1)\n", + "\n", + "samples_trace = go.Histogram(x=samples.frustums.starts[0, :, 0], nbinsx=100)\n", + "fig.append_trace(samples_trace, 1, 2)\n", + "\n", + "fig.update_yaxes(title_text=\"# Samples\", row=1, col=2)\n", + "fig.update_xaxes(title_text=\"Distance\", row=1, col=1)\n", + "fig.update_xaxes(title_text=\"Distance\", row=1, col=2)\n", + "\n", + "# Overlay both histograms\n", + "fig.update_layout(height=400, hovermode=False, showlegend=False, margin=dict(l=20, r=20, t=50, b=20))\n", + "fig.update_traces(opacity=0.7)\n", + "fig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.7" + }, + "vscode": { + "interpreter": { + "hash": "916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1" + } + } + }, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/docs/quickstart/custom_dataset.md b/docs/quickstart/custom_dataset.md index a83d59218..ebd77a5f5 100644 --- a/docs/quickstart/custom_dataset.md +++ b/docs/quickstart/custom_dataset.md @@ -259,6 +259,8 @@ ns-train nerfacto --data {output directory} ## Metashape +All images must use the same sensor type (but multiple sensors are supported). + 1. Align your images using Metashape. `File -> Workflow -> Align Photos...` ```{image} https://user-images.githubusercontent.com/3310961/203389662-12760210-2b52-49d4-ab21-4f23bfa4a2b3.png diff --git a/docs/quickstart/export_geometry.md b/docs/quickstart/export_geometry.md index 28d29fc54..2ffd51895 100644 --- a/docs/quickstart/export_geometry.md +++ b/docs/quickstart/export_geometry.md @@ -19,7 +19,6 @@ Poisson surface reconstruction gives the highest quality meshes. See the steps b > **Note:** > This will only work with a Model that computes or predicts normals, e.g., nerfacto. - 1. Train nerfacto with network settings that predict normals. ```bash @@ -51,7 +50,7 @@ ns-export --help Say you want to simplify and/or smooth a mesh offline, and then you want to texture it with NeRF. You can do that with the following command. It will work for any mesh filetypes that [PyMeshLab](https://pymeshlab.readthedocs.io/en/latest/) can support, for example a `.ply`. ```python -python scripts/texture.py --load-config CONFIG.yml --input-mesh-filename FILENAME --output-dir OUTPUT_DIR +python nerfstudio/scripts/texture.py --load-config CONFIG.yml --input-mesh-filename FILENAME --output-dir OUTPUT_DIR ``` ## Dependencies diff --git a/docs/quickstart/first_nerf.md b/docs/quickstart/first_nerf.md index 73e40a9d8..1d71fac49 100644 --- a/docs/quickstart/first_nerf.md +++ b/docs/quickstart/first_nerf.md @@ -38,8 +38,6 @@ It is possible to load a pretrained model by running ns-train nerfacto --data data/nerfstudio/poster --load-dir {outputs/.../nerfstudio_models} ``` -This will automatically start training. If you do not want it to train, add `--viewer.start-train False` to your training command. - ## Visualize existing run Given a pretrained model checkpoint, you can start the viewer by running @@ -98,9 +96,9 @@ ns-train nerfacto nerfstudio-data --help Each script will have some other minor quirks (like the training script dataparser subcommand needing to come after the model subcommand), read up on them [here](../reference/cli/index.md). -## Tensorboard / WandB +## Tensorboard / WandB / Viewer -We support three different methods to track training progress, using the viewer, [tensorboard](https://www.tensorflow.org/tensorboard), and [Weights and Biases](https://wandb.ai/site). You can specify which visualizer to use by appending `--vis {viewer, tensorboard, wandb}` to the training command. Note that only one may be used at a time. Additionally the viewer only works for methods that are fast (ie. nerfacto, instant-ngp), for slower methods like NeRF, use the other loggers. +We support three different methods to track training progress, using the viewer, [tensorboard](https://www.tensorflow.org/tensorboard), and [Weights and Biases](https://wandb.ai/site). You can specify which visualizer to use by appending `--vis {viewer, tensorboard, wandb, viewer+wandb, viewer+tensorboard}` to the training command. Simultaneously utilizing the viewer alongside wandb or tensorboard may cause stuttering issues during evaluation steps. The viewer only works for methods that are fast (ie. nerfacto, instant-ngp), for slower methods like NeRF, use the other loggers. ## Evaluating Runs diff --git a/docs/quickstart/installation.md b/docs/quickstart/installation.md index dafb9f0ee..58f9ffe1d 100644 --- a/docs/quickstart/installation.md +++ b/docs/quickstart/installation.md @@ -33,7 +33,7 @@ Install CUDA 11.7. You can find CUDA download links [here](https://developer.nvi ## Create environment -Nerfstudio requires `python >= 3.7`. We recommend using conda to manage dependencies. Make sure to install [Conda](https://docs.conda.io/en/latest/miniconda.html) before proceeding. +Nerfstudio requires `python >= 3.8`. We recommend using conda to manage dependencies. Make sure to install [Conda](https://docs.conda.io/en/latest/miniconda.html) before proceeding. ```bash conda create --name nerfstudio -y python=3.8 diff --git a/docs/reference/api/data/datamanagers.rst b/docs/reference/api/data/datamanagers.rst index 7779c9e10..43e5d6cce 100644 --- a/docs/reference/api/data/datamanagers.rst +++ b/docs/reference/api/data/datamanagers.rst @@ -7,25 +7,4 @@ Base ---------------- .. automodule:: nerfstudio.data.datamanagers.base_datamanager - :members: - -Depth Datamanager ------------------ - -.. automodule:: nerfstudio.data.datamanagers.depth_datamanager - :members: - :show-inheritance: - -SDF Datamanager ----------------- - -.. automodule:: nerfstudio.data.datamanagers.sdf_datamanager - :members: - :show-inheritance: - -Semantic Datamanager ---------------------- - -.. automodule:: nerfstudio.data.datamanagers.semantic_datamanager - :members: - :show-inheritance: \ No newline at end of file + :members: \ No newline at end of file diff --git a/docs/reference/cli/index.md b/docs/reference/cli/index.md index 7bc95834f..4daee6555 100644 --- a/docs/reference/cli/index.md +++ b/docs/reference/cli/index.md @@ -6,16 +6,16 @@ We provide a command line interface for training your own NeRFs (no coding neces Here are the popular commands that we offer. If you've cloned the repo, you can also look at the [pyproject.toml file](https://github.com/nerfstudio-project/nerfstudio/blob/main/pyproject.toml) at the `[project.scripts]` section for details. -| Command | Description | Filename | -| ------------------------------------ | -------------------------------------- | ---------------------------------- | -| [ns-install-cli](ns_install_cli) | Install tab completion for all scripts | scripts/completions/install.py | -| [ns-process-data](ns_process_data) | Generate a dataset from your own data | scripts/process_data.py | -| [ns-download-data](ns_download_data) | Download existing captures | scripts/downloads/download_data.py | -| [ns-train](ns_train) | Generate a NeRF | scripts/train.py | -| [ns-viewer](ns_viewer) | View a trained NeRF | scripts/viewer/run_viewer.py | -| [ns-eval](ns_eval) | Run evaluation metrics for your Model | scripts/eval.py | -| [ns-render](ns_render) | Render out a video of your NeRF | scripts/render.py | -| [ns-export](ns_export) | Export a NeRF into other formats | scripts/exporter.py | +| Command | Description | Filename | +| ------------------------------------ | -------------------------------------- | --------------------------------------------- | +| [ns-install-cli](ns_install_cli) | Install tab completion for all scripts | nerfstudio/scripts/completions/install.py | +| [ns-process-data](ns_process_data) | Generate a dataset from your own data | nerfstudio/scripts/process_data.py | +| [ns-download-data](ns_download_data) | Download existing captures | nerfstudio/scripts/downloads/download_data.py | +| [ns-train](ns_train) | Generate a NeRF | nerfstudio/scripts/train.py | +| [ns-viewer](ns_viewer) | View a trained NeRF | nerfstudio/scripts/viewer/run_viewer.py | +| [ns-eval](ns_eval) | Run evaluation metrics for your Model | nerfstudio/scripts/eval.py | +| [ns-render](ns_render) | Render out a video of your NeRF | nerfstudio/scripts/render.py | +| [ns-export](ns_export) | Export a NeRF into other formats | nerfstudio/scripts/exporter.py | ```{toctree} :maxdepth: 1 diff --git a/docs/reference/cli/ns_download_data.md b/docs/reference/cli/ns_download_data.md index d096b4e07..1105ef12b 100644 --- a/docs/reference/cli/ns_download_data.md +++ b/docs/reference/cli/ns_download_data.md @@ -2,7 +2,7 @@ ```{eval-rst} .. argparse:: - :module: scripts.downloads.download_data + :module: nerfstudio.scripts.downloads.download_data :func: get_parser_fn :prog: ns-download-data :nodefault: diff --git a/docs/reference/cli/ns_eval.md b/docs/reference/cli/ns_eval.md index a794ac9e8..86e4aa0ba 100644 --- a/docs/reference/cli/ns_eval.md +++ b/docs/reference/cli/ns_eval.md @@ -2,7 +2,7 @@ ```{eval-rst} .. argparse:: - :module: scripts.eval + :module: nerfstudio.scripts.eval :func: get_parser_fn :prog: ns-eval :nodefault: diff --git a/docs/reference/cli/ns_export.md b/docs/reference/cli/ns_export.md index cdfc54f2f..839211915 100644 --- a/docs/reference/cli/ns_export.md +++ b/docs/reference/cli/ns_export.md @@ -2,7 +2,7 @@ ```{eval-rst} .. argparse:: - :module: scripts.exporter + :module: nerfstudio.scripts.exporter :func: get_parser_fn :prog: ns-export :nodefault: diff --git a/docs/reference/cli/ns_install_cli.md b/docs/reference/cli/ns_install_cli.md index e9c1a9541..30fa9598f 100644 --- a/docs/reference/cli/ns_install_cli.md +++ b/docs/reference/cli/ns_install_cli.md @@ -2,7 +2,7 @@ ```{eval-rst} .. argparse:: - :module: scripts.completions.install + :module: nerfstudio.scripts.completions.install :func: get_parser_fn :prog: ns-install-cli :nodefault: diff --git a/docs/reference/cli/ns_process_data.md b/docs/reference/cli/ns_process_data.md index bb5bd24ac..9f9540d44 100644 --- a/docs/reference/cli/ns_process_data.md +++ b/docs/reference/cli/ns_process_data.md @@ -8,7 +8,7 @@ You may also want to install [hloc](https://github.com/cvg/Hierarchical-Localiza ```{eval-rst} .. argparse:: - :module: scripts.process_data + :module: nerfstudio.scripts.process_data :func: get_parser_fn :prog: ns-process-data :nodefault: diff --git a/docs/reference/cli/ns_render.md b/docs/reference/cli/ns_render.md index 7a01f9bae..e006e62ee 100644 --- a/docs/reference/cli/ns_render.md +++ b/docs/reference/cli/ns_render.md @@ -7,7 +7,7 @@ Make sure to have [FFmpeg](https://ffmpeg.org/download.html) installed. ```{eval-rst} .. argparse:: - :module: scripts.render + :module: nerfstudio.scripts.render :func: get_parser_fn :prog: ns-render :nodefault: diff --git a/docs/reference/cli/ns_viewer.md b/docs/reference/cli/ns_viewer.md index 841472a5f..bb6333550 100644 --- a/docs/reference/cli/ns_viewer.md +++ b/docs/reference/cli/ns_viewer.md @@ -2,7 +2,7 @@ ```{eval-rst} .. argparse:: - :module: scripts.viewer.run_viewer + :module: nerfstudio.scripts.viewer.run_viewer :func: get_parser_fn :prog: ns-viewer :nodefault: diff --git a/docs/reference/contributing.md b/docs/reference/contributing.md index a9651cbed..101cb873e 100644 --- a/docs/reference/contributing.md +++ b/docs/reference/contributing.md @@ -7,13 +7,14 @@ Below, we document the contribution pipeline and good-to-knows for when you're r The project is set up for development in VSCode, we recommend using it if you plan to contribute. ## Overview + Below are the various tooling features our team uses to maintain this codebase. -| Tooling | Support | -| --------------- | ------------- | -| Linter | [Black](https://black.readthedocs.io/en/stable/) | -| Testing | [PyTest](https://docs.pytest.org/en/7.1.x/) | -| Docs | [Sphinx](https://www.sphinx-doc.org/en/master/) | +| Tooling | Support | +| --------------- | ---------------------------------------------------------- | +| Linter | [Black](https://black.readthedocs.io/en/stable/) | +| Testing | [PyTest](https://docs.pytest.org/en/7.1.x/) | +| Docs | [Sphinx](https://www.sphinx-doc.org/en/master/) | | Docstring style | [Google](https://google.github.io/styleguide/pyguide.html) | ## Requirements @@ -53,8 +54,8 @@ conda install -c conda-forge pandoc :::{admonition} Attention :class: attention - In order to merge changes to the code base, all of these checks must be passing. If you pass these tests locally, you will likely pass on github servers as well (results in a green checkmark next to your commit). - ::: + In order to merge changes to the code base, all of these checks must be passing. If you pass these tests locally, you will likely pass on github servers as well (results in a green checkmark next to your commit). + ::: 3. Open pull request! 💌 @@ -65,7 +66,7 @@ conda install -c conda-forge pandoc Run the following to build the documentation: ```bash -python scripts/docs/build_docs.py +python nerfstudio/scripts/docs/build_docs.py ``` :::{admonition} Tip @@ -84,7 +85,7 @@ If you want the code to build on save you can use [sphinx autobuild](https://git :class: info If changes to the structure are made, the build files may be incorrect. - ::: +::: ```bash pip install sphinx-autobuild diff --git a/nerfstudio/cameras/camera_optimizers.py b/nerfstudio/cameras/camera_optimizers.py index afd002a71..4b37f2072 100644 --- a/nerfstudio/cameras/camera_optimizers.py +++ b/nerfstudio/cameras/camera_optimizers.py @@ -20,13 +20,13 @@ from __future__ import annotations import functools from dataclasses import dataclass, field -from typing import Type, Union +from typing import Literal, Type, Union import torch import tyro from torch import nn from torchtyping import TensorType -from typing_extensions import Literal, assert_never +from typing_extensions import assert_never from nerfstudio.cameras.lie_groups import exp_map_SE3, exp_map_SO3xR3 from nerfstudio.configs.base_config import InstantiateConfig diff --git a/nerfstudio/cameras/camera_utils.py b/nerfstudio/cameras/camera_utils.py index 8486f1097..7c2364929 100644 --- a/nerfstudio/cameras/camera_utils.py +++ b/nerfstudio/cameras/camera_utils.py @@ -17,13 +17,12 @@ Camera transformation helper code. """ import math -from typing import List, Optional, Tuple +from typing import List, Literal, Optional, Tuple import numpy as np import torch from numpy.typing import ArrayLike from torchtyping import TensorType -from typing_extensions import Literal _EPS = np.finfo(float).eps * 4.0 diff --git a/nerfstudio/cameras/cameras.py b/nerfstudio/cameras/cameras.py index 0dec377c9..9d0fb26d8 100644 --- a/nerfstudio/cameras/cameras.py +++ b/nerfstudio/cameras/cameras.py @@ -17,7 +17,6 @@ Camera Models """ import base64 import math -import os from dataclasses import dataclass from enum import Enum, auto from typing import Dict, List, Optional, Tuple, Union @@ -33,7 +32,6 @@ import nerfstudio.utils.poses as pose_utils from nerfstudio.cameras import camera_utils from nerfstudio.cameras.rays import RayBundle from nerfstudio.data.scene_box import SceneBox -from nerfstudio.utils.misc import strtobool from nerfstudio.utils.tensor_dataclass import TensorDataclass TORCH_DEVICE = Union[torch.device, str] # pylint: disable=invalid-name @@ -150,8 +148,6 @@ class Cameras(TensorDataclass): self.__post_init__() # This will do the dataclass post_init and broadcast all the tensors - self._use_nerfacc = strtobool(os.environ.get("INTERSECT_WITH_NERFACC", "TRUE")) - def _init_get_fc_xy(self, fc_xy: Union[float, torch.Tensor], name: str) -> torch.Tensor: """ Parses the input focal length / principle point x or y and returns a tensor of the correct shape diff --git a/nerfstudio/configs/base_config.py b/nerfstudio/configs/base_config.py index 5731091ac..2a76c325c 100644 --- a/nerfstudio/configs/base_config.py +++ b/nerfstudio/configs/base_config.py @@ -21,9 +21,7 @@ from __future__ import annotations import warnings from dataclasses import dataclass from pathlib import Path -from typing import Any, List, Optional, Tuple, Type - -from typing_extensions import Literal +from typing import Any, List, Literal, Optional, Tuple, Type # model instances from nerfstudio.utils import writer diff --git a/nerfstudio/configs/config_utils.py b/nerfstudio/configs/config_utils.py index 59b1b252b..42bf7a082 100644 --- a/nerfstudio/configs/config_utils.py +++ b/nerfstudio/configs/config_utils.py @@ -26,6 +26,7 @@ from rich.console import Console CONSOLE = Console() # pylint: disable=import-outside-toplevel + # cannot use mutable types directly within dataclass; abstracting default factory calls def to_immutable_dict(d: Dict[str, Any]): """Method to convert mutable dict to default factory dict diff --git a/nerfstudio/configs/experiment_config.py b/nerfstudio/configs/experiment_config.py index 765c64ef7..0439f2af6 100644 --- a/nerfstudio/configs/experiment_config.py +++ b/nerfstudio/configs/experiment_config.py @@ -19,11 +19,10 @@ from __future__ import annotations from dataclasses import dataclass from datetime import datetime from pathlib import Path -from typing import Any, Dict, Optional +from typing import Any, Dict, Literal, Optional import yaml from rich.console import Console -from typing_extensions import Literal from nerfstudio.configs.base_config import ( InstantiateConfig, @@ -50,6 +49,8 @@ class ExperimentConfig(InstantiateConfig): """Method name. Required to set in python or via cli""" experiment_name: Optional[str] = None """Experiment name. If None, will automatically be set to dataset name""" + project_name: Optional[str] = "nerfstudio-project" + """Project name.""" timestamp: str = "{timestamp}" """Experiment timestamp.""" machine: MachineConfig = MachineConfig() diff --git a/nerfstudio/configs/method_configs.py b/nerfstudio/configs/method_configs.py index 2efac5bc8..4eb736023 100644 --- a/nerfstudio/configs/method_configs.py +++ b/nerfstudio/configs/method_configs.py @@ -24,14 +24,11 @@ import tyro from nerfstudio.cameras.camera_optimizers import CameraOptimizerConfig from nerfstudio.configs.base_config import ViewerConfig -from nerfstudio.data.datamanagers.base_datamanager import VanillaDataManagerConfig -from nerfstudio.data.datamanagers.depth_datamanager import DepthDataManagerConfig -from nerfstudio.data.datamanagers.dreamfusion_datamanager import ( - DreamFusionDataManagerConfig, +from nerfstudio.data.datamanagers.base_datamanager import ( + VanillaDataManager, + VanillaDataManagerConfig, ) -from nerfstudio.data.datamanagers.sdf_datamanager import SDFDataManagerConfig -from nerfstudio.data.datamanagers.semantic_datamanager import SemanticDataManagerConfig -from nerfstudio.data.datamanagers.iterative_datamanager import IterativeDataManagerConfig +from nerfstudio.data.datamanagers.dreamfusion_datamanager import DreamFusionDataManagerConfig from nerfstudio.data.dataparsers.blender_dataparser import BlenderDataParserConfig from nerfstudio.data.dataparsers.dnerf_dataparser import DNeRFDataParserConfig from nerfstudio.data.dataparsers.dycheck_dataparser import DycheckDataParserConfig @@ -44,6 +41,9 @@ from nerfstudio.data.dataparsers.phototourism_dataparser import ( ) from nerfstudio.data.dataparsers.sdfstudio_dataparser import SDFStudioDataParserConfig from nerfstudio.data.dataparsers.sitcoms3d_dataparser import Sitcoms3DDataParserConfig +from nerfstudio.data.datasets.depth_dataset import DepthDataset +from nerfstudio.data.datasets.sdf_dataset import SDFDataset +from nerfstudio.data.datasets.semantic_dataset import SemanticDataset from nerfstudio.engine.optimizers import AdamOptimizerConfig, RAdamOptimizerConfig from nerfstudio.engine.schedulers import ( CosineDecaySchedulerConfig, @@ -91,7 +91,8 @@ descriptions = { "dreamfusion": "Generative Text to NeRF model", "nerfplayer-nerfacto": "NeRFPlayer with nerfacto backbone.", "nerfplayer-ngp": "NeRFPlayer with InstantNGP backbone.", - "neus": "Implementation of NeuS. (slow)" + "neus": "Implementation of NeuS. (slow)", + "neus-facto": "Implementation of NeuS-Facto. (slow)", } method_configs["nerfacto"] = TrainerConfig( @@ -174,7 +175,8 @@ method_configs["depth-nerfacto"] = TrainerConfig( max_num_iterations=30000, mixed_precision=True, pipeline=VanillaPipelineConfig( - datamanager=DepthDataManagerConfig( + datamanager=VanillaDataManagerConfig( + _target=VanillaDataManager[DepthDataset], dataparser=NerfstudioDataParserConfig(), train_num_rays_per_batch=4096, eval_num_rays_per_batch=4096, @@ -320,8 +322,11 @@ method_configs["semantic-nerfw"] = TrainerConfig( max_num_iterations=30000, mixed_precision=True, pipeline=VanillaPipelineConfig( - datamanager=SemanticDataManagerConfig( - dataparser=Sitcoms3DDataParserConfig(), train_num_rays_per_batch=4096, eval_num_rays_per_batch=8192 + datamanager=VanillaDataManagerConfig( + _target=VanillaDataManager[SemanticDataset], + dataparser=Sitcoms3DDataParserConfig(), + train_num_rays_per_batch=4096, + eval_num_rays_per_batch=8192, ), model=SemanticNerfWModelConfig(eval_num_rays_per_chunk=1 << 16), ), @@ -371,7 +376,9 @@ method_configs["tensorf"] = TrainerConfig( train_num_rays_per_batch=4096, eval_num_rays_per_batch=4096, ), - model=TensoRFModelConfig(), + model=TensoRFModelConfig( + regularization="tv", + ), ), optimizers={ "fields": { @@ -710,7 +717,8 @@ method_configs["dreamembed"] = TrainerConfig( method_configs["nerfplayer-nerfacto"] = TrainerConfig( method_name="nerfplayer-nerfacto", pipeline=VanillaPipelineConfig( - datamanager=DepthDataManagerConfig( + datamanager=VanillaDataManagerConfig( + _target=VanillaDataManager[DepthDataset], dataparser=DycheckDataParserConfig(), train_num_rays_per_batch=4096, eval_num_rays_per_batch=4096, @@ -741,7 +749,11 @@ method_configs["nerfplayer-ngp"] = TrainerConfig( max_num_iterations=30000, mixed_precision=True, pipeline=DynamicBatchPipelineConfig( - datamanager=DepthDataManagerConfig(dataparser=DycheckDataParserConfig(), train_num_rays_per_batch=8192), + datamanager=VanillaDataManagerConfig( + _target=VanillaDataManager[DepthDataset], + dataparser=DycheckDataParserConfig(), + train_num_rays_per_batch=8192, + ), model=NerfplayerNGPModelConfig( eval_num_rays_per_chunk=8192, grid_levels=1, @@ -770,7 +782,8 @@ method_configs["neus"] = TrainerConfig( max_num_iterations=100000, mixed_precision=False, pipeline=VanillaPipelineConfig( - datamanager=SDFDataManagerConfig( + datamanager=VanillaDataManagerConfig( + _target=VanillaDataManager[SDFDataset], dataparser=SDFStudioDataParserConfig(), train_num_rays_per_batch=1024, eval_num_rays_per_batch=1024, @@ -803,7 +816,8 @@ method_configs["neus-facto"] = TrainerConfig( max_num_iterations=20001, mixed_precision=False, pipeline=VanillaPipelineConfig( - datamanager=SDFDataManagerConfig( + datamanager=VanillaDataManagerConfig( + _target=VanillaDataManager[SDFDataset], dataparser=SDFStudioDataParserConfig(), train_num_rays_per_batch=2048, eval_num_rays_per_batch=2048, @@ -845,12 +859,12 @@ method_configs["neus-facto"] = TrainerConfig( ) external_methods, external_descriptions = discover_methods() -method_configs.update(external_methods) -descriptions.update(external_descriptions) +all_methods = {**method_configs, **external_methods} +all_descriptions = {**descriptions, **external_descriptions} AnnotatedBaseConfigUnion = tyro.conf.SuppressFixed[ # Don't show unparseable (fixed) arguments in helptext. tyro.conf.FlagConversionOff[ - tyro.extras.subcommand_type_from_defaults(defaults=method_configs, descriptions=descriptions) + tyro.extras.subcommand_type_from_defaults(defaults=all_methods, descriptions=all_descriptions) ] ] """Union[] type over config types, annotated with default instances for use with diff --git a/nerfstudio/data/datamanagers/base_datamanager.py b/nerfstudio/data/datamanagers/base_datamanager.py index d696519af..beb41cf39 100644 --- a/nerfstudio/data/datamanagers/base_datamanager.py +++ b/nerfstudio/data/datamanagers/base_datamanager.py @@ -18,10 +18,11 @@ Datamanager. from __future__ import annotations +import functools from abc import abstractmethod from dataclasses import dataclass, field from pathlib import Path -from typing import Any, Dict, List, Optional, Tuple, Type, Union +from typing import Any, Dict, Generic, List, Literal, Optional, Tuple, Type, Union import torch import tyro @@ -30,7 +31,7 @@ from torch import nn from torch.nn import Parameter from torch.utils.data import Dataset from torch.utils.data.distributed import DistributedSampler -from typing_extensions import Literal +from typing_extensions import TypeVar from nerfstudio.cameras.camera_optimizers import CameraOptimizerConfig from nerfstudio.cameras.cameras import CameraType @@ -88,7 +89,7 @@ def variable_res_collate(batch: List[Dict]) -> Dict: image = data.pop("image") mask = data.pop("mask", None) images.append(image) - if mask: + if mask is not None: masks.append(mask) new_batch: dict = nerfstudio_collate(batch) @@ -367,7 +368,10 @@ class VanillaDataManagerConfig(DataManagerConfig): """Size of patch to sample from. If >1, patch-based sampling will be used.""" -class VanillaDataManager(DataManager): # pylint: disable=abstract-method +TDataset = TypeVar("TDataset", bound=InputDataset, default=InputDataset) + + +class VanillaDataManager(DataManager, Generic[TDataset]): # pylint: disable=abstract-method """Basic stored data manager implementation. This is pretty much a port over from our old dataloading utilities, and is a little jank @@ -381,8 +385,8 @@ class VanillaDataManager(DataManager): # pylint: disable=abstract-method """ config: VanillaDataManagerConfig - train_dataset: InputDataset - eval_dataset: InputDataset + train_dataset: TDataset + eval_dataset: TDataset train_dataparser_outputs: DataparserOutputs train_pixel_sampler: Optional[PixelSampler] = None eval_pixel_sampler: Optional[PixelSampler] = None @@ -396,6 +400,7 @@ class VanillaDataManager(DataManager): # pylint: disable=abstract-method local_rank: int = 0, **kwargs, # pylint: disable=unused-argument ): + self.dataset_type: Type[TDataset] = kwargs.get("_dataset_type", TDataset.__default__) self.config = config self.device = device self.world_size = world_size @@ -426,22 +431,29 @@ class VanillaDataManager(DataManager): # pylint: disable=abstract-method super().__init__() - def create_train_dataset(self) -> InputDataset: + def __class_getitem__(cls, item): + return type( + cls.__name__, + (cls,), + {"__module__": cls.__module__, "__init__": functools.partialmethod(cls.__init__, _dataset_type=item)}, + ) + + def create_train_dataset(self) -> TDataset: """Sets up the data loaders for training""" - return InputDataset( + return self.dataset_type( dataparser_outputs=self.train_dataparser_outputs, scale_factor=self.config.camera_res_scale_factor, ) - def create_eval_dataset(self) -> InputDataset: + def create_eval_dataset(self) -> TDataset: """Sets up the data loaders for evaluation""" - return InputDataset( + return self.dataset_type( dataparser_outputs=self.dataparser.get_dataparser_outputs(split=self.test_split), scale_factor=self.config.camera_res_scale_factor, ) def _get_pixel_sampler( # pylint: disable=no-self-use - self, dataset: InputDataset, *args: Any, **kwargs: Any + self, dataset: TDataset, *args: Any, **kwargs: Any ) -> PixelSampler: """Infer pixel sampler to use.""" if self.config.patch_size > 1: diff --git a/nerfstudio/data/datamanagers/depth_datamanager.py b/nerfstudio/data/datamanagers/depth_datamanager.py deleted file mode 100644 index 465e79e2d..000000000 --- a/nerfstudio/data/datamanagers/depth_datamanager.py +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 2022 The Nerfstudio Team. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Depth datamanager. -""" - -from dataclasses import dataclass, field -from typing import Type - -from nerfstudio.data.datamanagers import base_datamanager -from nerfstudio.data.datasets.depth_dataset import DepthDataset - - -@dataclass -class DepthDataManagerConfig(base_datamanager.VanillaDataManagerConfig): - """A depth datamanager - required to use with .setup()""" - - _target: Type = field(default_factory=lambda: DepthDataManager) - - -class DepthDataManager(base_datamanager.VanillaDataManager): # pylint: disable=abstract-method - """Data manager implementation for data that also requires processing depth data. - Args: - config: the DataManagerConfig used to instantiate class - """ - - def create_train_dataset(self) -> DepthDataset: - self.train_dataparser_outputs = self.dataparser.get_dataparser_outputs(split="train") - return DepthDataset( - dataparser_outputs=self.train_dataparser_outputs, - ) - - def create_eval_dataset(self) -> DepthDataset: - return DepthDataset( - dataparser_outputs=self.dataparser.get_dataparser_outputs(split=self.test_split), - ) diff --git a/nerfstudio/data/datamanagers/sdf_datamanager.py b/nerfstudio/data/datamanagers/sdf_datamanager.py deleted file mode 100644 index e1aca46df..000000000 --- a/nerfstudio/data/datamanagers/sdf_datamanager.py +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 2022 The Nerfstudio Team. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -SDF datamanager. -""" - -from dataclasses import dataclass, field -from typing import Type - -from nerfstudio.data.datamanagers import base_datamanager -from nerfstudio.data.datasets.sdf_dataset import SDFDataset - - -@dataclass -class SDFDataManagerConfig(base_datamanager.VanillaDataManagerConfig): - """A sdf datamanager - required to use with .setup()""" - - _target: Type = field(default_factory=lambda: SDFDataManager) - - -class SDFDataManager(base_datamanager.VanillaDataManager): # pylint: disable=abstract-method - """Data manager implementation for data that also requires processing sdf data. - Args: - config: the DataManagerConfig used to instantiate class - """ - - def create_train_dataset(self) -> SDFDataset: - self.train_dataparser_outputs = self.dataparser.get_dataparser_outputs(split="train") - return SDFDataset( - dataparser_outputs=self.train_dataparser_outputs, - ) - - def create_eval_dataset(self) -> SDFDataset: - return SDFDataset( - dataparser_outputs=self.dataparser.get_dataparser_outputs(split=self.test_split), - ) diff --git a/nerfstudio/data/datamanagers/semantic_datamanager.py b/nerfstudio/data/datamanagers/semantic_datamanager.py deleted file mode 100644 index 322b1d3bd..000000000 --- a/nerfstudio/data/datamanagers/semantic_datamanager.py +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 2022 The Nerfstudio Team. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Semantic datamanager. -""" - -from dataclasses import dataclass, field -from typing import Type - -from nerfstudio.data.datamanagers.base_datamanager import ( - VanillaDataManager, - VanillaDataManagerConfig, -) -from nerfstudio.data.datasets.semantic_dataset import SemanticDataset - - -@dataclass -class SemanticDataManagerConfig(VanillaDataManagerConfig): - """A semantic datamanager - required to use with .setup()""" - - _target: Type = field(default_factory=lambda: SemanticDataManager) - - -class SemanticDataManager(VanillaDataManager): # pylint: disable=abstract-method - """Data manager implementation for data that also requires processing semantic data. - - Args: - config: the DataManagerConfig used to instantiate class - """ - - def create_train_dataset(self) -> SemanticDataset: - self.train_dataparser_outputs = self.dataparser.get_dataparser_outputs(split="train") - return SemanticDataset( - dataparser_outputs=self.train_dataparser_outputs, - scale_factor=self.config.camera_res_scale_factor, - ) - - def create_eval_dataset(self) -> SemanticDataset: - return SemanticDataset( - dataparser_outputs=self.dataparser.get_dataparser_outputs(split=self.test_split), - scale_factor=self.config.camera_res_scale_factor, - ) diff --git a/nerfstudio/data/dataparsers/arkitscenes_dataparser.py b/nerfstudio/data/dataparsers/arkitscenes_dataparser.py index a92745bc6..0ee105196 100644 --- a/nerfstudio/data/dataparsers/arkitscenes_dataparser.py +++ b/nerfstudio/data/dataparsers/arkitscenes_dataparser.py @@ -16,12 +16,11 @@ import math from dataclasses import dataclass, field from pathlib import Path -from typing import Type +from typing import Literal, Type import cv2 import numpy as np import torch -from typing_extensions import Literal from nerfstudio.cameras import camera_utils from nerfstudio.cameras.cameras import Cameras, CameraType diff --git a/nerfstudio/data/dataparsers/base_dataparser.py b/nerfstudio/data/dataparsers/base_dataparser.py index f92b34172..74d934ced 100644 --- a/nerfstudio/data/dataparsers/base_dataparser.py +++ b/nerfstudio/data/dataparsers/base_dataparser.py @@ -20,11 +20,10 @@ import json from abc import abstractmethod from dataclasses import dataclass, field from pathlib import Path -from typing import Any, Dict, List, Optional, Type +from typing import Any, Dict, List, Literal, Optional, Type import torch from torchtyping import TensorType -from typing_extensions import Literal import nerfstudio.configs.base_config as cfg from nerfstudio.cameras.cameras import Cameras diff --git a/nerfstudio/data/dataparsers/blender_dataparser.py b/nerfstudio/data/dataparsers/blender_dataparser.py index f1044e826..b365f95cb 100644 --- a/nerfstudio/data/dataparsers/blender_dataparser.py +++ b/nerfstudio/data/dataparsers/blender_dataparser.py @@ -77,7 +77,7 @@ class Blender(DataParser): poses.append(np.array(frame["transform_matrix"])) poses = np.array(poses).astype(np.float32) - img_0 = imageio.imread(image_filenames[0]) + img_0 = imageio.v2.imread(image_filenames[0]) image_height, image_width = img_0.shape[:2] camera_angle_x = float(meta["camera_angle_x"]) focal_length = 0.5 * image_width / np.tan(0.5 * camera_angle_x) diff --git a/nerfstudio/data/dataparsers/nerfosr_dataparser.py b/nerfstudio/data/dataparsers/nerfosr_dataparser.py index f7b84b261..97f430e1a 100644 --- a/nerfstudio/data/dataparsers/nerfosr_dataparser.py +++ b/nerfstudio/data/dataparsers/nerfosr_dataparser.py @@ -23,12 +23,11 @@ import glob import os from dataclasses import dataclass, field from pathlib import Path -from typing import List, Tuple, Type +from typing import List, Literal, Tuple, Type import numpy as np import torch from rich.console import Console -from typing_extensions import Literal from nerfstudio.cameras import camera_utils from nerfstudio.cameras.cameras import Cameras, CameraType diff --git a/nerfstudio/data/dataparsers/nerfstudio_dataparser.py b/nerfstudio/data/dataparsers/nerfstudio_dataparser.py index 7b283d747..d1f19c7fc 100644 --- a/nerfstudio/data/dataparsers/nerfstudio_dataparser.py +++ b/nerfstudio/data/dataparsers/nerfstudio_dataparser.py @@ -18,13 +18,12 @@ from __future__ import annotations import math from dataclasses import dataclass, field from pathlib import Path, PurePath -from typing import Optional, Type +from typing import Literal, Optional, Type import numpy as np import torch from PIL import Image from rich.console import Console -from typing_extensions import Literal from nerfstudio.cameras import camera_utils from nerfstudio.cameras.cameras import CAMERA_MODEL_TO_TYPE, Cameras, CameraType diff --git a/nerfstudio/data/dataparsers/nuscenes_dataparser.py b/nerfstudio/data/dataparsers/nuscenes_dataparser.py index 6b35cf356..99b75a214 100644 --- a/nerfstudio/data/dataparsers/nuscenes_dataparser.py +++ b/nerfstudio/data/dataparsers/nuscenes_dataparser.py @@ -17,13 +17,12 @@ import math import os from dataclasses import dataclass, field from pathlib import Path -from typing import Optional, Tuple, Type +from typing import Literal, Optional, Tuple, Type import numpy as np import pyquaternion import torch from nuscenes.nuscenes import NuScenes as NuScenesDatabase -from typing_extensions import Literal from nerfstudio.cameras.cameras import Cameras, CameraType from nerfstudio.data.dataparsers.base_dataparser import ( @@ -56,7 +55,7 @@ class NuScenesDataParserConfig(DataParserConfig): Each clip was recorded with a suite of sensors including 6 surround cameras. It also includes 3D cuboid annotations around objects. We optionally use these cuboids to mask dynamic objects by specifying the mask_dir flag. - To create these masks use scripts/datasets/process_nuscenes_masks.py. + To create these masks use nerfstudio/scripts/datasets/process_nuscenes_masks.py. """ _target: Type = field(default_factory=lambda: NuScenes) diff --git a/nerfstudio/data/dataparsers/phototourism_dataparser.py b/nerfstudio/data/dataparsers/phototourism_dataparser.py index d470215ed..8b6049c64 100644 --- a/nerfstudio/data/dataparsers/phototourism_dataparser.py +++ b/nerfstudio/data/dataparsers/phototourism_dataparser.py @@ -18,12 +18,11 @@ from __future__ import annotations import math from dataclasses import dataclass, field from pathlib import Path -from typing import Type +from typing import Literal, Type import numpy as np import torch from rich.progress import Console -from typing_extensions import Literal from nerfstudio.cameras import camera_utils from nerfstudio.cameras.cameras import Cameras, CameraType diff --git a/nerfstudio/data/dataparsers/scannet_dataparser.py b/nerfstudio/data/dataparsers/scannet_dataparser.py index 5d2702f18..fb863073e 100644 --- a/nerfstudio/data/dataparsers/scannet_dataparser.py +++ b/nerfstudio/data/dataparsers/scannet_dataparser.py @@ -16,12 +16,11 @@ import math from dataclasses import dataclass, field from pathlib import Path -from typing import Type +from typing import Literal, Type import cv2 import numpy as np import torch -from typing_extensions import Literal from nerfstudio.cameras import camera_utils from nerfstudio.cameras.cameras import Cameras, CameraType diff --git a/nerfstudio/data/dataparsers/sdfstudio_dataparser.py b/nerfstudio/data/dataparsers/sdfstudio_dataparser.py index 97c7a299d..5ff403c45 100644 --- a/nerfstudio/data/dataparsers/sdfstudio_dataparser.py +++ b/nerfstudio/data/dataparsers/sdfstudio_dataparser.py @@ -87,16 +87,17 @@ class SDFStudio(DataParser): continue image_filename = self.config.data / frame["rgb_path"] - depth_filename = self.config.data / frame["mono_depth_path"] - normal_filename = self.config.data / frame["mono_normal_path"] + depth_filename = frame.get("mono_depth_path") + normal_filename = frame.get("mono_normal_path") intrinsics = torch.tensor(frame["intrinsics"]) camtoworld = torch.tensor(frame["camtoworld"]) # append data image_filenames.append(image_filename) - depth_filenames.append(depth_filename) - normal_filenames.append(normal_filename) + if depth_filename is not None and normal_filename is not None: + depth_filenames.append(self.config.data / depth_filename) + normal_filenames.append(self.config.data / normal_filename) fx.append(intrinsics[0, 0]) fy.append(intrinsics[1, 1]) cx.append(intrinsics[0, 2]) diff --git a/nerfstudio/data/dataparsers/sitcoms3d_dataparser.py b/nerfstudio/data/dataparsers/sitcoms3d_dataparser.py index b6906ce22..6dfc8896b 100644 --- a/nerfstudio/data/dataparsers/sitcoms3d_dataparser.py +++ b/nerfstudio/data/dataparsers/sitcoms3d_dataparser.py @@ -65,7 +65,6 @@ class Sitcoms3D(DataParser): config: Sitcoms3DDataParserConfig def _generate_dataparser_outputs(self, split="train"): # pylint: disable=unused-argument,too-many-statements - cameras_json = load_from_json(self.config.data / "cameras.json") frames = cameras_json["frames"] bbox = torch.tensor(cameras_json["bbox"]) diff --git a/nerfstudio/data/pixel_samplers.py b/nerfstudio/data/pixel_samplers.py index b58d99fe3..74374f381 100644 --- a/nerfstudio/data/pixel_samplers.py +++ b/nerfstudio/data/pixel_samplers.py @@ -101,7 +101,7 @@ class PixelSampler: # pylint: disable=too-few-public-methods key: value[c, y, x] for key, value in batch.items() if key != "image_idx" and value is not None } - assert collated_batch["image"].shape == (num_rays_per_batch, 3), collated_batch["image"].shape + assert collated_batch["image"].shape[0] == num_rays_per_batch # Needed to correct the random indices to their actual camera idx locations. indices[:, 0] = batch["image_idx"][c] @@ -137,7 +137,6 @@ class PixelSampler: # pylint: disable=too-few-public-methods if "mask" in batch: num_rays_in_batch = num_rays_per_batch // num_images for i in range(num_images): - image_height, image_width, _ = batch["image"][i].shape if i == num_images - 1: @@ -172,7 +171,7 @@ class PixelSampler: # pylint: disable=too-few-public-methods collated_batch["image"] = torch.cat(all_images, dim=0) - assert collated_batch["image"].shape == (num_rays_per_batch, 3), collated_batch["image"].shape + assert collated_batch["image"].shape[0] == num_rays_per_batch # Needed to correct the random indices to their actual camera idx locations. indices[:, 0] = batch["image_idx"][c] @@ -222,7 +221,6 @@ class EquirectangularPixelSampler(PixelSampler): # pylint: disable=too-few-publ mask: Optional[TensorType] = None, device: Union[torch.device, str] = "cpu", ) -> TensorType["batch_size", 3]: - if isinstance(mask, torch.Tensor): # Note: if there is a mask, sampling reduces back to uniform sampling, which gives more # sampling weight to the poles of the image than the equators. @@ -230,7 +228,6 @@ class EquirectangularPixelSampler(PixelSampler): # pylint: disable=too-few-publ indices = super().sample_method(batch_size, num_images, image_height, image_width, mask=mask, device=device) else: - # We sample theta uniformly in [0, 2*pi] # We sample phi in [0, pi] according to the PDF f(phi) = sin(phi) / 2. # This is done by inverse transform sampling. @@ -280,7 +277,6 @@ class PatchPixelSampler(PixelSampler): # pylint: disable=too-few-public-methods mask: Optional[TensorType] = None, device: Union[torch.device, str] = "cpu", ) -> TensorType["batch_size", 3]: - if mask: # Note: if there is a mask, sampling reduces back to uniform sampling indices = super().sample_method(batch_size, num_images, image_height, image_width, mask=mask, device=device) diff --git a/nerfstudio/data/utils/dataloaders.py b/nerfstudio/data/utils/dataloaders.py index 23d712d7e..aa30407ea 100644 --- a/nerfstudio/data/utils/dataloaders.py +++ b/nerfstudio/data/utils/dataloaders.py @@ -225,30 +225,16 @@ class FixedIndicesEvalDataloader(EvalDataloader): class RandIndicesEvalDataloader(EvalDataloader): """Dataloader that returns random images. - Args: input_dataset: InputDataset to load data from device: Device to load data to """ - def __init__( - self, - input_dataset: InputDataset, - device: Union[torch.device, str] = "cpu", - **kwargs, - ): - super().__init__(input_dataset, device, **kwargs) - self.count = 0 - def __iter__(self): - self.count = 0 return self def __next__(self): - if self.count < 1: - image_indices = range(self.cameras.size) - image_idx = random.choice(image_indices) - ray_bundle, batch = self.get_data_from_image_idx(image_idx) - self.count += 1 - return ray_bundle, batch - raise StopIteration + # choose a random image index + image_idx = random.randint(0, len(self.cameras) - 1) + ray_bundle, batch = self.get_data_from_image_idx(image_idx) + return ray_bundle, batch diff --git a/nerfstudio/engine/schedulers.py b/nerfstudio/engine/schedulers.py index 301d9eb5f..68a459389 100644 --- a/nerfstudio/engine/schedulers.py +++ b/nerfstudio/engine/schedulers.py @@ -18,11 +18,10 @@ from abc import abstractmethod from dataclasses import dataclass, field -from typing import Optional, Tuple, Type +from typing import Literal, Optional, Tuple, Type import numpy as np from torch.optim import Optimizer, lr_scheduler -from typing_extensions import Literal from nerfstudio.configs.base_config import InstantiateConfig diff --git a/nerfstudio/engine/trainer.py b/nerfstudio/engine/trainer.py index 8925cc93e..f5c4f4209 100644 --- a/nerfstudio/engine/trainer.py +++ b/nerfstudio/engine/trainer.py @@ -24,12 +24,14 @@ import time from dataclasses import dataclass, field from pathlib import Path from threading import Lock -from typing import Dict, List, Optional, Tuple, Type, Union +from typing import Dict, List, Literal, Optional, Tuple, Type, Union import torch +from rich import box, style from rich.console import Console +from rich.panel import Panel +from rich.table import Table from torch.cuda.amp.grad_scaler import GradScaler -from typing_extensions import Literal from nerfstudio.configs.experiment_config import ExperimentConfig from nerfstudio.engine.callbacks import ( @@ -86,6 +88,8 @@ class TrainerConfig(ExperimentConfig): """Optionally specify model step to load from; if none, will find most recent model in load_dir.""" load_config: Optional[Path] = None """Path to config YAML file.""" + load_checkpoint: Optional[Path] = None + """Path to checkpoint file.""" log_gradients: bool = False """Optionally log gradients during training""" @@ -184,7 +188,11 @@ class Trainer: # set up writers/profilers if enabled writer_log_path = self.base_dir / self.config.logging.relative_log_dir writer.setup_event_writer( - self.config.is_wandb_enabled(), self.config.is_tensorboard_enabled(), log_dir=writer_log_path + self.config.is_wandb_enabled(), + self.config.is_tensorboard_enabled(), + log_dir=writer_log_path, + experiment_name=self.config.experiment_name, + project_name=self.config.project_name, ) writer.setup_local_writer( self.config.logging, max_iter=self.config.max_num_iterations, banner_messages=banner_messages @@ -284,14 +292,18 @@ class Trainer: # write out any remaining events (e.g., total train time) writer.write_out_storage() - CONSOLE.rule() - CONSOLE.print("[bold green]:tada: :tada: :tada: Training Finished :tada: :tada: :tada:", justify="center") + table = Table( + title=None, + show_header=False, + box=box.MINIMAL, + title_style=style.Style(bold=True), + ) + table.add_row("Config File", str(self.config.get_base_dir() / "config.yml")) + table.add_row("Checkpoint Directory", str(self.checkpoint_dir)) + CONSOLE.print(Panel(table, title="[bold][green]:tada: Training Finished :tada:[/bold]", expand=False)) + if not self.config.viewer.quit_on_train_completion: - self.training_state = "completed" self._train_complete_viewer() - CONSOLE.print("Use ctrl+c to quit", justify="center") - while True: - time.sleep(0.01) @check_main_thread def _check_viewer_warnings(self) -> None: @@ -336,11 +348,15 @@ class Trainer: def _train_complete_viewer(self) -> None: """Let the viewer know that the training is complete""" assert self.viewer_state is not None + self.training_state = "completed" try: self.viewer_state.training_complete() except RuntimeError: time.sleep(0.03) # sleep to allow buffer to reset CONSOLE.log("Viewer failed. Continuing training.") + CONSOLE.print("Use ctrl+c to quit", justify="center") + while True: + time.sleep(0.01) @check_viewer_enabled def _update_viewer_rays_per_sec(self, train_t: TimeWriter, vis_t: TimeWriter, step: int) -> None: @@ -362,10 +378,11 @@ class Trainer: def _load_checkpoint(self) -> None: """Helper function to load pipeline and optimizer from prespecified checkpoint""" load_dir: Path = self.config.load_dir + load_checkpoint: Path = self.config.load_checkpoint if load_dir is not None: load_step = self.config.load_step if load_step is None: - print("Loading latest checkpoint from load_dir") + print("Loading latest Nerfstudio checkpoint from load_dir...") # NOTE: this is specific to the checkpoint name format load_step = sorted(int(x[x.find("-") + 1 : x.find(".")]) for x in os.listdir(load_dir))[-1] load_path: Path = load_dir / f"step-{load_step:09d}.ckpt" @@ -376,9 +393,18 @@ class Trainer: self.pipeline.load_pipeline(loaded_state["pipeline"], loaded_state["step"]) self.optimizers.load_optimizers(loaded_state["optimizers"]) self.grad_scaler.load_state_dict(loaded_state["scalers"]) - CONSOLE.print(f"done loading checkpoint from {load_path}") + CONSOLE.print(f"Done loading Nerfstudio checkpoint from {load_path}") + elif load_checkpoint is not None: + assert load_checkpoint.exists(), f"Checkpoint {load_checkpoint} does not exist" + loaded_state = torch.load(load_checkpoint, map_location="cpu") + self._start_step = loaded_state["step"] + 1 + # load the checkpoints for pipeline, optimizers, and gradient scalar + self.pipeline.load_pipeline(loaded_state["pipeline"], loaded_state["step"]) + self.optimizers.load_optimizers(loaded_state["optimizers"]) + self.grad_scaler.load_state_dict(loaded_state["scalers"]) + CONSOLE.print(f"Done loading Nerfstudio checkpoint from {load_checkpoint}") else: - CONSOLE.print("No checkpoints to load, training from scratch") + CONSOLE.print("No Nerfstudio checkpoint to load, so training from scratch.") @check_main_thread def save_checkpoint(self, step: int) -> None: @@ -438,8 +464,11 @@ class Trainer: metrics_dict["Gradients/Total"] = total_grad + scale = self.grad_scaler.get_scale() self.grad_scaler.update() - self.optimizers.scheduler_step_all(step) + # If the gradient scaler is decreased, no optimization step is performed so we should not step the scheduler. + if scale <= self.grad_scaler.get_scale(): + self.optimizers.scheduler_step_all(step) # Merging loss and metrics dict into a single output. return loss, loss_dict, metrics_dict diff --git a/nerfstudio/exporter/marching_cubes.py b/nerfstudio/exporter/marching_cubes.py index 03cd7da86..a88dc9017 100644 --- a/nerfstudio/exporter/marching_cubes.py +++ b/nerfstudio/exporter/marching_cubes.py @@ -76,7 +76,6 @@ def evaluate_multiresolution_sdf( x_min: float, crop_n: int, ) -> TensorType["batch"]: - """ Evaluate SDF values using a multi-resolution approach with a given point pyramid. diff --git a/nerfstudio/exporter/texture_utils.py b/nerfstudio/exporter/texture_utils.py index d7e08c669..9c0bb0ee0 100644 --- a/nerfstudio/exporter/texture_utils.py +++ b/nerfstudio/exporter/texture_utils.py @@ -22,7 +22,7 @@ from __future__ import annotations import math from pathlib import Path -from typing import Optional, Tuple, Union +from typing import Literal, Optional, Tuple, Union import mediapy as media import numpy as np @@ -30,7 +30,6 @@ import torch import xatlas from rich.console import Console from torchtyping import TensorType -from typing_extensions import Literal from nerfstudio.cameras.rays import RayBundle from nerfstudio.exporter.exporter_utils import Mesh diff --git a/nerfstudio/field_components/encodings.py b/nerfstudio/field_components/encodings.py index ac7cf2aa1..21dacbd0e 100644 --- a/nerfstudio/field_components/encodings.py +++ b/nerfstudio/field_components/encodings.py @@ -18,14 +18,13 @@ Encoding functions import itertools from abc import abstractmethod -from typing import Optional, Sequence +from typing import Literal, Optional, Sequence import numpy as np import torch import torch.nn.functional as F from torch import nn from torchtyping import TensorType -from typing_extensions import Literal from nerfstudio.field_components.base_field_component import FieldComponent from nerfstudio.utils.math import components_from_spherical_harmonics, expected_sin diff --git a/nerfstudio/field_components/field_heads.py b/nerfstudio/field_components/field_heads.py index 45c420894..0caeb84c1 100644 --- a/nerfstudio/field_components/field_heads.py +++ b/nerfstudio/field_components/field_heads.py @@ -61,7 +61,6 @@ class FieldHead(FieldComponent): in_dim: Optional[int] = None, activation: Optional[Union[nn.Module, Callable]] = None, ) -> None: - super().__init__() self.out_dim = out_dim self.activation = activation @@ -133,7 +132,6 @@ class SHFieldHead(FieldHead): def __init__( self, in_dim: Optional[int] = None, levels: int = 3, channels: int = 3, activation: Optional[nn.Module] = None ) -> None: - out_dim = channels * levels**2 super().__init__(in_dim=in_dim, out_dim=out_dim, field_head_name=FieldHeadNames.SH, activation=activation) diff --git a/nerfstudio/field_components/mlp.py b/nerfstudio/field_components/mlp.py index 545f32564..8cc5a73b6 100644 --- a/nerfstudio/field_components/mlp.py +++ b/nerfstudio/field_components/mlp.py @@ -46,7 +46,6 @@ class MLP(FieldComponent): activation: Optional[nn.Module] = nn.ReLU(), out_activation: Optional[nn.Module] = None, ) -> None: - super().__init__() self.in_dim = in_dim assert self.in_dim > 0 diff --git a/nerfstudio/field_components/spatial_distortions.py b/nerfstudio/field_components/spatial_distortions.py index 02da548a3..da32b4595 100644 --- a/nerfstudio/field_components/spatial_distortions.py +++ b/nerfstudio/field_components/spatial_distortions.py @@ -51,7 +51,7 @@ class SceneContraction(SpatialDistortion): \\end{cases} If the order is not specified, we use the Frobenius norm, this will contract the space to a sphere of - radius 1. If the order is L_inf (order=float("inf")), we will contract the space to a cube of side length 2. + radius 2. If the order is L_inf (order=float("inf")), we will contract the space to a cube of side length 4. If using voxel based encodings such as the Hash encoder, we recommend using the L_inf norm. Args: diff --git a/nerfstudio/fields/nerfacto_field.py b/nerfstudio/fields/nerfacto_field.py index acc868648..3f3953558 100644 --- a/nerfstudio/fields/nerfacto_field.py +++ b/nerfstudio/fields/nerfacto_field.py @@ -381,8 +381,8 @@ class TorchNerfactoField(Field): positions = self.spatial_distortion(positions) else: positions = ray_samples.frustums.get_positions() - encoded_xyz = self.position_encoding(positions) - base_mlp_out = self.mlp_base(encoded_xyz) + encoded_xyz = self.position_encoding(positions.view(-1, 3)).to(torch.float32) + base_mlp_out = self.mlp_base(encoded_xyz).view(*ray_samples.frustums.shape, -1) density = self.field_output_density(base_mlp_out) return density, base_mlp_out @@ -404,18 +404,20 @@ class TorchNerfactoField(Field): outputs = {} for field_head in self.field_heads: - encoded_dir = self.direction_encoding(ray_samples.frustums.directions) + directions = shift_directions_for_tcnn(ray_samples.frustums.directions) + directions_flat = directions.view(-1, 3) + encoded_dir = self.direction_encoding(directions_flat) mlp_out = self.mlp_head( torch.cat( [ - encoded_dir, - density_embedding, # type:ignore + encoded_dir.view(-1, self.direction_encoding.get_out_dim()), + density_embedding.view(-1, self.mlp_base.get_out_dim()), # type:ignore embedded_appearance.view(-1, self.appearance_embedding_dim), ], dim=-1, # type:ignore ) ) - outputs[field_head.field_head_name] = field_head(mlp_out) + outputs[field_head.field_head_name] = field_head(mlp_out).view(*outputs_shape, -1).to(directions) return outputs diff --git a/nerfstudio/fields/sdf_field.py b/nerfstudio/fields/sdf_field.py index e9fd10cb8..72244a759 100644 --- a/nerfstudio/fields/sdf_field.py +++ b/nerfstudio/fields/sdf_field.py @@ -18,7 +18,7 @@ a signed distance function (SDF) for surface representation is used to help with """ from dataclasses import dataclass, field -from typing import Dict, Optional, Type +from typing import Dict, Literal, Optional, Type import numpy as np import torch @@ -26,7 +26,6 @@ import torch.nn.functional as F from torch import nn from torch.nn.parameter import Parameter from torchtyping import TensorType -from typing_extensions import Literal from nerfstudio.cameras.rays import RaySamples from nerfstudio.field_components.embedding import Embedding @@ -80,13 +79,13 @@ class SDFFieldConfig(FieldConfig): appearance_embedding_dim: int = 32 """Dimension of appearance embedding""" use_appearance_embedding: bool = False - """Dimension of appearance embedding""" + """Whether to use appearance embedding""" bias: float = 0.8 - """sphere size of geometric initializaion""" + """Sphere size of geometric initialization""" geometric_init: bool = True """Whether to use geometric initialization""" inside_outside: bool = True - """whether to revert signed distance value, set to True for indoor scene""" + """Whether to revert signed distance value, set to True for indoor scene""" weight_norm: bool = True """Whether to use weight norm for linear layer""" use_grid_feature: bool = False @@ -257,8 +256,8 @@ class SDFField(Field): """forward the geonetwork""" if self.use_grid_feature: positions = self.spatial_distortion(inputs) - - positions = (positions + 1.0) / 2.0 + # map range [-2, 2] to [0, 1] + positions = (positions + 2.0) / 4.0 feature = self.encoding(positions) else: feature = torch.zeros_like(inputs[:, :1].repeat(1, self.encoding.n_output_dims)) diff --git a/nerfstudio/model_components/losses.py b/nerfstudio/model_components/losses.py index d2db011d3..d46193341 100644 --- a/nerfstudio/model_components/losses.py +++ b/nerfstudio/model_components/losses.py @@ -16,11 +16,11 @@ Collection of Losses. """ from enum import Enum +from typing import Dict, Literal import torch from torch import nn from torchtyping import TensorType -from typing_extensions import Literal from nerfstudio.cameras.rays import RaySamples from nerfstudio.utils.math import masked_reduction, normalized_depth_scale_and_shift @@ -485,3 +485,57 @@ class ScaleAndShiftInvariantLoss(nn.Module): return self.__prediction_ssi prediction_ssi = property(__get_prediction_ssi) + + +def tv_loss(grids: TensorType["grids", "feature_dim", "row", "column"]) -> TensorType[()]: + """ + https://github.com/apchenstu/TensoRF/blob/4ec894dc1341a2201fe13ae428631b58458f105d/utils.py#L139 + + Args: + grids: stacks of explicit feature grids (stacked at dim 0) + Returns: + average total variation loss for neighbor rows and columns. + """ + number_of_grids = grids.shape[0] + h_tv_count = grids[:, :, 1:, :].shape[1] * grids[:, :, 1:, :].shape[2] * grids[:, :, 1:, :].shape[3] + w_tv_count = grids[:, :, :, 1:].shape[1] * grids[:, :, :, 1:].shape[2] * grids[:, :, :, 1:].shape[3] + h_tv = torch.pow((grids[:, :, 1:, :] - grids[:, :, :-1, :]), 2).sum() + w_tv = torch.pow((grids[:, :, :, 1:] - grids[:, :, :, :-1]), 2).sum() + return 2 * (h_tv / h_tv_count + w_tv / w_tv_count) / number_of_grids + + +class _GradientScaler(torch.autograd.Function): # typing: ignore, pylint: disable=abstract-method + """ + Scale gradients by a constant factor. + """ + + @staticmethod + def forward(ctx, value, scaling): # pylint: disable=arguments-differ + ctx.save_for_backward(scaling) + return value, scaling + + @staticmethod + def backward(ctx, output_grad, grad_scaling): # pylint: disable=arguments-differ + (scaling,) = ctx.saved_tensors + return output_grad * scaling, grad_scaling + + +def scale_gradients_by_distance_squared( + field_outputs: Dict[str, torch.Tensor], ray_samples: RaySamples +) -> Dict[str, torch.Tensor]: + """ + Scale gradients by the ray distance to the pixel + as suggested in `Radiance Field Gradient Scaling for Unbiased Near-Camera Training` paper + + Note: The scaling is applied on the interval of [0, 1] along the ray! + + Example: + GradientLoss should be called right after obtaining the densities and colors from the field. :: + >>> field_outputs = scale_gradient_by_distance_squared(field_outputs, ray_samples) + """ + out = {} + ray_dist = (ray_samples.frustums.starts + ray_samples.frustums.ends) / 2 + scaling = torch.square(ray_dist).clamp(0, 1) + for key, value in field_outputs.items(): + out[key], _ = _GradientScaler.apply(value, scaling) + return out diff --git a/nerfstudio/model_components/ray_samplers.py b/nerfstudio/model_components/ray_samplers.py index ff2c62f64..b0464e4c9 100644 --- a/nerfstudio/model_components/ray_samplers.py +++ b/nerfstudio/model_components/ray_samplers.py @@ -384,7 +384,6 @@ class VolumetricSampler(Sampler): occupancy_grid: OccGridEstimator, density_fn: Optional[Callable[[TensorType[..., 3]], TensorType[..., 1]]] = None, ) -> None: - super().__init__() assert occupancy_grid is not None self.density_fn = density_fn @@ -655,7 +654,6 @@ class NeuSSampler(Sampler): base_variance = self.base_variance while total_iters < self.num_upsample_steps: - with torch.no_grad(): new_sdf = sdf_fn(new_samples) diff --git a/nerfstudio/model_components/renderers.py b/nerfstudio/model_components/renderers.py index 9a855bdc9..71ee1cca6 100644 --- a/nerfstudio/model_components/renderers.py +++ b/nerfstudio/model_components/renderers.py @@ -28,13 +28,12 @@ Example: """ import contextlib import math -from typing import Generator, Optional, Union +from typing import Generator, Literal, Optional, Union import nerfacc import torch from torch import nn from torchtyping import TensorType -from typing_extensions import Literal from nerfstudio.cameras.rays import RaySamples from nerfstudio.utils import colors diff --git a/nerfstudio/models/base_surface_model.py b/nerfstudio/models/base_surface_model.py index c83a07032..857f712ee 100644 --- a/nerfstudio/models/base_surface_model.py +++ b/nerfstudio/models/base_surface_model.py @@ -20,7 +20,7 @@ from __future__ import annotations from abc import abstractmethod from dataclasses import dataclass, field -from typing import Dict, List, Tuple, Type +from typing import Dict, List, Literal, Tuple, Type import torch import torch.nn.functional as F @@ -28,7 +28,6 @@ from torch.nn import Parameter from torchmetrics import PeakSignalNoiseRatio from torchmetrics.functional import structural_similarity_index_measure from torchmetrics.image.lpip import LearnedPerceptualImagePatchSimilarity -from typing_extensions import Literal from nerfstudio.cameras.rays import RayBundle from nerfstudio.field_components.encodings import NeRFEncoding diff --git a/nerfstudio/models/instant_ngp.py b/nerfstudio/models/instant_ngp.py index d8119db5c..f9e89cec3 100644 --- a/nerfstudio/models/instant_ngp.py +++ b/nerfstudio/models/instant_ngp.py @@ -19,7 +19,7 @@ Implementation of Instant NGP. from __future__ import annotations from dataclasses import dataclass, field -from typing import Dict, List, Optional, Tuple, Type +from typing import Dict, List, Literal, Optional, Tuple, Type import nerfacc import torch @@ -27,7 +27,6 @@ from torch.nn import Parameter from torchmetrics import PeakSignalNoiseRatio from torchmetrics.functional import structural_similarity_index_measure from torchmetrics.image.lpip import LearnedPerceptualImagePatchSimilarity -from typing_extensions import Literal from nerfstudio.cameras.rays import RayBundle from nerfstudio.engine.callbacks import ( @@ -233,7 +232,6 @@ class NGPModel(Model): def get_image_metrics_and_images( self, outputs: Dict[str, torch.Tensor], batch: Dict[str, torch.Tensor] ) -> Tuple[Dict[str, float], Dict[str, torch.Tensor]]: - image = batch["image"].to(self.device) rgb = outputs["rgb"] acc = colormaps.apply_colormap(outputs["accumulation"]) diff --git a/nerfstudio/models/mipnerf.py b/nerfstudio/models/mipnerf.py index 31a337d02..0fae0bdac 100644 --- a/nerfstudio/models/mipnerf.py +++ b/nerfstudio/models/mipnerf.py @@ -96,7 +96,6 @@ class MipNerfModel(Model): return param_groups def get_outputs(self, ray_bundle: RayBundle): - if self.field is None: raise ValueError("populate_fields() must be called before get_outputs") diff --git a/nerfstudio/models/nerfacto.py b/nerfstudio/models/nerfacto.py index 53173640a..858858c19 100644 --- a/nerfstudio/models/nerfacto.py +++ b/nerfstudio/models/nerfacto.py @@ -19,7 +19,7 @@ NeRF implementation that combines many recent advancements. from __future__ import annotations from dataclasses import dataclass, field -from typing import Dict, List, Tuple, Type +from typing import Dict, List, Literal, Tuple, Type import numpy as np import torch @@ -27,9 +27,8 @@ from torch.nn import Parameter from torchmetrics import PeakSignalNoiseRatio from torchmetrics.functional import structural_similarity_index_measure from torchmetrics.image.lpip import LearnedPerceptualImagePatchSimilarity -from typing_extensions import Literal -from nerfstudio.cameras.rays import RayBundle +from nerfstudio.cameras.rays import RayBundle, RaySamples from nerfstudio.engine.callbacks import ( TrainingCallback, TrainingCallbackAttributes, @@ -45,6 +44,7 @@ from nerfstudio.model_components.losses import ( interlevel_loss, orientation_loss, pred_normal_loss, + scale_gradients_by_distance_squared, ) from nerfstudio.model_components.ray_samplers import ( ProposalNetworkSampler, @@ -128,6 +128,8 @@ class NerfactoModelConfig(ModelConfig): """Whether to predict normals or not.""" disable_scene_contraction: bool = False """Whether to disable scene contraction or not.""" + use_gradient_scaling: bool = False + """Use gradient scaler where the gradients are lower for points closer to the camera.""" class NerfactoModel(Model): @@ -263,8 +265,12 @@ class NerfactoModel(Model): return callbacks def get_outputs(self, ray_bundle: RayBundle): + ray_samples: RaySamples ray_samples, weights_list, ray_samples_list = self.proposal_sampler(ray_bundle, density_fns=self.density_fns) field_outputs = self.field(ray_samples, compute_normals=self.config.predict_normals) + if self.config.use_gradient_scaling: + field_outputs = scale_gradients_by_distance_squared(field_outputs, ray_samples) + weights = ray_samples.get_weights(field_outputs[FieldHeadNames.DENSITY]) weights_list.append(weights) ray_samples_list.append(ray_samples) diff --git a/nerfstudio/models/nerfplayer_nerfacto.py b/nerfstudio/models/nerfplayer_nerfacto.py index e10b3cad2..245d3bac2 100644 --- a/nerfstudio/models/nerfplayer_nerfacto.py +++ b/nerfstudio/models/nerfplayer_nerfacto.py @@ -20,14 +20,13 @@ from __future__ import annotations import functools from dataclasses import dataclass, field -from typing import Dict, List, Type +from typing import Dict, List, Literal, Type import numpy as np import torch from torchmetrics import PeakSignalNoiseRatio from torchmetrics.functional import structural_similarity_index_measure from torchmetrics.image.lpip import LearnedPerceptualImagePatchSimilarity -from typing_extensions import Literal from nerfstudio.cameras.rays import RayBundle from nerfstudio.field_components.field_heads import FieldHeadNames diff --git a/nerfstudio/models/nerfplayer_ngp.py b/nerfstudio/models/nerfplayer_ngp.py index 4f884674f..59390d908 100644 --- a/nerfstudio/models/nerfplayer_ngp.py +++ b/nerfstudio/models/nerfplayer_ngp.py @@ -19,7 +19,7 @@ Implementation of NeRFPlayer (https://arxiv.org/abs/2210.15947) with InstantNGP from __future__ import annotations from dataclasses import dataclass, field -from typing import List, Type +from typing import List, Literal, Type import nerfacc import torch @@ -27,7 +27,6 @@ from torch.nn import Parameter from torchmetrics import PeakSignalNoiseRatio from torchmetrics.functional import structural_similarity_index_measure from torchmetrics.image.lpip import LearnedPerceptualImagePatchSimilarity -from typing_extensions import Literal from nerfstudio.cameras.rays import RayBundle from nerfstudio.engine.callbacks import ( diff --git a/nerfstudio/models/semantic_nerfw.py b/nerfstudio/models/semantic_nerfw.py index 4324e1eeb..c36b2d21c 100644 --- a/nerfstudio/models/semantic_nerfw.py +++ b/nerfstudio/models/semantic_nerfw.py @@ -258,7 +258,6 @@ class SemanticNerfWModel(Model): def get_image_metrics_and_images( self, outputs: Dict[str, torch.Tensor], batch: Dict[str, torch.Tensor] ) -> Tuple[Dict[str, float], Dict[str, torch.Tensor]]: - image = batch["image"].to(self.device) rgb = outputs["rgb"] rgb = torch.clamp(rgb, min=0, max=1) diff --git a/nerfstudio/models/tensorf.py b/nerfstudio/models/tensorf.py index 0a988b111..109c117fb 100644 --- a/nerfstudio/models/tensorf.py +++ b/nerfstudio/models/tensorf.py @@ -19,7 +19,7 @@ TensorRF implementation. from __future__ import annotations from dataclasses import dataclass, field -from typing import Dict, List, Tuple, Type +from typing import Dict, List, Literal, Tuple, Type import numpy as np import torch @@ -27,7 +27,6 @@ from torch.nn import Parameter from torchmetrics import PeakSignalNoiseRatio from torchmetrics.functional import structural_similarity_index_measure from torchmetrics.image.lpip import LearnedPerceptualImagePatchSimilarity -from typing_extensions import Literal from nerfstudio.cameras.rays import RayBundle from nerfstudio.configs.config_utils import to_immutable_dict @@ -44,7 +43,7 @@ from nerfstudio.field_components.encodings import ( ) from nerfstudio.field_components.field_heads import FieldHeadNames from nerfstudio.fields.tensorf_field import TensoRFField -from nerfstudio.model_components.losses import MSELoss +from nerfstudio.model_components.losses import MSELoss, tv_loss from nerfstudio.model_components.ray_samplers import PDFSampler, UniformSampler from nerfstudio.model_components.renderers import ( AccumulationRenderer, @@ -68,7 +67,14 @@ class TensoRFModelConfig(ModelConfig): """final render resolution""" upsampling_iters: Tuple[int, ...] = (2000, 3000, 4000, 5500, 7000) """specifies a list of iteration step numbers to perform upsampling""" - loss_coefficients: Dict[str, float] = to_immutable_dict({"rgb_loss": 1.0}) + loss_coefficients: Dict[str, float] = to_immutable_dict( + { + "rgb_loss": 1.0, + "tv_reg_density": 1e-3, + "tv_reg_color": 1e-4, + "l1_reg": 5e-4, + } + ) """Loss specific weights.""" num_samples: int = 50 """Number of samples in field evaluation""" @@ -81,6 +87,8 @@ class TensoRFModelConfig(ModelConfig): appearance_dim: int = 27 """Number of channels for color encoding""" tensorf_encoding: Literal["triplane", "vm", "cp"] = "vm" + regularization: Literal["none", "l1", "tv"] = "l1" + """Regularization method used in tensorf paper""" class TensoRFModel(Model): @@ -242,6 +250,10 @@ class TensoRFModel(Model): if self.config.enable_collider: self.collider = AABBBoxCollider(scene_box=self.scene_box) + # regularizations + if self.config.tensorf_encoding == "cp" and self.config.regularization == "tv": + raise RuntimeError("TV reg not supported for CP decomposition") + def get_param_groups(self) -> Dict[str, List[Parameter]]: param_groups = {} @@ -296,6 +308,20 @@ class TensoRFModel(Model): rgb_loss = self.rgb_loss(image, outputs["rgb"]) loss_dict = {"rgb_loss": rgb_loss} + + if self.config.regularization == "l1": + l1_parameters = [] + for parameter in self.field.density_encoding.parameters(): + l1_parameters.append(parameter.view(-1)) + loss_dict["l1_reg"] = torch.abs(torch.cat(l1_parameters)).mean() + elif self.config.regularization == "tv": + loss_dict["tv_reg_density"] = tv_loss(self.field.density_encoding.plane_coef) + loss_dict["tv_reg_color"] = tv_loss(self.field.color_encoding.plane_coef) + elif self.config.regularization == "none": + pass + else: + raise ValueError(f"Regularization {self.config.regularization} not supported") + loss_dict = misc.scale_dict(loss_dict, self.config.loss_coefficients) return loss_dict diff --git a/nerfstudio/models/vanilla_nerf.py b/nerfstudio/models/vanilla_nerf.py index b69a35358..e9c74e93d 100644 --- a/nerfstudio/models/vanilla_nerf.py +++ b/nerfstudio/models/vanilla_nerf.py @@ -135,7 +135,6 @@ class NeRFModel(Model): return param_groups def get_outputs(self, ray_bundle: RayBundle): - if self.field_coarse is None or self.field_fine is None: raise ValueError("populate_fields() must be called before get_outputs") diff --git a/nerfstudio/pipelines/base_pipeline.py b/nerfstudio/pipelines/base_pipeline.py index 00b9fb7f8..27a02c5dc 100644 --- a/nerfstudio/pipelines/base_pipeline.py +++ b/nerfstudio/pipelines/base_pipeline.py @@ -21,7 +21,7 @@ import typing from abc import abstractmethod from dataclasses import dataclass, field from time import time -from typing import Any, Dict, List, Mapping, Optional, Type, Union, cast +from typing import Any, Dict, List, Literal, Mapping, Optional, Type, Union, cast import mediapy import torch @@ -37,7 +37,6 @@ from torch import nn from torch.cuda.amp.grad_scaler import GradScaler from torch.nn import Parameter from torch.nn.parallel import DistributedDataParallel as DDP -from typing_extensions import Literal from nerfstudio.configs import base_config as cfg from nerfstudio.data.datamanagers.base_datamanager import ( diff --git a/nerfstudio/pipelines/dynamic_batch.py b/nerfstudio/pipelines/dynamic_batch.py index 36536eef2..6cd2a2b55 100644 --- a/nerfstudio/pipelines/dynamic_batch.py +++ b/nerfstudio/pipelines/dynamic_batch.py @@ -17,11 +17,9 @@ A pipeline that dynamically chooses the number of rays to sample. """ from dataclasses import dataclass, field -from typing import Optional, Type +from typing import Literal, Type import torch -from torch.cuda.amp.grad_scaler import GradScaler -from typing_extensions import Literal from nerfstudio.data.datamanagers.base_datamanager import VanillaDataManager from nerfstudio.pipelines.base_pipeline import VanillaPipeline, VanillaPipelineConfig diff --git a/nerfstudio/plugins/registry.py b/nerfstudio/plugins/registry.py index 9e7a61c8d..15eb1779d 100644 --- a/nerfstudio/plugins/registry.py +++ b/nerfstudio/plugins/registry.py @@ -16,6 +16,8 @@ Module that keeps all registered plugins and allows for plugin discovery. """ +import importlib +import os import sys import typing as t @@ -34,6 +36,7 @@ CONSOLE = Console(width=120) def discover_methods() -> t.Tuple[t.Dict[str, TrainerConfig], t.Dict[str, str]]: """ Discovers all methods registered using the `nerfstudio.method_configs` entrypoint. + And also methods in the NERFSTUDIO_METHOD_CONFIGS environment variable. """ methods = {} descriptions = {} @@ -48,4 +51,22 @@ def discover_methods() -> t.Tuple[t.Dict[str, TrainerConfig], t.Dict[str, str]]: specification = t.cast(MethodSpecification, specification) methods[specification.config.method_name] = specification.config descriptions[specification.config.method_name] = specification.description + + if "NERFSTUDIO_METHOD_CONFIGS" in os.environ: + try: + strings = os.environ["NERFSTUDIO_METHOD_CONFIGS"].split(",") + for definition in strings: + if not definition: + continue + name, path = definition.split("=") + CONSOLE.print(f"[bold green]Info: Loading method {name} from environment variable") + module, config_name = path.split(":") + method_config = getattr(importlib.import_module(module), config_name) + assert isinstance(method_config, MethodSpecification) + methods[name] = method_config.config + descriptions[name] = method_config.description + except Exception: # pylint: disable=broad-except + CONSOLE.print_exception() + CONSOLE.print("[bold red]Error: Could not load methods from environment variable NERFSTUDIO_METHOD_CONFIGS") + return methods, descriptions diff --git a/nerfstudio/process_data/colmap_converter_to_nerfstudio_dataset.py b/nerfstudio/process_data/colmap_converter_to_nerfstudio_dataset.py index 4effdc377..93a123d93 100644 --- a/nerfstudio/process_data/colmap_converter_to_nerfstudio_dataset.py +++ b/nerfstudio/process_data/colmap_converter_to_nerfstudio_dataset.py @@ -16,10 +16,9 @@ from dataclasses import dataclass from pathlib import Path -from typing import Dict, List, Optional, Tuple +from typing import Dict, List, Literal, Optional, Tuple from rich.console import Console -from typing_extensions import Literal from nerfstudio.process_data import colmap_utils, hloc_utils, process_data_utils from nerfstudio.process_data.base_converter_to_nerfstudio_dataset import ( @@ -182,7 +181,11 @@ class ColmapConverterToNerfstudioDataset(BaseConverterToNerfstudioDataset): """ self.absolute_colmap_path.mkdir(parents=True, exist_ok=True) - (sfm_tool, feature_type, matcher_type,) = process_data_utils.find_tool_feature_matcher_combination( + ( + sfm_tool, + feature_type, + matcher_type, + ) = process_data_utils.find_tool_feature_matcher_combination( self.sfm_tool, self.feature_type, self.matcher_type ) # check that sfm_tool is hloc if using refine_pixsfm diff --git a/nerfstudio/process_data/colmap_utils.py b/nerfstudio/process_data/colmap_utils.py index f4b9e9b03..690080771 100644 --- a/nerfstudio/process_data/colmap_utils.py +++ b/nerfstudio/process_data/colmap_utils.py @@ -13,12 +13,12 @@ # limitations under the License. """ -Tools supporting the execution of COLMAP and preparation of COLMAP-based datasets for nerstudio training. +Tools supporting the execution of COLMAP and preparation of COLMAP-based datasets for nerfstudio training. """ import json from pathlib import Path -from typing import Any, Dict, Optional +from typing import Any, Dict, Literal, Optional import appdirs import cv2 @@ -27,7 +27,6 @@ import requests import torch from rich.console import Console from rich.progress import track -from typing_extensions import Literal # TODO(1480) use pycolmap instead of colmap_parsing_utils # import pycolmap @@ -115,9 +114,7 @@ def run_colmap( colmap_version = get_colmap_version(colmap_cmd) colmap_database_path = colmap_dir / "database.db" - if colmap_database_path.exists(): - # Can't use missing_ok argument because of Python 3.7 compatibility. - colmap_database_path.unlink() + colmap_database_path.unlink(missing_ok=True) # Feature extraction feature_extractor_cmd = [ diff --git a/nerfstudio/process_data/hloc_utils.py b/nerfstudio/process_data/hloc_utils.py index f04f6c32c..eda02cae1 100644 --- a/nerfstudio/process_data/hloc_utils.py +++ b/nerfstudio/process_data/hloc_utils.py @@ -21,9 +21,9 @@ Requires hloc module from : https://github.com/cvg/Hierarchical-Localization import sys from pathlib import Path +from typing import Literal from rich.console import Console -from typing_extensions import Literal from nerfstudio.process_data.process_data_utils import CameraModel diff --git a/nerfstudio/process_data/images_to_nerstudio_dataset.py b/nerfstudio/process_data/images_to_nerfstudio_dataset.py similarity index 98% rename from nerfstudio/process_data/images_to_nerstudio_dataset.py rename to nerfstudio/process_data/images_to_nerfstudio_dataset.py index 477c94c20..dc6163816 100644 --- a/nerfstudio/process_data/images_to_nerstudio_dataset.py +++ b/nerfstudio/process_data/images_to_nerfstudio_dataset.py @@ -56,6 +56,7 @@ class ImagesToNerfstudioDataset(ColmapConverterToNerfstudioDataset): self.data = equirect_utils.generate_planar_projections_from_equirectangular( self.data, pers_size, self.images_per_equirect, crop_factor=self.crop_factor ) + self.camera_type = "perspective" summary_log = [] diff --git a/nerfstudio/process_data/metashape_utils.py b/nerfstudio/process_data/metashape_utils.py index 0e4a7593e..414a31ff8 100644 --- a/nerfstudio/process_data/metashape_utils.py +++ b/nerfstudio/process_data/metashape_utils.py @@ -61,12 +61,17 @@ def metashape_to_json( # pylint: disable=too-many-statements if sensors is None: raise ValueError("No sensors found") - calibrated_sensors = [sensor for sensor in sensors if sensor.find("calibration")] + calibrated_sensors = [ + sensor for sensor in sensors if sensor.get("type") == "spherical" or sensor.find("calibration") + ] if not calibrated_sensors: raise ValueError("No calibrated sensor found in Metashape XML") sensor_type = [s.get("type") for s in calibrated_sensors] if sensor_type.count(sensor_type[0]) != len(sensor_type): - raise ValueError("All Metashape sensors do not have the same sensor type") + raise ValueError( + "All Metashape sensors do not have the same sensor type. " + "nerfstudio does not support per-frame camera_model." + ) data = {} if sensor_type[0] == "frame": data["camera_model"] = CAMERA_MODELS["perspective"].value @@ -87,46 +92,54 @@ def metashape_to_json( # pylint: disable=too-many-statements s["h"] = int(resolution.get("height")) # type: ignore calib = sensor.find("calibration") - f = calib.find("f") - if f is not None: + if calib is None: + assert sensor_type[0] == "spherical", "Only spherical sensors should have no intrinsics" + s["fl_x"] = s["w"] / 2.0 + s["fl_y"] = s["h"] + s["cx"] = s["w"] / 2.0 + s["cy"] = s["h"] / 2.0 + else: + f = calib.find("f") + assert f is not None, "Focal length not found in Metashape xml" s["fl_x"] = s["fl_y"] = float(f.text) # type: ignore - s["cx"] = _find_param(calib, "cx") + s["w"] / 2.0 # type: ignore - s["cy"] = _find_param(calib, "cy") + s["h"] / 2.0 # type: ignore + s["cx"] = _find_param(calib, "cx") + s["w"] / 2.0 # type: ignore + s["cy"] = _find_param(calib, "cy") + s["h"] / 2.0 # type: ignore - s["k1"] = _find_param(calib, "k1") - s["k2"] = _find_param(calib, "k2") - s["k3"] = _find_param(calib, "k3") - s["k4"] = _find_param(calib, "k4") - s["p1"] = _find_param(calib, "p1") - s["p2"] = _find_param(calib, "p2") + s["k1"] = _find_param(calib, "k1") + s["k2"] = _find_param(calib, "k2") + s["k3"] = _find_param(calib, "k3") + s["k4"] = _find_param(calib, "k4") + s["p1"] = _find_param(calib, "p1") + s["p2"] = _find_param(calib, "p2") sensor_dict[sensor.get("id")] = s components = chunk.find("components") - component_dict = {} - for component in components: - transform = component.find("transform") - if transform is not None: - rotation = transform.find("rotation") - if rotation is None: - r = np.eye(3) - else: - r = np.array([float(x) for x in rotation.text.split()]).reshape((3, 3)) - translation = transform.find("translation") - if translation is None: - t = np.zeros(3) - else: - t = np.array([float(x) for x in translation.text.split()]) - scale = transform.find("scale") - if scale is None: - s = 1.0 - else: - s = float(scale.text) + if components is not None: + component_dict = {} + for component in components: + transform = component.find("transform") + if transform is not None: + rotation = transform.find("rotation") + if rotation is None: + r = np.eye(3) + else: + r = np.array([float(x) for x in rotation.text.split()]).reshape((3, 3)) + translation = transform.find("translation") + if translation is None: + t = np.zeros(3) + else: + t = np.array([float(x) for x in translation.text.split()]) + scale = transform.find("scale") + if scale is None: + s = 1.0 + else: + s = float(scale.text) - m = np.eye(4) - m[:3, :3] = r - m[:3, 3] = t / s - component_dict[component.get("id")] = m + m = np.eye(4) + m[:3, :3] = r + m[:3, 3] = t / s + component_dict[component.get("id")] = m frames = [] cameras = chunk.find("cameras") @@ -159,9 +172,10 @@ def metashape_to_json( # pylint: disable=too-many-statements num_skipped += 1 continue transform = np.array([float(x) for x in camera.find("transform").text.split()]).reshape((4, 4)) - component_id = camera.get("component_id") - if component_id in component_dict: - transform = component_dict[component_id] @ transform + if components is not None: + component_id = camera.get("component_id") + if component_id in component_dict: + transform = component_dict[component_id] @ transform transform = transform[[2, 0, 1, 3], :] transform[:, 1:3] *= -1 frame["transform_matrix"] = transform.tolist() diff --git a/nerfstudio/process_data/process_data_utils.py b/nerfstudio/process_data/process_data_utils.py index a977df8b2..74a981826 100644 --- a/nerfstudio/process_data/process_data_utils.py +++ b/nerfstudio/process_data/process_data_utils.py @@ -20,12 +20,11 @@ import shutil import sys from enum import Enum from pathlib import Path -from typing import List, Optional, Tuple +from typing import List, Literal, Optional, OrderedDict, Tuple import cv2 import numpy as np from rich.console import Console -from typing_extensions import Literal, OrderedDict from nerfstudio.utils.rich_utils import status from nerfstudio.utils.scripts import run_command @@ -39,12 +38,13 @@ class CameraModel(Enum): OPENCV = "OPENCV" OPENCV_FISHEYE = "OPENCV_FISHEYE" + EQUIRECTANGULAR = "EQUIRECTANGULAR" CAMERA_MODELS = { "perspective": CameraModel.OPENCV, "fisheye": CameraModel.OPENCV_FISHEYE, - "equirectangular": CameraModel.OPENCV, + "equirectangular": CameraModel.EQUIRECTANGULAR, } diff --git a/nerfstudio/process_data/video_to_nerfstudio_dataset.py b/nerfstudio/process_data/video_to_nerfstudio_dataset.py index 405231fcf..f8054ff42 100644 --- a/nerfstudio/process_data/video_to_nerfstudio_dataset.py +++ b/nerfstudio/process_data/video_to_nerfstudio_dataset.py @@ -91,6 +91,8 @@ class VideoToNerfstudioDataset(ColmapConverterToNerfstudioDataset): # remove the temp_images folder shutil.rmtree(self.output_dir / "temp_images", ignore_errors=True) + self.camera_type = "perspective" + # # Create mask mask_path = process_data_utils.save_mask( image_dir=self.image_dir, diff --git a/nerfstudio/scripts/__init__.py b/nerfstudio/scripts/__init__.py new file mode 100644 index 000000000..d926cf95c --- /dev/null +++ b/nerfstudio/scripts/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/scripts/benchmarking/launch_eval_blender.sh b/nerfstudio/scripts/benchmarking/launch_eval_blender.sh similarity index 100% rename from scripts/benchmarking/launch_eval_blender.sh rename to nerfstudio/scripts/benchmarking/launch_eval_blender.sh diff --git a/scripts/benchmarking/launch_train_blender.sh b/nerfstudio/scripts/benchmarking/launch_train_blender.sh similarity index 100% rename from scripts/benchmarking/launch_train_blender.sh rename to nerfstudio/scripts/benchmarking/launch_train_blender.sh diff --git a/nerfstudio/scripts/blender/__init__.py b/nerfstudio/scripts/blender/__init__.py new file mode 100644 index 000000000..d926cf95c --- /dev/null +++ b/nerfstudio/scripts/blender/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/scripts/blender/nerfstudio_blender.py b/nerfstudio/scripts/blender/nerfstudio_blender.py similarity index 94% rename from scripts/blender/nerfstudio_blender.py rename to nerfstudio/scripts/blender/nerfstudio_blender.py index dee0b4ab3..6a416e369 100644 --- a/scripts/blender/nerfstudio_blender.py +++ b/nerfstudio/scripts/blender/nerfstudio_blender.py @@ -1,3 +1,17 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ nerfstudio_blender.py """ @@ -141,7 +155,6 @@ class CreateJSONCameraPath(bpy.types.Operator): keyframe_list = [] for i, transformed_camera_path_mat_val in enumerate(self.transformed_camera_path_mat): - curr_properties = ( '[["FOV",' + str(self.fov_list[i]) @@ -361,7 +374,7 @@ class NerfstudioBgPanel(bpy.types.Panel): # pylint: disable=too-few-public-meth self.layout.label(text="Camera path for Nerfstudio") col = self.layout.column() - for (prop_name, _) in INPUT_PROPERTIES: + for prop_name, _ in INPUT_PROPERTIES: row = col.row() row.prop(context.scene, prop_name) @@ -385,7 +398,7 @@ class NerfstudioInputPanel(bpy.types.Panel): # pylint: disable=too-few-public-m self.layout.label(text="Create Blender Camera From Nerfstudio JSON") col = self.layout.column() - for (prop_name, _) in INPUT_PROPERTIES_NS_CAMERA: + for prop_name, _ in INPUT_PROPERTIES_NS_CAMERA: row = col.row() row.prop(context.scene, prop_name) @@ -425,10 +438,10 @@ OBJ_PROPERTIES = ["NeRF", "RenderCamera"] def register(): """Register classes for UI panel.""" - for (prop_name, prop_value) in INPUT_PROPERTIES: + for prop_name, prop_value in INPUT_PROPERTIES: setattr(bpy.types.Scene, prop_name, prop_value) - for (prop_name, prop_value) in INPUT_PROPERTIES_NS_CAMERA: + for prop_name, prop_value in INPUT_PROPERTIES_NS_CAMERA: setattr(bpy.types.Scene, prop_name, prop_value) bpy.types.Scene.NeRF = bpy.props.PointerProperty(type=bpy.types.Object) @@ -440,10 +453,10 @@ def register(): def unregister(): """Unregister classes for UI panel.""" - for (prop_name, _) in INPUT_PROPERTIES: + for prop_name, _ in INPUT_PROPERTIES: delattr(bpy.types.Scene, prop_name) - for (prop_name, _) in INPUT_PROPERTIES_NS_CAMERA: + for prop_name, _ in INPUT_PROPERTIES_NS_CAMERA: delattr(bpy.types.Scene, prop_name) del bpy.types.Scene.NeRF diff --git a/scripts/completions/.gitignore b/nerfstudio/scripts/completions/.gitignore similarity index 100% rename from scripts/completions/.gitignore rename to nerfstudio/scripts/completions/.gitignore diff --git a/nerfstudio/scripts/completions/__init__.py b/nerfstudio/scripts/completions/__init__.py new file mode 100644 index 000000000..d926cf95c --- /dev/null +++ b/nerfstudio/scripts/completions/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/scripts/completions/install.py b/nerfstudio/scripts/completions/install.py similarity index 95% rename from scripts/completions/install.py rename to nerfstudio/scripts/completions/install.py index a7acc862c..cba1d672b 100644 --- a/scripts/completions/install.py +++ b/nerfstudio/scripts/completions/install.py @@ -1,3 +1,17 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #!/usr/bin/env python """Configuration script for setting up tab completion for nerfstudio in bash and zsh.""" @@ -10,13 +24,13 @@ import shutil import stat import subprocess import sys -from typing import List, Optional, Union +from typing import List, Literal, Optional, Union +from typing import get_args as typing_get_args import tyro from rich.console import Console from rich.prompt import Confirm -from typing_extensions import Literal, assert_never -from typing_extensions import get_args as typing_get_args +from typing_extensions import assert_never if sys.version_info < (3, 10): import importlib_metadata diff --git a/scripts/completions/setup.bash b/nerfstudio/scripts/completions/setup.bash similarity index 100% rename from scripts/completions/setup.bash rename to nerfstudio/scripts/completions/setup.bash diff --git a/scripts/completions/setup.zsh b/nerfstudio/scripts/completions/setup.zsh similarity index 100% rename from scripts/completions/setup.zsh rename to nerfstudio/scripts/completions/setup.zsh diff --git a/scripts/datasets/process_nuscenes_masks.py b/nerfstudio/scripts/datasets/process_nuscenes_masks.py similarity index 89% rename from scripts/datasets/process_nuscenes_masks.py rename to nerfstudio/scripts/datasets/process_nuscenes_masks.py index c86baec03..748a27fd2 100644 --- a/scripts/datasets/process_nuscenes_masks.py +++ b/nerfstudio/scripts/datasets/process_nuscenes_masks.py @@ -1,7 +1,21 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import os from dataclasses import dataclass from pathlib import Path -from typing import Tuple +from typing import Literal, Tuple import cv2 import numpy as np @@ -10,7 +24,6 @@ from nuscenes.nuscenes import NuScenes as NuScenesDatabase from nuscenes.utils.data_classes import Box from nuscenes.utils.geometry_utils import BoxVisibility, view_points from tqdm import tqdm -from typing_extensions import Literal @dataclass diff --git a/nerfstudio/scripts/docs/__init__.py b/nerfstudio/scripts/docs/__init__.py new file mode 100644 index 000000000..d926cf95c --- /dev/null +++ b/nerfstudio/scripts/docs/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/scripts/docs/add_nb_tags.py b/nerfstudio/scripts/docs/add_nb_tags.py similarity index 78% rename from scripts/docs/add_nb_tags.py rename to nerfstudio/scripts/docs/add_nb_tags.py index 4a7d97fe0..a110e0d76 100644 --- a/scripts/docs/add_nb_tags.py +++ b/nerfstudio/scripts/docs/add_nb_tags.py @@ -1,3 +1,17 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Helper that add tags to notebooks based on cell comments.""" import sys @@ -60,7 +74,8 @@ def main(check: bool = False): if incorrect_metadata: if check: CONSOLE.print( - f"[bold yellow]{ipath} has incorrect metadata. Call `python scripts.docs.add_nb_tags.py` to add it." + f"[bold yellow]{ipath} has incorrect metadata. " + "Call `python nerfstudio.scripts.docs.add_nb_tags.py` to add it." ) any_missing = True else: diff --git a/scripts/docs/build_docs.py b/nerfstudio/scripts/docs/build_docs.py similarity index 66% rename from scripts/docs/build_docs.py rename to nerfstudio/scripts/docs/build_docs.py index cb31e54b3..1959220a1 100644 --- a/scripts/docs/build_docs.py +++ b/nerfstudio/scripts/docs/build_docs.py @@ -1,3 +1,17 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #!/usr/bin/env python """Simple yaml debugger""" import subprocess @@ -32,7 +46,7 @@ def main(clean_cache: bool = False): """ CONSOLE.print("[green]Adding notebook documentation metadata") - run_command("python scripts/docs/add_nb_tags.py") + run_command("python nerfstudio/scripts/docs/add_nb_tags.py") # Add checks for building documentation CONSOLE.print("[green]Building Documentation") diff --git a/nerfstudio/scripts/downloads/__init__.py b/nerfstudio/scripts/downloads/__init__.py new file mode 100644 index 000000000..d926cf95c --- /dev/null +++ b/nerfstudio/scripts/downloads/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/scripts/downloads/download_data.py b/nerfstudio/scripts/downloads/download_data.py similarity index 96% rename from scripts/downloads/download_data.py rename to nerfstudio/scripts/downloads/download_data.py index a92798bbb..d97dd659b 100644 --- a/scripts/downloads/download_data.py +++ b/nerfstudio/scripts/downloads/download_data.py @@ -1,3 +1,17 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Download datasets and specific captures from the datasets.""" from __future__ import annotations diff --git a/scripts/eval.py b/nerfstudio/scripts/eval.py similarity index 72% rename from scripts/eval.py rename to nerfstudio/scripts/eval.py index 6f90bb35a..517da3179 100644 --- a/scripts/eval.py +++ b/nerfstudio/scripts/eval.py @@ -1,3 +1,17 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #!/usr/bin/env python """ eval.py diff --git a/scripts/exporter.py b/nerfstudio/scripts/exporter.py similarity index 96% rename from scripts/exporter.py rename to nerfstudio/scripts/exporter.py index 0f4f4ec60..dfca20637 100644 --- a/scripts/exporter.py +++ b/nerfstudio/scripts/exporter.py @@ -1,3 +1,17 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Script for exporting NeRF into other formats. """ diff --git a/nerfstudio/scripts/generative/__init__.py b/nerfstudio/scripts/generative/__init__.py new file mode 100644 index 000000000..d926cf95c --- /dev/null +++ b/nerfstudio/scripts/generative/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/scripts/generative/trace_stable_diffusion.py b/nerfstudio/scripts/generative/trace_stable_diffusion.py similarity index 84% rename from scripts/generative/trace_stable_diffusion.py rename to nerfstudio/scripts/generative/trace_stable_diffusion.py index eee069eb3..3a426cb2c 100644 --- a/scripts/generative/trace_stable_diffusion.py +++ b/nerfstudio/scripts/generative/trace_stable_diffusion.py @@ -1,3 +1,17 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Trace Stable Diffusion UNet for speed improvement""" import functools diff --git a/nerfstudio/scripts/github/__init__.py b/nerfstudio/scripts/github/__init__.py new file mode 100644 index 000000000..d926cf95c --- /dev/null +++ b/nerfstudio/scripts/github/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/scripts/github/run_actions.py b/nerfstudio/scripts/github/run_actions.py similarity index 81% rename from scripts/github/run_actions.py rename to nerfstudio/scripts/github/run_actions.py index 19179725c..8f5bb7ce1 100644 --- a/scripts/github/run_actions.py +++ b/nerfstudio/scripts/github/run_actions.py @@ -1,3 +1,17 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #!/usr/bin/env python """Simple yaml debugger""" import subprocess @@ -57,7 +71,9 @@ def run_github_actions_file(filename: str, continue_on_fail: bool = False): # Add checks for building documentation CONSOLE.line() CONSOLE.rule("[bold green]Adding notebook documentation metadata") - success = success and run_command("python scripts/docs/add_nb_tags.py", continue_on_fail=continue_on_fail) + success = success and run_command( + "python nerfstudio/scripts/docs/add_nb_tags.py", continue_on_fail=continue_on_fail + ) CONSOLE.line() CONSOLE.rule("[bold green]Building Documentation") success = success and run_command("cd docs/; make html SPHINXOPTS='-W;'", continue_on_fail=continue_on_fail) diff --git a/scripts/licensing/copyright.txt b/nerfstudio/scripts/licensing/copyright.txt similarity index 100% rename from scripts/licensing/copyright.txt rename to nerfstudio/scripts/licensing/copyright.txt diff --git a/scripts/licensing/license_headers.sh b/nerfstudio/scripts/licensing/license_headers.sh similarity index 80% rename from scripts/licensing/license_headers.sh rename to nerfstudio/scripts/licensing/license_headers.sh index 36482085c..286d7ffb1 100755 --- a/scripts/licensing/license_headers.sh +++ b/nerfstudio/scripts/licensing/license_headers.sh @@ -27,7 +27,7 @@ do echo "$i missing copyright header" check_failed=true else - cat scripts/licensing/copyright.txt $i >$i.new && mv $i.new $i + cat nerfstudio/scripts/licensing/copyright.txt $i >$i.new && mv $i.new $i echo "Adding license header to $i." fi added_headers=true @@ -36,7 +36,7 @@ done if [ "$check_failed" = true ]; then - echo "Run '.scripts/licensing/license_headers.sh to add missing headers.'" + echo "Run '.nerfstudio/scripts/licensing/license_headers.sh to add missing headers.'" exit 1 fi diff --git a/scripts/process_data.py b/nerfstudio/scripts/process_data.py similarity index 96% rename from scripts/process_data.py rename to nerfstudio/scripts/process_data.py index f1f873ae3..4c2f3829b 100644 --- a/scripts/process_data.py +++ b/nerfstudio/scripts/process_data.py @@ -1,3 +1,17 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #!/usr/bin/env python """Processes a video or image sequence to a nerfstudio compatible dataset.""" @@ -23,7 +37,7 @@ from nerfstudio.process_data import ( from nerfstudio.process_data.colmap_converter_to_nerfstudio_dataset import ( BaseConverterToNerfstudioDataset, ) -from nerfstudio.process_data.images_to_nerstudio_dataset import ( +from nerfstudio.process_data.images_to_nerfstudio_dataset import ( ImagesToNerfstudioDataset, ) from nerfstudio.process_data.video_to_nerfstudio_dataset import VideoToNerfstudioDataset diff --git a/scripts/render.py b/nerfstudio/scripts/render.py similarity index 91% rename from scripts/render.py rename to nerfstudio/scripts/render.py index 214c5612a..ae6937380 100644 --- a/scripts/render.py +++ b/nerfstudio/scripts/render.py @@ -1,3 +1,17 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #!/usr/bin/env python """ render.py @@ -11,7 +25,7 @@ import sys from contextlib import ExitStack from dataclasses import dataclass, field from pathlib import Path -from typing import Any, Dict, List, Optional +from typing import Any, Dict, List, Literal, Optional import mediapy as media import numpy as np @@ -29,7 +43,7 @@ from rich.progress import ( ) from rich.table import Table from torchtyping import TensorType -from typing_extensions import Literal, assert_never +from typing_extensions import assert_never from nerfstudio.cameras.camera_paths import ( get_interpolated_camera_path, @@ -40,7 +54,7 @@ from nerfstudio.cameras.cameras import Cameras, CameraType from nerfstudio.data.scene_box import SceneBox from nerfstudio.model_components import renderers from nerfstudio.pipelines.base_pipeline import Pipeline -from nerfstudio.utils import install_checks +from nerfstudio.utils import colormaps, install_checks from nerfstudio.utils.eval_utils import eval_setup from nerfstudio.utils.rich_utils import ItersPerSecColumn @@ -57,6 +71,7 @@ def _render_trajectory_video( seconds: float = 5.0, output_format: Literal["images", "video"] = "video", camera_type: CameraType = CameraType.PERSPECTIVE, + colormap_options: colormaps.ColormapOptions = colormaps.ColormapOptions(), ) -> None: """Helper function to create a video of the spiral trajectory. @@ -70,6 +85,7 @@ def _render_trajectory_video( seconds: Length of output video. output_format: How to save output data. camera_type: Camera projection format type. + colormap_options: Options for colormap. """ CONSOLE.print("[bold green]Creating trajectory " + output_format) cameras.rescale_output_resolution(rendered_resolution_scaling_factor) @@ -126,9 +142,15 @@ def _render_trajectory_video( f"Please set --rendered_output_name to one of: {outputs.keys()}", justify="center" ) sys.exit(1) - output_image = outputs[rendered_output_name].cpu().numpy() - if output_image.shape[-1] == 1: - output_image = np.concatenate((output_image,) * 3, axis=-1) + output_image = outputs[rendered_output_name] + output_image = ( + colormaps.apply_colormap( + image=output_image, + colormap_options=colormap_options, + ) + .cpu() + .numpy() + ) render_image.append(output_image) render_image = np.concatenate(render_image, axis=1) if output_format == "images": @@ -293,6 +315,8 @@ class RenderTrajectory: """Number of interpolation steps between eval dataset cameras.""" eval_num_rays_per_chunk: Optional[int] = None """Specifies number of rays per chunk during eval.""" + colormap_options: colormaps.ColormapOptions = colormaps.ColormapOptions() + """Colormap options.""" def main(self) -> None: """Main function.""" @@ -345,6 +369,7 @@ class RenderTrajectory: seconds=seconds, output_format=self.output_format, camera_type=camera_type, + colormap_options=self.colormap_options, ) diff --git a/scripts/texture.py b/nerfstudio/scripts/texture.py similarity index 77% rename from scripts/texture.py rename to nerfstudio/scripts/texture.py index eeb1848cf..98f26b846 100644 --- a/scripts/texture.py +++ b/nerfstudio/scripts/texture.py @@ -1,3 +1,17 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Script to texture an existing mesh file. """ @@ -6,11 +20,10 @@ from __future__ import annotations from dataclasses import dataclass from pathlib import Path -from typing import Optional +from typing import Literal, Optional import tyro from rich.console import Console -from typing_extensions import Literal from nerfstudio.exporter import texture_utils from nerfstudio.exporter.exporter_utils import get_mesh_from_filename diff --git a/scripts/train.py b/nerfstudio/scripts/train.py similarity index 93% rename from scripts/train.py rename to nerfstudio/scripts/train.py index bb3887133..84a3ebfd3 100644 --- a/scripts/train.py +++ b/nerfstudio/scripts/train.py @@ -1,3 +1,17 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #!/usr/bin/env python """Train a radiance field with nerfstudio. For real captures, we recommend using the [bright_yellow]nerfacto[/bright_yellow] model. diff --git a/nerfstudio/scripts/viewer/__init__.py b/nerfstudio/scripts/viewer/__init__.py new file mode 100644 index 000000000..d926cf95c --- /dev/null +++ b/nerfstudio/scripts/viewer/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/scripts/viewer/run_viewer.py b/nerfstudio/scripts/viewer/run_viewer.py similarity index 84% rename from scripts/viewer/run_viewer.py rename to nerfstudio/scripts/viewer/run_viewer.py index 07ceacbe5..1eb20ab27 100644 --- a/scripts/viewer/run_viewer.py +++ b/nerfstudio/scripts/viewer/run_viewer.py @@ -1,3 +1,17 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #!/usr/bin/env python """ Starts viewer in eval mode. diff --git a/scripts/viewer/sync_viser_message_defs.py b/nerfstudio/scripts/viewer/sync_viser_message_defs.py similarity index 73% rename from scripts/viewer/sync_viser_message_defs.py rename to nerfstudio/scripts/viewer/sync_viser_message_defs.py index 369836acb..c693db288 100644 --- a/scripts/viewer/sync_viser_message_defs.py +++ b/nerfstudio/scripts/viewer/sync_viser_message_defs.py @@ -1,3 +1,17 @@ +# Copyright 2022 The Nerfstudio Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Generate viser message definitions for TypeScript, by parsing Python dataclasses.""" import json import pathlib diff --git a/nerfstudio/utils/colormaps.py b/nerfstudio/utils/colormaps.py index aae1b2a92..a9eb6fc8b 100644 --- a/nerfstudio/utils/colormaps.py +++ b/nerfstudio/utils/colormaps.py @@ -14,27 +14,91 @@ """ Helper functions for visualizing outputs """ -from typing import Optional +from dataclasses import dataclass +from typing import Literal, Optional +import matplotlib import torch -from matplotlib import cm from torchtyping import TensorType from nerfstudio.utils import colors +Colormaps = Literal["default", "turbo", "viridis", "magma", "inferno", "cividis"] -def apply_colormap(image: TensorType["bs":..., 1], cmap="viridis") -> TensorType["bs":..., "rgb":3]: + +@dataclass +class ColormapOptions: + """Options for colormap""" + + colormap: Colormaps = "default" + """ The colormap to use """ + normalize: bool = False + """ Whether to normalize the input tensor image """ + colormap_min: float = 0 + """ Minimum value for the output colormap """ + colormap_max: float = 1 + """ Maximum value for the output colormap """ + invert: bool = False + """ Whether to invert the output colormap """ + + +def apply_colormap( + image: TensorType["bs":..., 1], + colormap_options: ColormapOptions = ColormapOptions(), + eps: float = 1e-9, +) -> TensorType["bs":..., "rgb":3]: + """ + Applies a colormap to a tensor image. Currently only supports 1 and 3 channel inputs + + Args: + image: Input tensor image. + eps: Epsilon value for numerical stability. + + Returns: + Tensor with the colormap applied. + """ + + # default for rgb images + if image.shape[-1] == 3: + return image + + # rendering depth outputs + if image.shape[-1] == 1 and torch.is_floating_point(image): + output = image + if colormap_options.normalize: + output = output - torch.min(output) + output = output / (torch.max(output) + eps) + output = ( + output * (colormap_options.colormap_max - colormap_options.colormap_min) + colormap_options.colormap_min + ) + output = torch.clip(output, 0, 1) + if colormap_options.invert: + output = 1 - output + return apply_float_colormap(output, colormap=colormap_options.colormap) + + # rendering boolean outputs + if image.dtype == torch.bool: + return apply_boolean_colormap(image) + + raise NotImplementedError + + +def apply_float_colormap( + image: TensorType["bs":..., 1], colormap: Colormaps = "viridis" +) -> TensorType["bs":..., "rgb":3]: """Convert single channel to a color image. Args: image: Single channel image. - cmap: Colormap for image. + colormap: Colormap for image. Returns: TensorType: Colored image with colors in [0, 1] """ + if colormap == "default": + colormap = "turbo" - colormap = cm.get_cmap(cmap) + colormap = matplotlib.colormaps[colormap] colormap = torch.tensor(colormap.colors).to(image.device) # type: ignore image = torch.nan_to_num(image, 0) image_long = (image * 255).long() @@ -50,7 +114,7 @@ def apply_depth_colormap( accumulation: Optional[TensorType["bs":..., 1]] = None, near_plane: Optional[float] = None, far_plane: Optional[float] = None, - cmap="turbo", + colormap_options: ColormapOptions = ColormapOptions(), ) -> TensorType["bs":..., "rgb":3]: """Converts a depth image to color for easier analysis. @@ -59,7 +123,7 @@ def apply_depth_colormap( accumulation: Ray accumulation used for masking vis. near_plane: Closest depth to consider. If None, use min image value. far_plane: Furthest depth to consider. If None, use max image value. - cmap: Colormap to apply. + colormap: Colormap to apply. Returns: Colored depth image with colors in [0, 1] @@ -72,7 +136,7 @@ def apply_depth_colormap( depth = torch.clip(depth, 0, 1) # depth = torch.nan_to_num(depth, nan=0.0) # TODO(ethan): remove this - colored_image = apply_colormap(depth, cmap=cmap) + colored_image = apply_colormap(depth, colormap_options=colormap_options) if accumulation is not None: colored_image = colored_image * accumulation + (1 - accumulation) diff --git a/nerfstudio/utils/eval_utils.py b/nerfstudio/utils/eval_utils.py index bd535af7f..5b35c33ff 100644 --- a/nerfstudio/utils/eval_utils.py +++ b/nerfstudio/utils/eval_utils.py @@ -20,12 +20,11 @@ from __future__ import annotations import os import sys from pathlib import Path -from typing import Optional, Tuple +from typing import Literal, Optional, Tuple import torch import yaml from rich.console import Console -from typing_extensions import Literal from nerfstudio.engine.trainer import TrainerConfig from nerfstudio.pipelines.base_pipeline import Pipeline diff --git a/nerfstudio/utils/math.py b/nerfstudio/utils/math.py index 89a4d3250..924556597 100644 --- a/nerfstudio/utils/math.py +++ b/nerfstudio/utils/math.py @@ -15,13 +15,10 @@ """ Math Helper Functions """ from dataclasses import dataclass -from typing import Tuple +from typing import Literal, Tuple import torch from torchtyping import TensorType -from typing_extensions import Literal - -_USE_NERFACC = True def components_from_spherical_harmonics(levels: int, directions: TensorType[..., 3]) -> TensorType[..., "components"]: @@ -198,7 +195,7 @@ def expected_sin(x_means: torch.Tensor, x_vars: torch.Tensor) -> torch.Tensor: @torch.jit.script -def _intersect_aabb( +def intersect_aabb( origins: torch.Tensor, directions: torch.Tensor, aabb: torch.Tensor, @@ -238,43 +235,6 @@ def _intersect_aabb( return t_min, t_max -def intersect_aabb( - origins: TensorType["N", 3], - directions: TensorType["N", 3], - aabb: TensorType[6], -) -> Tuple[TensorType["N"], TensorType["N"]]: - """ - Implementation of ray intersection with AABB box - - Args: - origins: 3d positions - directions: Normalized directions - aabb: array of aabb box in the form of [x_min, y_min, z_min, x_max, y_max, z_max] - max_bound: Maximum value of t_max - invalid_value: Value to return in case of no intersection - - Returns: - t_min, t_max - two tensors of shapes N representing distance of intersection from the origin. - """ - - global _USE_NERFACC # pylint: disable=global-statement - if _USE_NERFACC: - try: - import nerfacc # pylint: disable=import-outside-toplevel - - t_min, t_max, _ = nerfacc.ray_aabb_intersect( - origins, directions, aabb[None, :], near_plane=0, far_plane=1e10, miss_value=1e10 - ) - t_min, t_max = t_min.squeeze(-1), t_max.squeeze(-1) - except: # pylint: disable=bare-except - t_min, t_max = _intersect_aabb(origins, directions, aabb, max_bound=1e10, invalid_value=1e10) - _USE_NERFACC = False - else: - t_min, t_max = _intersect_aabb(origins, directions, aabb, max_bound=1e10, invalid_value=1e10) - - return t_min, t_max - - def safe_normalize( vectors: TensorType["batch_dim":..., "N"], eps: float = 1e-10, diff --git a/nerfstudio/utils/writer.py b/nerfstudio/utils/writer.py index 4d168d508..d996a7f36 100644 --- a/nerfstudio/utils/writer.py +++ b/nerfstudio/utils/writer.py @@ -187,10 +187,22 @@ def setup_local_writer(config: cfg.LoggingConfig, max_iter: int, banner_messages GLOBAL_BUFFER["events"] = {} -@check_main_thread -def setup_event_writer(is_wandb_enabled: bool, is_tensorboard_enabled: bool, log_dir: Path) -> None: - """Initialization of all event writers specified in config +def is_initialized(): + """ + Returns True after setup_local_writer was called + """ + return "events" in GLOBAL_BUFFER + +@check_main_thread +def setup_event_writer( + is_wandb_enabled: bool, + is_tensorboard_enabled: bool, + log_dir: Path, + experiment_name: str, + project_name: str = "nerfstudio-project", +) -> None: + """Initialization of all event writers specified in config Args: config: configuration to instantiate loggers max_iter: maximum number of train iterations @@ -198,7 +210,7 @@ def setup_event_writer(is_wandb_enabled: bool, is_tensorboard_enabled: bool, log """ using_event_writer = False if is_wandb_enabled: - curr_writer = WandbWriter(log_dir=log_dir) + curr_writer = WandbWriter(log_dir=log_dir, experiment_name=experiment_name, project_name=project_name) EVENT_WRITERS.append(curr_writer) using_event_writer = True if is_tensorboard_enabled: @@ -268,7 +280,7 @@ class TimeWriter: def __exit__(self, *args): self.duration = time() - self.start update_step = self.step is not None - if self.write: + if self.write and is_initialized(): self.writer.put_time( name=self.name, duration=self.duration, @@ -282,11 +294,11 @@ class TimeWriter: class WandbWriter(Writer): """WandDB Writer Class""" - def __init__(self, log_dir: Path): + def __init__(self, log_dir: Path, experiment_name: str, project_name: str = "nerfstudio-project"): wandb.init( - project=os.environ.get("WANDB_PROJECT", "nerfstudio-project"), + project=os.environ.get("WANDB_PROJECT", project_name), dir=os.environ.get("WANDB_DIR", str(log_dir)), - name=os.environ.get("WANDB_NAME", log_dir.name), + name=os.environ.get("WANDB_NAME", experiment_name), reinit=True, ) diff --git a/nerfstudio/viewer/app/package.json b/nerfstudio/viewer/app/package.json index a232ef355..def16e3e9 100644 --- a/nerfstudio/viewer/app/package.json +++ b/nerfstudio/viewer/app/package.json @@ -1,7 +1,7 @@ { "name": "viewer", "homepage": ".", - "version": "23-04-18-0", + "version": "23-05-01-0", "private": true, "dependencies": { "@emotion/react": "^11.10.4", @@ -93,4 +93,4 @@ "resolve-url-loader": "^5.0.0", "yaml": "^2.2.2" } -} +} \ No newline at end of file diff --git a/nerfstudio/viewer/app/run_deploy.py b/nerfstudio/viewer/app/run_deploy.py index 03fd86465..99d5f47a9 100644 --- a/nerfstudio/viewer/app/run_deploy.py +++ b/nerfstudio/viewer/app/run_deploy.py @@ -119,7 +119,6 @@ def main( # update the symlink of latest if branch_name == "main": - # move the build folder to the correct location run_cmd(f"""ssh {host} 'rm -rf {remote_folder}/{version}'""") run_cmd(f"""ssh {host} 'cp -R /home/eweb0124/build {remote_folder}/{version}'""") diff --git a/nerfstudio/viewer/app/src/modules/SidePanel/CameraPanel/CameraPanel.jsx b/nerfstudio/viewer/app/src/modules/SidePanel/CameraPanel/CameraPanel.jsx index 720501734..1ea1595cd 100644 --- a/nerfstudio/viewer/app/src/modules/SidePanel/CameraPanel/CameraPanel.jsx +++ b/nerfstudio/viewer/app/src/modules/SidePanel/CameraPanel/CameraPanel.jsx @@ -1086,7 +1086,7 @@ export default function CameraPanel(props) { if ('crop' in camera_path_object && camera_path_object.crop !== null) { const bg_color = camera_path_object.crop.crop_bg_color; sendWebsocketMessage(viser_websocket, { - type: 'crop_params', + type: 'CropParamsMessage', crop_enabled: true, crop_bg_color: [bg_color.r, bg_color.g, bg_color.b], crop_center: camera_path_object.crop.crop_center, diff --git a/nerfstudio/viewer/app/src/modules/WebSocket/ViserMessages.tsx b/nerfstudio/viewer/app/src/modules/WebSocket/ViserMessages.tsx index e0e713727..965e59ab6 100644 --- a/nerfstudio/viewer/app/src/modules/WebSocket/ViserMessages.tsx +++ b/nerfstudio/viewer/app/src/modules/WebSocket/ViserMessages.tsx @@ -1,123 +1,110 @@ // AUTOMATICALLY GENERATED message interfaces, from Python dataclass definitions. // This file should not be manually modified. interface BackgroundImageMessage { - type: 'BackgroundImageMessage'; + type: "BackgroundImageMessage"; media_type: 'image/jpeg' | 'image/png'; base64_data: string; } interface GuiAddMessage { - type: 'GuiAddMessage'; + type: "GuiAddMessage"; name: string; - folder_labels: [string]; + folder_labels: string[]; leva_conf: any; } interface GuiRemoveMessage { - type: 'GuiRemoveMessage'; + type: "GuiRemoveMessage"; name: string; } interface GuiUpdateMessage { - type: 'GuiUpdateMessage'; + type: "GuiUpdateMessage"; name: string; value: any; } interface GuiSetHiddenMessage { - type: 'GuiSetHiddenMessage'; + type: "GuiSetHiddenMessage"; name: string; hidden: boolean; } interface GuiSetValueMessage { - type: 'GuiSetValueMessage'; + type: "GuiSetValueMessage"; name: string; value: any; } interface GuiSetLevaConfMessage { - type: 'GuiSetLevaConfMessage'; + type: "GuiSetLevaConfMessage"; name: string; leva_conf: any; } interface FilePathInfoMessage { - type: 'FilePathInfoMessage'; + type: "FilePathInfoMessage"; config_base_dir: string; data_base_dir: string; export_path_name: string; } interface CameraMessage { - type: 'CameraMessage'; + type: "CameraMessage"; aspect: number; render_aspect: number; fov: number; - matrix: [ - number, - number, - number, - number, - number, - number, - number, - number, - number, - number, - number, - number, - number, - number, - number, - number, - ]; + matrix: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]; camera_type: 'perspective' | 'fisheye' | 'equirectangular'; is_moving: boolean; timestamp: number; } interface SceneBoxMessage { - type: 'SceneBoxMessage'; + type: "SceneBoxMessage"; min: [number, number, number]; max: [number, number, number]; } interface DatasetImageMessage { - type: 'DatasetImageMessage'; + type: "DatasetImageMessage"; idx: string; json: any; } interface TrainingStateMessage { - type: 'TrainingStateMessage'; + type: "TrainingStateMessage"; training_state: 'training' | 'paused' | 'completed'; } interface CameraPathPayloadMessage { - type: 'CameraPathPayloadMessage'; + type: "CameraPathPayloadMessage"; camera_path_filename: string; camera_path: any; } interface CameraPathOptionsRequest { - type: 'CameraPathOptionsRequest'; + type: "CameraPathOptionsRequest"; } interface CameraPathsMessage { - type: 'CameraPathsMessage'; + type: "CameraPathsMessage"; payload: any; } interface CropParamsMessage { - type: 'CropParamsMessage'; + type: "CropParamsMessage"; crop_enabled: boolean; crop_bg_color: [number, number, number]; crop_center: [number, number, number]; crop_scale: [number, number, number]; } interface StatusMessage { - type: 'StatusMessage'; + type: "StatusMessage"; eval_res: string; step: number; } interface SaveCheckpointMessage { - type: 'SaveCheckpointMessage'; + type: "SaveCheckpointMessage"; } interface UseTimeConditioningMessage { - type: 'UseTimeConditioningMessage'; + type: "UseTimeConditioningMessage"; } interface TimeConditionMessage { - type: 'TimeConditionMessage'; + type: "TimeConditionMessage"; time: number; } +interface OutputOptionsMessage { + type: "OutputOptionsMessage"; + options: any; +} -export type Message = +export type Message = | BackgroundImageMessage | GuiAddMessage | GuiRemoveMessage @@ -137,4 +124,5 @@ export type Message = | StatusMessage | SaveCheckpointMessage | UseTimeConditioningMessage - | TimeConditionMessage; + | TimeConditionMessage + | OutputOptionsMessage; diff --git a/nerfstudio/viewer/app/src/modules/WebSocket/ViserWebSocket.tsx b/nerfstudio/viewer/app/src/modules/WebSocket/ViserWebSocket.tsx index 6bc1e312d..0b5b8f2e9 100644 --- a/nerfstudio/viewer/app/src/modules/WebSocket/ViserWebSocket.tsx +++ b/nerfstudio/viewer/app/src/modules/WebSocket/ViserWebSocket.tsx @@ -276,6 +276,14 @@ function handleMessage( }); break; } + case 'OutputOptionsMessage': { + dispatch({ + type: 'write', + path: 'renderingState/output_options', + data: message.options, + }); + break; + } default: { console.log('Received message did not match any known types:', message); break; diff --git a/nerfstudio/viewer/app/src/reducer.js b/nerfstudio/viewer/app/src/reducer.js index 65cb2f810..d22952010 100644 --- a/nerfstudio/viewer/app/src/reducer.js +++ b/nerfstudio/viewer/app/src/reducer.js @@ -58,6 +58,9 @@ const initialState = { // Time options use_time_conditioning: false, + + // Currently just used for mesh panel, should be removed + output_options: [], }, // the scene state sceneState: { diff --git a/nerfstudio/viewer/app/src/themes/leva_theme.json b/nerfstudio/viewer/app/src/themes/leva_theme.json index 9a0969ef5..db09d14c4 100644 --- a/nerfstudio/viewer/app/src/themes/leva_theme.json +++ b/nerfstudio/viewer/app/src/themes/leva_theme.json @@ -20,7 +20,7 @@ "space": { "sm": "6px", "md": "5px", - "rowGap": "6px", + "rowGap": "3px", "colGap": "7px" }, "fontSizes": { @@ -31,15 +31,15 @@ "controlWidth": "170px", "scrubberWidth": "8px", "scrubberHeight": "16px", - "rowHeight": "24px", - "folderHeight": "20px", + "rowHeight": "22px", + "folderHeight": "10px", "checkboxSize": "16px", "joystickWidth": "100px", "joystickHeight": "100px", "colorPickerWidth": "160px", "colorPickerHeight": "100px", "monitorHeight": "60px", - "titleBarHeight": "39px" + "titleBarHeight": "20px" }, "borderWidths": { "root": "0px", diff --git a/nerfstudio/viewer/server/control_panel.py b/nerfstudio/viewer/server/control_panel.py index 3856fc70e..ab4e830a2 100644 --- a/nerfstudio/viewer/server/control_panel.py +++ b/nerfstudio/viewer/server/control_panel.py @@ -14,11 +14,11 @@ """ Control panel for the viewer """ from collections import defaultdict -from typing import Callable, DefaultDict, List, Tuple +from typing import Callable, DefaultDict, List, Tuple, get_args import torch -from nerfstudio.viewer.server import viewer_utils +from nerfstudio.utils.colormaps import ColormapOptions, Colormaps from nerfstudio.viewer.server.viewer_elements import ( ViewerCheckbox, ViewerDropdown, @@ -42,8 +42,17 @@ class ControlPanel: update_output_cb: a callback that will be called when the user changes the output render """ - def __init__(self, time_enabled: bool, rerender_cb: Callable, crop_update_cb: Callable, update_output_cb: Callable): + def __init__( + self, + viser_server: ViserServer, + time_enabled: bool, + rerender_cb: Callable, + crop_update_cb: Callable, + update_output_cb: Callable, + update_split_output_cb: Callable, + ): # elements holds a mapping from tag: [elements] + self.viser_server = viser_server self._elements_by_tag: DefaultDict[str, List[ViewerElement]] = defaultdict(lambda: []) self._train_speed = ViewerDropdown( @@ -55,40 +64,75 @@ class ControlPanel: ["not set"], cb_hook=lambda han: [self.update_control_panel(), update_output_cb(han), rerender_cb(han)], ) - self._colormap = ViewerDropdown("Colormap", "default", ["default"], cb_hook=rerender_cb) - self._invert = ViewerCheckbox("| Invert", False, cb_hook=rerender_cb) - self._normalize = ViewerCheckbox("| Normalize", False, cb_hook=rerender_cb) - self._min = ViewerNumber("| Min", 0.0, cb_hook=rerender_cb) - self._max = ViewerNumber("| Max", 1.0, cb_hook=rerender_cb) + self._colormap = ViewerDropdown[Colormaps]("Colormap", "default", ["default"], cb_hook=rerender_cb) + self._invert = ViewerCheckbox("Invert", False, cb_hook=rerender_cb) + self._normalize = ViewerCheckbox("Normalize", True, cb_hook=rerender_cb) + self._min = ViewerNumber("Min", 0.0, cb_hook=rerender_cb) + self._max = ViewerNumber("Max", 1.0, cb_hook=rerender_cb) + + self._split = ViewerCheckbox( + "Enable", False, cb_hook=lambda han: [self.update_control_panel(), rerender_cb(han)] + ) + self._split_percentage = ViewerSlider("Split Percentage", 0.5, 0.0, 1.0, 0.01, cb_hook=rerender_cb) + self._split_output_render = ViewerDropdown( + "Output Render Split", + "not set", + ["not set"], + cb_hook=lambda han: [self.update_control_panel(), update_split_output_cb(han), rerender_cb(han)], + ) + # Hack: spaces are after at the end of the names to make them unique + self._split_colormap = ViewerDropdown[Colormaps]("Colormap ", "default", ["default"], cb_hook=rerender_cb) + self._split_invert = ViewerCheckbox("Invert ", False, cb_hook=rerender_cb) + self._split_normalize = ViewerCheckbox("Normalize ", True, cb_hook=rerender_cb) + self._split_min = ViewerNumber("Min ", 0.0, cb_hook=rerender_cb) + self._split_max = ViewerNumber("Max ", 1.0, cb_hook=rerender_cb) + self._train_util = ViewerSlider("Train Util", 0.85, 0, 1, 0.05) self._max_res = ViewerSlider("Max Res", 512, 64, 2048, 100, cb_hook=rerender_cb) self._crop_viewport = ViewerCheckbox( - "Crop Viewport", + "Enable ", False, cb_hook=lambda han: [self.update_control_panel(), crop_update_cb(han), rerender_cb(han)], ) - self._background_color = ViewerRGB("| Background color", (38, 42, 55), cb_hook=crop_update_cb) - self._crop_min = ViewerVec3("| Crop Min", (-1, -1, -1), 0.05, cb_hook=crop_update_cb) - self._crop_max = ViewerVec3("| Crop Max", (1, 1, 1), 0.05, cb_hook=crop_update_cb) + self._background_color = ViewerRGB("Background color", (38, 42, 55), cb_hook=crop_update_cb) + self._crop_min = ViewerVec3("Crop Min", (-1, -1, -1), 0.05, cb_hook=crop_update_cb) + self._crop_max = ViewerVec3("Crop Max", (1, 1, 1), 0.05, cb_hook=crop_update_cb) self._time = ViewerSlider("Time", 0.0, 0.0, 1.0, 0.01, cb_hook=rerender_cb) self._time_enabled = time_enabled self.add_element(self._train_speed) - self.add_element(self._output_render) - self.add_element(self._colormap) - # colormap options - self.add_element(self._invert, additional_tags=("colormap",)) - self.add_element(self._normalize, additional_tags=("colormap",)) - self.add_element(self._min, additional_tags=("colormap",)) - self.add_element(self._max, additional_tags=("colormap",)) - self.add_element(self._train_util) - self.add_element(self._max_res) - self.add_element(self._crop_viewport) - # Crop options - self.add_element(self._background_color, additional_tags=("crop",)) - self.add_element(self._crop_min, additional_tags=("crop",)) - self.add_element(self._crop_max, additional_tags=("crop",)) + with self.viser_server.gui_folder("Render Options"): + self.add_element(self._max_res) + self.add_element(self._output_render) + self.add_element(self._colormap) + # colormap options + with self.viser_server.gui_folder(" "): + self.add_element(self._invert, additional_tags=("colormap",)) + self.add_element(self._normalize, additional_tags=("colormap",)) + self.add_element(self._min, additional_tags=("colormap",)) + self.add_element(self._max, additional_tags=("colormap",)) + + # split options + with self.viser_server.gui_folder("Split Screen"): + self.add_element(self._split) + + self.add_element(self._split_percentage, additional_tags=("split",)) + self.add_element(self._split_output_render, additional_tags=("split",)) + self.add_element(self._split_colormap, additional_tags=("split",)) + with self.viser_server.gui_folder(" "): + self.add_element(self._split_invert, additional_tags=("split_colormap",)) + self.add_element(self._split_normalize, additional_tags=("split_colormap",)) + self.add_element(self._split_min, additional_tags=("split_colormap",)) + self.add_element(self._split_max, additional_tags=("split_colormap",)) + + with self.viser_server.gui_folder("Crop Viewport"): + self.add_element(self._crop_viewport) + + # Crop options + self.add_element(self._background_color, additional_tags=("crop",)) + self.add_element(self._crop_min, additional_tags=("crop",)) + self.add_element(self._crop_max, additional_tags=("crop",)) self.add_element(self._time, additional_tags=("time",)) @@ -104,22 +148,14 @@ class ControlPanel: self._train_util.value = 0.5 self._max_res.value = 1024 - def install(self, viser_server: ViserServer) -> None: - """Installs the control panel on the viser server - - Args: - viser_server: the viser server - """ - for e in self._elements_by_tag["all"]: - e.install(viser_server) - self.update_control_panel() - def update_output_options(self, new_options: List[str]): """ Args: new_options: a list of new output options """ self._output_render.set_options(new_options) + self._split_output_render.set_options(new_options) + self._split_output_render.value = new_options[-1] def add_element(self, e: ViewerElement, additional_tags: Tuple[str] = tuple()) -> None: """Adds an element to the control panel @@ -131,6 +167,7 @@ class ControlPanel: self._elements_by_tag["all"].append(e) for t in additional_tags: self._elements_by_tag[t].append(e) + e.install(self.viser_server) def update_control_panel(self) -> None: """ @@ -139,9 +176,15 @@ class ControlPanel: self._colormap.set_disabled(self.output_render == "rgb") for e in self._elements_by_tag["colormap"]: e.set_hidden(self.output_render == "rgb") + for e in self._elements_by_tag["split_colormap"]: + e.set_hidden(not self._split.value or self.split_output_render == "rgb") for e in self._elements_by_tag["crop"]: e.set_hidden(not self.crop_viewport) self._time.set_hidden(not self._time_enabled) + self._split_percentage.set_hidden(not self._split.value) + self._split_output_render.set_hidden(not self._split.value) + self._split_colormap.set_hidden(not self._split.value) + self._split_colormap.set_disabled(self.split_output_render == "rgb") def update_colormap_options(self, dimensions: int, dtype: type) -> None: """update the colormap options based on the current render @@ -150,13 +193,16 @@ class ControlPanel: dimensions: the number of dimensions of the render dtype: the data type of the render """ - colormap_options = [] - if dimensions == 3: - colormap_options = [viewer_utils.ColormapTypes.DEFAULT.value] - if dimensions == 1 and dtype == torch.float: - colormap_options = [c.value for c in list(viewer_utils.ColormapTypes)[1:]] + self._colormap.set_options(_get_colormap_options(dimensions, dtype)) - self._colormap.set_options(colormap_options) + def update_split_colormap_options(self, dimensions: int, dtype: type) -> None: + """update the split colormap options based on the current render + + Args: + dimensions: the number of dimensions of the render + dtype: the data type of the render + """ + self._split_colormap.set_options(_get_colormap_options(dimensions, dtype)) @property def train_speed(self) -> str: @@ -169,29 +215,19 @@ class ControlPanel: return self._output_render.value @property - def colormap(self) -> str: - """Returns the current colormap""" - return self._colormap.value + def split_output_render(self) -> str: + """Returns the current output for the split render""" + return self._split_output_render.value @property - def colormap_invert(self) -> bool: - """Returns the current colormap invert setting""" - return self._invert.value + def split(self) -> bool: + """Returns whether the split is enabled""" + return self._split.value @property - def colormap_normalize(self) -> bool: - """Returns the current colormap normalize setting""" - return self._normalize.value - - @property - def colormap_min(self) -> float: - """Returns the current colormap min setting""" - return self._min.value - - @property - def colormap_max(self) -> float: - """Returns the current colormap max setting""" - return self._max.value + def split_percentage(self) -> float: + """Returns the percentage of the screen to split""" + return self._split_percentage.value @property def train_util(self) -> float: @@ -252,3 +288,44 @@ class ControlPanel: def time(self, value: float): """Sets the background color""" self._time.value = value + + @property + def colormap_options(self) -> ColormapOptions: + """Returns the current colormap options""" + return ColormapOptions( + colormap=self._colormap.value, + normalize=self._normalize.value, + colormap_min=self._min.value, + colormap_max=self._max.value, + invert=self._invert.value, + ) + + @property + def split_colormap_options(self) -> ColormapOptions: + """Returns the current colormap options""" + return ColormapOptions( + colormap=self._split_colormap.value, + normalize=self._split_normalize.value, + colormap_min=self._split_min.value, + colormap_max=self._split_max.value, + invert=self._split_invert.value, + ) + + +def _get_colormap_options(dimensions: int, dtype: type) -> List[Colormaps]: + """ + Given the number of dimensions and data type, returns a list of available colormap options + to use with the visualize() function. + + Args: + dimensions: the number of dimensions of the render + dtype: the data type of the render + Returns: + a list of available colormap options + """ + colormap_options: List[Colormaps] = [] + if dimensions == 3: + colormap_options = ["default"] + if dimensions == 1 and dtype == torch.float: + colormap_options = [c for c in list(get_args(Colormaps)) if c != "default"] + return colormap_options diff --git a/nerfstudio/viewer/server/gui_utils.py b/nerfstudio/viewer/server/gui_utils.py index 792d3f2b4..a77fc6edb 100644 --- a/nerfstudio/viewer/server/gui_utils.py +++ b/nerfstudio/viewer/server/gui_utils.py @@ -53,7 +53,7 @@ def parse_object( ret = [] # get a list of the properties of the object, sorted by whether things are instances of type_check obj_props = [(k, getattr(obj, k)) for k in dir(obj)] - for (k, v) in obj_props: + for k, v in obj_props: if k[0] == "_": continue new_tree_stub = f"{tree_stub}/{k}" diff --git a/nerfstudio/viewer/server/render_state_machine.py b/nerfstudio/viewer/server/render_state_machine.py index f0c5ec21f..e4596472e 100644 --- a/nerfstudio/viewer/server/render_state_machine.py +++ b/nerfstudio/viewer/server/render_state_machine.py @@ -18,14 +18,13 @@ from __future__ import annotations import contextlib import threading from dataclasses import dataclass -from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple +from typing import TYPE_CHECKING, Any, Dict, Literal, Optional, Tuple, get_args import torch -from typing_extensions import Literal, get_args from nerfstudio.cameras.cameras import Cameras, CameraType from nerfstudio.model_components.renderers import background_color_override_context -from nerfstudio.utils import writer +from nerfstudio.utils import colormaps, writer from nerfstudio.utils.writer import GLOBAL_BUFFER, EventName, TimeWriter from nerfstudio.viewer.server import viewer_utils from nerfstudio.viewer.server.utils import get_intrinsics_matrix_and_camera_to_world_h @@ -79,6 +78,7 @@ class RenderStateMachine(threading.Thread): self.viewer = viewer self.interrupt_render_flag = False self.daemon = True + self.output_keys = {} def action(self, action: RenderAction): """Takes an action and updates the state machine @@ -161,7 +161,7 @@ class RenderStateMachine(threading.Thread): ) camera = camera.to(self.viewer.get_model().device) - with (self.viewer.train_lock if self.viewer.train_lock is not None else contextlib.nullcontext()): + with self.viewer.train_lock if self.viewer.train_lock is not None else contextlib.nullcontext(): camera_ray_bundle = camera.generate_rays(camera_indices=0, aabb_box=self.viewer.get_model().render_aabb) with TimeWriter(None, None, write=False) as vis_t: @@ -184,9 +184,10 @@ class RenderStateMachine(threading.Thread): self.viewer.get_model().train() num_rays = len(camera_ray_bundle) render_time = vis_t.duration - writer.put_time( - name=EventName.VIS_RAYS_PER_SEC, duration=num_rays / render_time, step=step, avg_over_steps=True - ) + if writer.is_initialized(): + writer.put_time( + name=EventName.VIS_RAYS_PER_SEC, duration=num_rays / render_time, step=step, avg_over_steps=True + ) self.viewer.viser_server.send_status_message(eval_res=f"{image_height}x{image_width}px", step=step) return outputs @@ -229,13 +230,38 @@ class RenderStateMachine(threading.Thread): Args: outputs: the dictionary of outputs to choose from, from the model """ - self.viewer.control_panel.update_output_options(list(outputs.keys())) + output_keys = set(outputs.keys()) + if self.output_keys != output_keys: + self.output_keys = output_keys + self.viewer.viser_server.send_output_options_message(list(outputs.keys())) + self.viewer.control_panel.update_output_options(list(outputs.keys())) output_render = self.viewer.control_panel.output_render self.viewer.update_colormap_options( dimensions=outputs[output_render].shape[-1], dtype=outputs[output_render].dtype ) - selected_output = (viewer_utils.apply_colormap(self.viewer.control_panel, outputs) * 255).type(torch.uint8) + selected_output = colormaps.apply_colormap( + image=outputs[self.viewer.control_panel.output_render], + colormap_options=self.viewer.control_panel.colormap_options, + ) + + if self.viewer.control_panel.split: + split_output_render = self.viewer.control_panel.split_output_render + self.viewer.update_split_colormap_options( + dimensions=outputs[split_output_render].shape[-1], dtype=outputs[split_output_render].dtype + ) + split_output = colormaps.apply_colormap( + image=outputs[self.viewer.control_panel.split_output_render], + colormap_options=self.viewer.control_panel.split_colormap_options, + ) + split_index = min( + int(self.viewer.control_panel.split_percentage * selected_output.shape[1]), + selected_output.shape[1] - 1, + ) + selected_output = torch.cat([selected_output[:, :split_index], split_output[:, split_index:]], dim=1) + selected_output[:, split_index] = torch.tensor([0.133, 0.157, 0.192], device=selected_output.device) + + selected_output = (selected_output * 255).type(torch.uint8) self.viewer.viser_server.set_background_image( selected_output.cpu().numpy(), @@ -262,7 +288,7 @@ class RenderStateMachine(threading.Thread): image_width = max_res image_height = int(image_width / aspect_ratio) elif self.state in ("low_move", "low_static"): - if EventName.VIS_RAYS_PER_SEC.value in GLOBAL_BUFFER["events"]: + if writer.is_initialized() and EventName.VIS_RAYS_PER_SEC.value in GLOBAL_BUFFER["events"]: vis_rays_per_sec = GLOBAL_BUFFER["events"][EventName.VIS_RAYS_PER_SEC.value]["avg"] else: vis_rays_per_sec = 100000 diff --git a/nerfstudio/viewer/server/viewer_elements.py b/nerfstudio/viewer/server/viewer_elements.py index 19d9e7588..fbf60bfb6 100644 --- a/nerfstudio/viewer/server/viewer_elements.py +++ b/nerfstudio/viewer/server/viewer_elements.py @@ -12,12 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +# pylint: disable=too-few-public-methods,access-member-before-definition,attribute-defined-outside-init + """ Viewer GUI elements for the nerfstudio viewer """ from __future__ import annotations from abc import abstractmethod -from typing import Any, Callable, Generic, List, Optional, Tuple, TypeVar +from typing import Any, Callable, Generic, List, Optional, Tuple + +from typing_extensions import TypeVar from nerfstudio.viewer.viser import GuiHandle, GuiSelectHandle, ViserServer @@ -266,7 +270,10 @@ class ViewerCheckbox(ViewerParameter[bool]): self.gui_handle.set_disabled(self.disabled) -class ViewerDropdown(ViewerParameter[str]): +TString = TypeVar("TString", default=str) + + +class ViewerDropdown(ViewerParameter[TString], Generic[TString]): """A dropdown in the viewer Args: @@ -282,8 +289,8 @@ class ViewerDropdown(ViewerParameter[str]): def __init__( self, name: str, - default_value: str, - options: List[str], + default_value: TString, + options: List[TString], disabled: bool = False, cb_hook: Callable[[ViewerDropdown], Any] = lambda element: None, ): diff --git a/nerfstudio/viewer/server/viewer_state.py b/nerfstudio/viewer/server/viewer_state.py index 8bccd3587..513bc480c 100644 --- a/nerfstudio/viewer/server/viewer_state.py +++ b/nerfstudio/viewer/server/viewer_state.py @@ -17,7 +17,7 @@ from __future__ import annotations import threading from pathlib import Path -from typing import TYPE_CHECKING, List, Optional +from typing import TYPE_CHECKING, List, Literal, Optional import numpy as np import torch @@ -25,7 +25,6 @@ from rich import box, style from rich.console import Console from rich.panel import Panel from rich.table import Table -from typing_extensions import Literal from nerfstudio.configs import base_config as cfg from nerfstudio.data.datasets.base_dataset import InputDataset @@ -116,6 +115,7 @@ class ViewerState: # viewer specific variables self.output_type_changed = True + self.output_split_type_changed = True self.step = 0 self.train_btn_state: Literal["training", "paused", "completed"] = "training" self._prev_train_state: Literal["training", "paused", "completed"] = "training" @@ -135,9 +135,13 @@ class ViewerState: self.viser_server.register_handler(TimeConditionMessage, self._handle_time_condition_message) self.control_panel = ControlPanel( - self.include_time, self._interrupt_render, self._crop_params_update, self._output_type_change + self.viser_server, + self.include_time, + self._interrupt_render, + self._crop_params_update, + self._output_type_change, + self._output_split_type_change, ) - self.control_panel.install(self.viser_server) def nested_folder_install(folder_labels: List[str], element: ViewerElement): if len(folder_labels) == 0: @@ -164,6 +168,9 @@ class ViewerState: def _output_type_change(self, _): self.output_type_changed = True + def _output_split_type_change(self, _): + self.output_split_type_changed = True + def _interrupt_render(self, _) -> None: """Interrupt current render.""" if self.camera_message is not None: @@ -177,7 +184,7 @@ class ViewerState: scene_box = SceneBox(aabb=torch.stack([crop_min, crop_max], dim=0)) self.viser_server.update_scene_box(scene_box) crop_scale = crop_max - crop_min - crop_center = crop_max + crop_min + crop_center = (crop_max + crop_min) / 2.0 self.viser_server.send_crop_params( crop_enabled=self.control_panel.crop_viewport, crop_bg_color=self.control_panel.background_color, @@ -351,6 +358,17 @@ class ViewerState: self.control_panel.update_colormap_options(dimensions, dtype) self.output_type_changed = False + def update_split_colormap_options(self, dimensions: int, dtype: type) -> None: + """update the colormap options based on the current render + + Args: + dimensions: the number of dimensions of the render + dtype: the data type of the render + """ + if self.output_split_type_changed: + self.control_panel.update_split_colormap_options(dimensions, dtype) + self.output_split_type_changed = False + def get_model(self) -> Model: """Returns the model.""" return self.pipeline.model diff --git a/nerfstudio/viewer/server/viewer_utils.py b/nerfstudio/viewer/server/viewer_utils.py index be3b480c7..e47f652c9 100644 --- a/nerfstudio/viewer/server/viewer_utils.py +++ b/nerfstudio/viewer/server/viewer_utils.py @@ -17,21 +17,18 @@ """Code to interface with the `vis/` (the JS viewer).""" from __future__ import annotations -import enum import os import socket import sys from pathlib import Path -from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple +from typing import TYPE_CHECKING, Optional, Tuple import torch from rich.console import Console from nerfstudio.data.scene_box import SceneBox from nerfstudio.models.base_model import Model -from nerfstudio.utils import colormaps from nerfstudio.utils.io import load_from_json -from nerfstudio.viewer.server.control_panel import ControlPanel if TYPE_CHECKING: from nerfstudio.engine.trainer import Trainer @@ -59,17 +56,6 @@ def get_viewer_url(websocket_port: int) -> str: return f"https://viewer.nerf.studio/versions/{version}/?websocket_url={websocket_url}" -class ColormapTypes(str, enum.Enum): - """List of colormap render types""" - - DEFAULT = "default" - TURBO = "turbo" - VIRIDIS = "viridis" - MAGMA = "magma" - INFERNO = "inferno" - CIVIDIS = "cividis" - - class IOChangeException(Exception): """Basic camera exception to interrupt viewer""" @@ -149,49 +135,3 @@ def update_render_aabb( model.render_aabb = SceneBox(aabb=torch.stack([crop_min, crop_max], dim=0)) else: model.render_aabb = None - - -def apply_colormap( - control_panel: ControlPanel, outputs: Dict[str, Any], colors: Optional[torch.Tensor] = None, eps=1e-6 -): - """Determines which colormap to use based on set colormap type - - Args: - control_panel: control panel object - outputs: the output tensors for which to apply colormaps on - colors: is only set if colormap is for semantics. Defaults to None. - eps: epsilon to handle floating point comparisons - """ - colormap_type = control_panel.colormap - output_type = control_panel.output_render - - # default for rgb images - if colormap_type == ColormapTypes.DEFAULT and outputs[output_type].shape[-1] == 3: - return outputs[output_type] - - # rendering depth outputs - if outputs[output_type].shape[-1] == 1 and outputs[output_type].dtype == torch.float: - output = outputs[output_type] - if control_panel.colormap_normalize: - output = output - torch.min(output) - output = output / (torch.max(output) + eps) - output = output * (control_panel.colormap_max - control_panel.colormap_min) + control_panel.colormap_min - output = torch.clip(output, 0, 1) - if control_panel.colormap_invert: - output = 1 - output - if colormap_type == ColormapTypes.DEFAULT: - return colormaps.apply_colormap(output, cmap=ColormapTypes.TURBO.value) - return colormaps.apply_colormap(output, cmap=colormap_type) - - # rendering semantic outputs - if outputs[output_type].dtype == torch.int: - logits = outputs[output_type] - labels = torch.argmax(torch.nn.functional.softmax(logits, dim=-1), dim=-1) # type: ignore - assert colors is not None - return colors[labels] - - # rendering boolean outputs - if outputs[output_type].dtype == torch.bool: - return colormaps.apply_boolean_colormap(outputs[output_type]) - - raise NotImplementedError diff --git a/nerfstudio/viewer/viser/message_api.py b/nerfstudio/viewer/viser/message_api.py index 9c7a56ddd..38faf5d06 100644 --- a/nerfstudio/viewer/viser/message_api.py +++ b/nerfstudio/viewer/viser/message_api.py @@ -31,6 +31,7 @@ from typing import ( Dict, Generator, List, + Literal, Optional, Tuple, TypeVar, @@ -41,7 +42,7 @@ from typing import ( import imageio.v3 as iio import numpy as onp import numpy.typing as onpt -from typing_extensions import Literal, LiteralString, ParamSpec, assert_never +from typing_extensions import LiteralString, ParamSpec, assert_never from nerfstudio.data.scene_box import SceneBox @@ -485,6 +486,14 @@ class MessageApi(abc.ABC): """ self._queue(messages.StatusMessage(eval_res=eval_res, step=step)) + def send_output_options_message(self, options: List[str]): + """Send output options message + + Args: + options: The list of output options + """ + self._queue(messages.OutputOptionsMessage(options=options)) + def _add_gui_impl( self, name: str, diff --git a/nerfstudio/viewer/viser/messages.py b/nerfstudio/viewer/viser/messages.py index de4245d14..3fcfc7b3a 100644 --- a/nerfstudio/viewer/viser/messages.py +++ b/nerfstudio/viewer/viser/messages.py @@ -18,10 +18,10 @@ from __future__ import annotations import dataclasses -from typing import Any, Tuple +from typing import Any, Literal, Tuple import viser.infra -from typing_extensions import Literal, override +from typing_extensions import override class NerfstudioMessage(viser.infra.Message): @@ -241,3 +241,13 @@ class TimeConditionMessage(NerfstudioMessage): time: float """ Time conditioning value """ + + +@dataclasses.dataclass +class OutputOptionsMessage(NerfstudioMessage): + """Output options message which are used in the export panel. + TODO: remove when export panel is becomes python defined. + """ + + options: Any + """ List of output option strings""" diff --git a/pyproject.toml b/pyproject.toml index f7bb86ebf..abe400912 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta" [project] name = "nerfstudio" -version = "0.2.1" +version = "0.2.2" description = "All-in-one repository for state-of-the-art NeRFs" readme = "README.md" license = { text="Apache 2.0"} -requires-python = ">=3.7.3" +requires-python = ">=3.8.0" classifiers = [ "Development Status :: 3 - Alpha", "Programming Language :: Python", @@ -46,7 +46,7 @@ dependencies = [ "requests", "rich>=12.5.1", "scikit-image>=0.19.3", - "tensorboard==2.9.0", + "tensorboard>=2.13.0", "torch>=1.12.1,<2.0.0", "torchmetrics[image]>=0.9.3", "torchtyping>=0.1.4", @@ -74,7 +74,7 @@ gen = [ # Development packages dev = [ - "black[jupyter]==22.3.0", + "black[jupyter]==23.3.0", "pylint==2.13.4", "pytest==7.1.2", "pytest-xdist==2.5.0", @@ -99,18 +99,17 @@ docs = [ ] [project.scripts] -# Note, add entrypoint name to scripts/completions/install.py to include CLI completion -ns-install-cli = "scripts.completions.install:entrypoint" -ns-process-data = "scripts.process_data:entrypoint" -ns-download-data = "scripts.downloads.download_data:entrypoint" -ns-train = "scripts.train:entrypoint" -ns-trace-sd = "scripts.generative.trace_stable_diffusion:entrypoint" -ns-viewer = "scripts.viewer.run_viewer:entrypoint" -ns-eval = "scripts.eval:entrypoint" -ns-render = "scripts.render:entrypoint" -ns-export = "scripts.exporter:entrypoint" -ns-dev-test = "scripts.github.run_actions:entrypoint" -ns-dev-sync-viser-message-defs = "scripts.viewer.sync_viser_message_defs:entrypoint" +# Note, add entrypoint name to nerfstudio/scripts/completions/install.py to include CLI completion +ns-install-cli = "nerfstudio.scripts.completions.install:entrypoint" +ns-process-data = "nerfstudio.scripts.process_data:entrypoint" +ns-download-data = "nerfstudio.scripts.downloads.download_data:entrypoint" +ns-train = "nerfstudio.scripts.train:entrypoint" +ns-viewer = "nerfstudio.scripts.viewer.run_viewer:entrypoint" +ns-eval = "nerfstudio.scripts.eval:entrypoint" +ns-render = "nerfstudio.scripts.render:entrypoint" +ns-export = "nerfstudio.scripts.exporter:entrypoint" +ns-dev-test = "nerfstudio.scripts.github.run_actions:entrypoint" +ns-dev-sync-viser-message-defs = "nerfstudio.scripts.viewer.sync_viser_message_defs:entrypoint" [options] # equivalent to using --extra-index-url with pip, which is needed for specifying the CUDA version torch and torchvision @@ -119,7 +118,7 @@ dependency_links = [ ] [tool.setuptools.packages.find] -include = ["nerfstudio*","scripts*"] +include = ["nerfstudio*"] [tool.setuptools.package-data] "*" = ["*.cu", "*.json", "py.typed", "setup.bash", "setup.zsh"] @@ -133,7 +132,6 @@ line-length = 120 max-line-length = 120 generated-members = ["numpy.*", "torch.*", "cv2.*", "cv.*"] good-names-rgxs = "^[_a-zA-Z][_a-z0-9]?$" -ignore-paths = ["scripts/colmap2nerf.py"] jobs = 0 ignored-classes = ["TensorDataclass"] @@ -169,5 +167,5 @@ reportMissingTypeStubs = false reportPrivateImportUsage = false reportUndefinedVariable = false -pythonVersion = "3.7" +pythonVersion = "3.8" pythonPlatform = "Linux" diff --git a/scripts/__init__.py b/scripts/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/scripts/blender/__init__.py b/scripts/blender/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/scripts/completions/__init__.py b/scripts/completions/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/scripts/docs/__init__.py b/scripts/docs/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/scripts/downloads/__init__.py b/scripts/downloads/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/scripts/generative/__init__.py b/scripts/generative/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/scripts/github/__init__.py b/scripts/github/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/scripts/viewer/__init__.py b/scripts/viewer/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/data/test_datamanager.py b/tests/data/test_datamanager.py new file mode 100644 index 000000000..e80330183 --- /dev/null +++ b/tests/data/test_datamanager.py @@ -0,0 +1,107 @@ +# pylint: disable=all +from copy import copy +from typing import Any + +import pytest +import torch +import yaml + +from nerfstudio.cameras.cameras import Cameras +from nerfstudio.configs.base_config import InstantiateConfig +from nerfstudio.data.datamanagers.base_datamanager import ( + DataManager, + DataparserOutputs, + VanillaDataManager, + VanillaDataManagerConfig, +) +from nerfstudio.data.datasets.base_dataset import InputDataset +from nerfstudio.data.datasets.depth_dataset import DepthDataset + + +class DummyDataParser: + def __init__(self, *args, **kwargs): + pass + + def __getattr__(self, __name: str) -> Any: + if __name.startswith("_"): + return object.__getattribute__(self, __name) + return None + + def get_dataparser_outputs(self, *args, **kwargs): + return DataparserOutputs( + [], + Cameras( + torch.ones((0, 3, 4)), + torch.ones((0, 1)), + torch.ones((0, 1)), + torch.ones((0, 1)), + torch.ones((0, 1)), + 10, + 10, + ), + metadata={"depth_filenames": [], "depth_unit_scale_factor": 1.0}, + ) + + +@pytest.fixture +def config(): + config = VanillaDataManagerConfig() + setattr(config, "dataparser", InstantiateConfig(_target=DummyDataParser)) + setattr(config.dataparser, "data", None) + return config + + +def test_data_manager_type_inference(config): + # Mock for a faster test + + assert VanillaDataManager(config).dataset_type is InputDataset + assert VanillaDataManager[DepthDataset](config).dataset_type is DepthDataset + + class tmp(VanillaDataManager): + pass + + assert tmp(config).dataset_type is InputDataset + + class tmp2(VanillaDataManager[DepthDataset]): + pass + + assert tmp2(config).dataset_type is DepthDataset + + +def test_data_manager_type_can_be_serialized(config): + # Mock for a faster test + + assert VanillaDataManager(config).dataset_type is InputDataset + obj = yaml.load(yaml.dump(VanillaDataManager(config)), Loader=yaml.UnsafeLoader) + assert obj.dataset_type is InputDataset + assert isinstance(obj, VanillaDataManager) + + assert VanillaDataManager[DepthDataset](config).dataset_type is DepthDataset + obj = yaml.load(yaml.dump(VanillaDataManager[DepthDataset](config)), Loader=yaml.UnsafeLoader) + assert obj.dataset_type is DepthDataset + assert isinstance(obj, VanillaDataManager) + + class tmp(VanillaDataManager): + pass + + try: + globals()["tmp"] = tmp + assert tmp(config).dataset_type is InputDataset + obj = yaml.load(yaml.dump(tmp(config)), Loader=yaml.UnsafeLoader) + assert obj.dataset_type is InputDataset + assert isinstance(obj, tmp) + finally: + globals().pop("tmp") + + class tmp2(VanillaDataManager[DepthDataset]): + pass + + try: + globals()["tmp2"] = tmp2 + + assert tmp2(config).dataset_type is DepthDataset + obj = yaml.load(yaml.dump(tmp2(config)), Loader=yaml.UnsafeLoader) + assert obj.dataset_type is DepthDataset + assert isinstance(obj, tmp2) + finally: + globals().pop("tmp2") diff --git a/tests/model_components/test_losses.py b/tests/model_components/test_losses.py new file mode 100644 index 000000000..8dbbbc443 --- /dev/null +++ b/tests/model_components/test_losses.py @@ -0,0 +1,28 @@ +""" +Test losses +""" + +import torch + +from nerfstudio.model_components.losses import tv_loss + + +def test_tv_loss(): + """Test total variation loss""" + + grids = torch.ones([3, 64, 128, 128]) + assert tv_loss(grids).item() == 0 + + grids = torch.zeros([1, 10, 100, 100]) + for i in range(100): + for j in range(100): + grid_location = (i + j) % 2 + for k in range(10): + grids[0, k, i, j] = grid_location + + # TV_row = 1, TV_col = 1. Totol tv should be 2 * (TV_row + TV_col) + assert tv_loss(grids).item() == 4.0 + + +if __name__ == "__main__": + test_tv_loss() diff --git a/tests/plugins/test_registry.py b/tests/plugins/test_registry.py index fe8361a18..1fb993633 100644 --- a/tests/plugins/test_registry.py +++ b/tests/plugins/test_registry.py @@ -1,6 +1,7 @@ """ Tests for the nerfstudio.plugins.registry module. """ +import os import sys from nerfstudio.engine.trainer import TrainerConfig @@ -49,3 +50,23 @@ def test_discover_methods(): finally: # Revert mock registry.entry_points = entry_points_backup + + +def test_discover_methods_from_environment_variable(): + """Tests if a custom method from env variable gets properly registered using the discover_methods method""" + old_env = None + try: + old_env = os.environ.get("NERFSTUDIO_METHOD_CONFIGS", None) + os.environ["NERFSTUDIO_METHOD_CONFIGS"] = "test-method-env=test_registry:TestConfig" + + # Discover plugins + methods, _ = registry.discover_methods() + assert "test-method-env" in methods + config = methods["test-method-env"] + assert isinstance(config, TrainerConfig) + finally: + # Revert mock + if old_env is not None: + os.environ["NERFSTUDIO_METHOD_CONFIGS"] = old_env + else: + del os.environ["NERFSTUDIO_METHOD_CONFIGS"] diff --git a/tests/process_data/test_process_images.py b/tests/process_data/test_process_images.py index 7f27e5cf5..4911d7edd 100644 --- a/tests/process_data/test_process_images.py +++ b/tests/process_data/test_process_images.py @@ -16,7 +16,7 @@ from nerfstudio.data.utils.colmap_parsing_utils import ( write_cameras_binary, write_images_binary, ) -from nerfstudio.process_data.images_to_nerstudio_dataset import ( +from nerfstudio.process_data.images_to_nerfstudio_dataset import ( ImagesToNerfstudioDataset, ) diff --git a/tests/test_train.py b/tests/test_train.py index 530ac996c..20d3aa5ee 100644 --- a/tests/test_train.py +++ b/tests/test_train.py @@ -13,7 +13,7 @@ from nerfstudio.configs.method_configs import method_configs from nerfstudio.data.dataparsers.blender_dataparser import BlenderDataParserConfig from nerfstudio.data.dataparsers.minimal_dataparser import MinimalDataParserConfig from nerfstudio.engine.trainer import TrainerConfig -from scripts.train import train_loop +from nerfstudio.scripts.train import train_loop BLACKLIST = [ "base",