Version 1.0.0
This protocol has been created as support for the article:
Yuki Kubota and Taiki Fukiage. (2025): Human-like monocular depth biases in deep neural networks, PLOS Computational Biology.
**1. Overall**
This file contains scripts created for three main purposes: DNN estimation outputs, participant experiment implementation, and data analysis. When using this code in academic papers, please cite our paper.
**2. Environments / Requirements**
Please check requirements for our code in sub-directories (models, experiments, analysis)
**3. Directory Structures**
Parts of our codes should be modified to appropriate path in reference to your directory structures. The codes in this directory only show how to analyze our data.
- models
- models-response-output.ipynb: Main estimation code. We recommend resetting the kernel and executing the predictions.
- Models > [A] We recommend that you should download publicly available codes and pre-trained models as subdirectories.
- val_data > nyu_test > image > [B] You should download NYU Depth v2 color images here.
- experiments
- css
- csv
- data
- dist > [C] You should download and relocate jspsych libraries here.
- image > nyu_test > image > [B] You should download NYU Depth v2 color images here.
- index.html
- instructions
- js
- analysis
- analysis
- main
- abs_additional_analysis.ipynb: Additional analysis code (semantics, GT & human correlation)
- abs_analysis.ipynb: Main analysis code
- absRaw_analysis.ipynb: Main analysis code (before half-split)
- abs_human_formatting.ipynb: Formatting human data
- abs_model_formatting.ipynb: Formatting model data
- graph_visualization.ipynb: Graph visualization
- rank_analysis.ipynb: Rank analysis code
- rankRaw_analysis.ipynb: Rank analysis code (before half-split)
- sub
- 2afc_analysis.ipynb: 2AFC analysis code
- rel_analysis.ipynb: Relative data analysis code
- rel_human_formatting.ipynb: Formatting supplemental human data
- rel_model_formatting.ipynb: Formatting supplemental model data
- csv
- Humans-raw_abs_src.csv: Aggregated participants raw data
- Models_abs_src.csv: Aggregated DNNs raw data
- model_characteristics.csv: DNN characteristics (strategy, dataset etc.)
- segmentation_label.csv: Class label and number correspondence table
- val_image > [B] You should download NYU Depth v2 color images here.
**4. How To Use the Codes**
(a) model output (models)
1. Install the python libraries according to Requirements.txt.
2. Clone the repositories and download pre-trained DNNs to directory [A] (repository list is available at Supporting Information, S1 Table).
3. Download color images of NYU Depth V2 to directory [B]
4. Launch jupyter lab and execute the code for each model.
(b) experiments (experiments)
1. Download color images of NYU Depth V2 to directory [B]
2. Launch a PHP website directly under the “experiments” repository.
3. Access http://localhost:8080/?c=1. You can start experiments under different conditions by specifying the “c” parameter from 1 to 46 – the URL at the beginning shows the case where c = 1.
(c) data analysis (analysis)
1. Download color images of NYU Depth V2 to directory [B]
2. Launch jupyter lab and make sure the path in the file is valid.
3. Execute in the following order.
(1) Formatting human and model data (abs_human_formatting.ipynb , abs_model_formatting.ipynb). Note that you don't need to create raw data.
(2) Main analysis code (abs_analysis.ipynb), Rank analysis code (rank_analysis.ipynb), Raw data analysis (absRaw_analysis.ipynb, rankRaw_analysis.ipynb), Additional analysis code (abs_additional_analysis.ipynb),
(3) Graph visualization (graph_visualization.ipynb)
4. For the supplemental data, please execute in the following order.
(0) Formatting human and model data (rel_human_formatting.ipynb , rel_model_formatting.ipynb). Since aggregated raw data is stored, there is no need to execute this code.
(1) Main analysis code (rel_analysis.ipynb), 2AFC analysis code (2afc_analysis.ipynb)
(2) Graph visualization (graph_visualization.ipynb)
**Author**
All the code has been implemented by Yuki Kubota and Taiki Fukiage.
**Copyright**
© 2025 Yuki Kubota and Taiki Fukiage.
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
https://creativecommons.org/licenses/by-nc/4.0/