zhengthomastang / 2018AICity_TeamUW

The winning method in Track 1 and Track 3 at the 2nd AI City Challenge Workshop in CVPR 2018 - Official Implementation
http://openaccess.thecvf.com/content_cvpr_2018_workshops/w3/html/Tang_Single-Camera_and_Inter-Camera_CVPR_2018_paper.html
550 stars 198 forks source link

Unable to mark vanishing lines #27

Open Ashish2Parimi opened 3 years ago

Ashish2Parimi commented 3 years ago

I was trying to set my own vanishing lines for my video, but when I move my move over the image the lines are plotted with even clicking. Unfortunately I cannot use the new method as I am unaware of the location of the video. Hence please let me know how to fix this. Screenshot from 2021-07-02 10-47-23

zhengthomastang commented 3 years ago

The lines will only be plotted when you click within the UI. Please try to use another monitor if your current one cannot display the full interface.

Ashish2Parimi commented 3 years ago

Thank you! I have tried different monitors but still have the same issue where the lines are plotted without clicking. When I try to move mouse in the UI the lines are automatically plotted.

I am using Opencv4. So I had to update the code by replacing elements like "CV_AA" to match the current commands. Is that causing the problem? Which version of OpenCV should be used for the code to run?

zhengthomastang commented 2 years ago

We were using OpenCV 3.6 at that time. Maybe "CV_AA" is no longer available in the latest version?

Ashish2Parimi commented 2 years ago

Yes it is not available along with few others. So I had to replace them. I will try using 3.6

Ashish2Parimi commented 2 years ago

Unfortunately I did not find Opencv3.6. The official documentation only mentions up to 3.4 and the 4 and later versions. I have tried 3.4 but it says libopencv not found. I was unable to find a way to manually install it. is there any alternate version or resource ?

zhengthomastang commented 2 years ago

@Ashish2Parimi You can try any version as long as "CV_AA" is available. It seems there is an alternative in the latest OpenCV version that might help: https://github.com/xiaohulugo/VanishingPointDetection/issues/3

Ashish2Parimi commented 2 years ago

I was able to make all the changes and run the code now. Although the final part Speed estimation runs for around 30 seconds and throws the following error. I do have 48772 images. Screenshot from 2021-08-09 16-41-12

When I had a search, they mention its related to RAM. Please let me know if its a hardware limitation or is there any way to make it run. If possible recommend specifications.

I am using Intel 9750H GTX 1660Ti 6GB 16GB Ram

Thanks Ashish

Ashish2Parimi commented 2 years ago

I have also tried running it on a different system. and got the following error. pic

Specs: Xeon E5-2630 v2 Quarto k4000 64GB ram

Ashish2Parimi commented 2 years ago

Hello,

I was able to solve the problem. It was related to the index of trk2d.txt which starts from 1 but the code considers it from zero. Despite of altering lines 303,304. The if loop in 315 fails to assign objects to vvoTrkNd vector at index zero. I had to add few lines to make it work. But not sure if its the right thing to do.