Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No matter how many times i try the code exits after running command "model = load_model(location)" in drive.py #3

Open
hemanth2410 opened this issue Feb 21, 2019 · 11 comments

Comments

@hemanth2410
Copy link

screenshot 150

@hemanth2410
Copy link
Author

I am guessing the model file is corrupted, after cloning repo the model file is only about 3698 kb

@hadipash
Copy link
Owner

hadipash commented Feb 22, 2019

Hi! Thanks for your inquiry.

The model file is fine, just the procedure of making the program work is a bit complicated. Until now didn't have much time to write a good guideline.

The most important you need to know before you start is that the program works only with Korean version of GTA V due to fonts. Unfortunately, in English version fonts are not monospaced and it made difficult to read important information from the screen.

Then, you also need to consider next:

  1. The code was tested in PyCharm and might not work with python idle (you can download PyCharm for free using student subscription https://www.jetbrains.com/student/)
  2. The code was tested using python 3.6. You might want to switch to that version.
  3. The code 100% does not work with anaconda (in fact, tensorflow officially has no support in anaconda).

Let me know if you still have problems.

@hemanth2410
Copy link
Author

hemanth2410 commented Feb 22, 2019 via email

@hemanth2410
Copy link
Author

so far i can see only lanes, but i dont see any boxes surrounding people, traffic lights etc

@hadipash
Copy link
Owner

Now, to run the model need to adjust some parameters. Because tuning depends on several conditions including your hardware (GTA V outlook differs from version to version and hardware), it is better to do it through pm. Could you message me through linkedin?

@Duskfall
Copy link

Duskfall commented Mar 4, 2019

Hello, thanks for the great repo!
Using Python 3.6,
Pycharm 2018.3.5
Windows 10
tensorflow_gpu-1.13.1
Installed darkflow globally with pip install . after cloning the project
How can I use the auto drive mode? I get to Arrived at destination when pressing T. Also I only see the boxes instead of the lanes

@hemanth2410
Copy link
Author

try setting marker on map and then press T on keyboard.

and please make sure that you are in first person move (Hood camera).

and paint both primary and secondary colors to matte black.

enable speed info (KMPH only) from sample trainer.

this worked for me

and thanks hadipash for guiding me.

@Duskfall
Copy link

Duskfall commented Mar 4, 2019

@hemanth2410 can you plz clarify those 2? :P

and paint both primary and secondary colors to matte black.

enable speed info (KMPH only) from sample trainer.

@hemanth2410
Copy link
Author

step 1-> install openIV and select GTA 5 location in it.
step 2 -> Enable Edit mode
step 3 -> Go to x64a.rpf
step 4 -> Go to textures folder
step 5 -> (Right click) on graphics.ytd and select edit
step 6 -> Search for radarmasksm
step 6 -> replace it with https://1drv.ms/u/s!Au9TCMuJ7_EbhvVjoQVV5xXwzgIjnQ
step 7 -> remove any trainers that you have previously installed.
step 8 -> install this trainer to gta 5 https://www.gta5-mods.com/scripts/simple-trainer-for-gtav
step 9 -> press F4 to open trainer menu
step 10 -> Use your number pad keys to navigate in menu.
step 11 -> go to vehicle spawning -> sports -> select Lampadati Furore GT.
step 12 -> go into vehicle options in trainer menu -> vehicle color oprions.
step 13 -> select matte black for both primary and secondary color options.
step 14 -> go to general options and select display speed info KMPH
step 15 -> make sure that you are running game in 800 x 600 windowed mode.
step 16 -> identify speed. https://1drv.ms/u/s!Au9TCMuJ7_EbhvVktW3jjxmI82rxFQ
step 17 -> vis = image[568:576, 681:700, :]
step 18 ->
screenshot 2

you should get output something like this.

step 19 -> make sure that you set values like 576-568 = 8 px and 700-681 = 19 px.
the values of width and height should be 8 and 19.
step 20 -> if you got this far then you are probably ready to perform self driving
step 21 -> in repo folder go to object_detection -> object_Detect.py, under # set yolo options change gpu value to 0.4
step 22 -> save the py file.
step 23 -> now set waypoint on map.
step 24 -> run drive.py code.

optional steps if Gpu is <= 4GB

step 25 -> if you have ssd try running code on ssd.
step 26 -> tune gpu value in object_detect.py

@hemanth2410
Copy link
Author

@hadipash any plans in upgrading this code, sir?

@hadipash
Copy link
Owner

hadipash commented Feb 7, 2023

@hemanth2410 As much as I would love to improve this project, I simply don't have time for this. So, no plans on any upgrades.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants