noahzn / Lite-Mono

[CVPR2023] Lite-Mono: A Lightweight CNN and Transformer Architecture for Self-Supervised Monocular Depth Estimation
MIT License
527 stars 58 forks source link

Test outputs is black #139

Closed VictorWylde closed 3 months ago

VictorWylde commented 4 months ago

Hello, I imitated KITTIOdomDataset to read my own video frames, but the output images of test_simple.py are all black or yellow. What is the problem? I train the following pretrained models and get the results:

noahzn commented 4 months ago

Hi, can you show some images? Are they shown correctly during training in the tensorboard?

VictorWylde commented 4 months ago

Sorry for the late reply. I would like to upload the training results, but there have been issues with GitHub's push. This is the opt.json for the inference results and training weights.

covered_complete_covered_elevator_0 covered_complete_covered_elevator_0_disp

VictorWylde commented 4 months ago
{
  "data_path": "/workspace/IPC_Indoor_20231030_1530_P",
  "log_dir": "/mnt/smb-149/02_Tasks/01_Depth_Estimation/Lite-Mono-main/tmp",
  "model_name": "mytrain-010-lite-mono-8m_640_192-resnet50-separate_resnet",
  "split": "odom",
  "split_num": 3,
  "model": "lite-mono-8m",
  "weight_decay": 0.01,
  "drop_path": 0.2,
  "num_layers": 50,
  "dataset": "lift_odom",
  "png": false,
  "height": 192,
  "width": 640,
  "disparity_smoothness": 0.001,
  "scales": [
    0,
    1,
    2
  ],
  "min_depth": 0.1,
  "max_depth": 100.0,
  "use_stereo": false,
  "frame_ids": [
    0,
    -1,
    1
  ],
  "profile": true,
  "batch_size": 12,
  "lr": [
    0.001,
    5e-06,
    31.0,
    0.001,
    5e-06,
    31.0
  ],
  "num_epochs": 30,
  "scheduler_step_size": 30,
  "v1_multiscale": false,
  "avg_reprojection": false,
  "disable_automasking": false,
  "predictive_mask": false,
  "no_ssim": false,
  "mypretrain": null,
  "weights_init": "pretrained",
  "pose_model_input": "pairs",
  "pose_model_type": "separate_resnet",
  "no_cuda": false,
  "num_workers": 12,
  "load_weights_folder": "pretrain_weights/lite-mono-8m_640_192/",
  "models_to_load": [
    "encoder",
    "depth"
  ],
  "log_frequency": 10,
  "save_frequency": 3,
  "disable_median_scaling": false,
  "pred_depth_scale_factor": 1,
  "ext_disp_to_eval": null,
  "eval_split": "eigen",
  "save_pred_disps": false,
  "no_eval": false,
  "eval_out_dir": null,
  "post_process": false
}
noahzn commented 4 months ago

Since the depth range of your image is small, so you need to change max_depth in the configuration. The most important thing is to change the camera intrinsics in the dataset class.

VictorWylde commented 4 months ago

Thank you for your help!! And I have other questions:

(1) What is the unit of this parameter max_depth, centimeters or meters?

(2) How can I obtain KITTIDataset(). K from the camera?

noahzn commented 4 months ago

1) meter 2) If you collect your dataset using your own camera, then you need to calibrate your camera. There are a lot of documentations on camera calibration.

VictorWylde commented 4 months ago

Okay, thank you very much! I'll train it again.

noahzn commented 3 months ago

I am now closing this issue as there is no further update.