nianticlabs / monodepth2

[ICCV 2019] Monocular depth estimation from a single image
Other
4.05k stars 950 forks source link

How to setup already trained computer vision model Ultralytics YOLOv8 with monodepth2 #495

Open coderMichaelLapshyn2345 opened 1 month ago

coderMichaelLapshyn2345 commented 1 month ago

Hi, dear developers.

I am here to describe you probably not quite popular problem. I'm struggling to load already trained YOLOv8 model defined as the configuration file 'best.pt' to use monocular depth estimation in order to figure out the level of damage on the building.

The idea is that YOLOv8 is trained to detect and recognise damaged parts of the building and the goal of monocular depth is to estimate the approximate depth map in order to create the 3D-reconstruction of the building to do more accurate calculations and estimations of the damage.

But, when I load the model, I every time get different errors associated with the unexpected attributes or something like that. I tried to search some papers and docs related to my problem but I didn't find anything which could help me. When I make some short research of monodepth2 library functions I realised that it is highly recommended to use the models provided by your community which are posted on GitHub in section README.md with all links and files however I want to use only functions related to the depth map creation and estimation and I want to use my model because I exactly know that my model passes all the required conditions and restrictions and I don't want to train on my dataset models suggested by your community. Also I tried to use both: Python package monodepth2 and cloned repository of monodepth2 however both of them doesn't give me something useful for solution. So I want to figure out how can I setup trained YOLOv8 to use together with monodepth2 tool

If needed I can provide the Python code and structure of the files and folders and also the trained model called 'best.pt'. I also have 'best.onxx' if it solves my problem because this file I haven't tried yet

I appreciate your answer and patience and I give my pleasant to you.

jinitaimei54 commented 6 days ago

Hi, dear developers.

I am here to describe you probably not quite popular problem. I'm struggling to load already trained YOLOv8 model defined as the configuration file 'best.pt' to use monocular depth estimation in order to figure out the level of damage on the building.

The idea is that YOLOv8 is trained to detect and recognise damaged parts of the building and the goal of monocular depth is to estimate the approximate depth map in order to create the 3D-reconstruction of the building to do more accurate calculations and estimations of the damage.

But, when I load the model, I every time get different errors associated with the unexpected attributes or something like that. I tried to search some papers and docs related to my problem but I didn't find anything which could help me. When I make some short research of monodepth2 library functions I realised that it is highly recommended to use the models provided by your community which are posted on GitHub in section README.md with all links and files however I want to use only functions related to the depth map creation and estimation and I want to use my model because I exactly know that my model passes all the required conditions and restrictions and I don't want to train on my dataset models suggested by your community. Also I tried to use both: Python package monodepth2 and cloned repository of monodepth2 however both of them doesn't give me something useful for solution. So I want to figure out how can I setup trained YOLOv8 to use together with monodepth2 tool

If needed I can provide the Python code and structure of the files and folders and also the trained model called 'best.pt'. I also have 'best.onxx' if it solves my problem because this file I haven't tried yet

I appreciate your answer and patience and I give my pleasant to you.

I was wondering if you've figured out a way to integrate and set up a well-trained YOLOv8 alongside the monodepth2 tool. If your idea and implementation can address the problem I'm facing, I would be extremely grateful if you could write a paper on it and publish it, or share some of the code on a platform.