shayantaherian / Object_Detection_Carla

Yolov3_Object detection
MIT License
6 stars 2 forks source link

Issues and Recovery Steps Encountered While Running Object_Detection.py in CARLA #7

Closed i-kj closed 1 year ago

i-kj commented 1 year ago

Hello, First of all, thank you for sharing this project. I have been working with your Object Detection project for CARLA and have encountered several issues along the way. I've managed to resolve most of them, but I'm currently stuck on a particular issue similar to Issue #3 on your GitHub repository. Recovery Steps Taken:

  1. Virtual Environment Setup: Created a virtual environment on Ubuntu and installed Python 3.7, OpenCV 3.4.2, and NumPy.
  2. ModuleNotFoundError for 'utils': Copied the 'utils' module from another folder to resolve the issue.
  3. ModuleNotFoundError for 'tensorflow': Installed TensorFlow to resolve this issue.
  4. ModuleNotFoundError for 'pygame': Installed Pygame to fix this.
  5. TensorRT Libraries: Encountered warnings about missing TensorRT libraries but proceeded as it was not a blocking issue.
  6. AttributeError for 'help': Commented out the lines of code related to the 'help' attribute to bypass this issue.
  7. Time-Out Issue: Encountered a time-out issue while waiting for the simulator. Modified the client.set_timeout(2.0) line to 10.0.
  8. OpenCV Parsing Error: Fixed the file paths for model_weights and model_cfg in the code.

Current Issue: After resolving the above issues, I am now encountering a problem similar to Issue #3. The program runs, but the Pygame window remains glitch, and I receive no error in my terminal. Issue

I would greatly appreciate any guidance or suggestions you could provide to help me resolve this issue.

KJ

shayantaherian commented 1 year ago

Hello, interesting. cause i remember i didnt have this issue. try to increase your confidence level. However i suspect its relate to NMS value. try to chnage the values to see if there is any changes. do let me know your result. And also maybe try use yolov4 instead of v3 (specially tiny yolo) Regards, Shayan

i-kj commented 1 year ago

Since your last suggestion, I've made several changes to the code:

Integrated YOLOv4 for object detection, replacing the previous YOLOv3 implementation.
Updated the _parse_image function to handle both lidar and camera sensors efficiently.

The code is now working as expected, and I'm able to detect objects in the CARLA environment successfully. However, I've noticed that the pygame window is not refreshing as quickly as I'd like. Also the number of vehicles in the environment is negligible. I cannot find any vehicle despite spawning a thousands. I'm currently investigating this issue and would appreciate any insights you might have.

Once again, thank you for your time and expertise. Your assistance has been invaluable.

shayantaherian commented 1 year ago

Hello, Glad it is working as expected. Regarding pygame, unfortunately it requires strong computing unit like high end GPU to run it faster. Other options are migrate to tiny yolo which theoretically should increase the speed. if you want it to work faster i suggest instead of python, use C++ as it is much more faster. Plus you can load your model in C++ as well. An also try to twick any parameters in CArla simulator to render pygame more faster. Glas i could be of any help. Good lock with your projects. Regard, Shayan