GithubHelp home page GithubHelp logo

Comments (25)

J-XianSheng avatar J-XianSheng commented on July 24, 2024 1

set
MODEL_NAME = 'anything'

LOAD_MODEL = False

from pygta5.

mantoone avatar mantoone commented on July 24, 2024 1

Great!

There's a bug with the motion script. You need to add screen as a parameter to the function:
So change:
def motion_detection(t_minus, t_now, t_plus):
To:
def motion_detection(t_minus, t_now, t_plus, screen):

And in the test_model script add screen to the function call:
https://github.com/Sentdex/pygta5/blob/master/3.%20test_model.py#L148

from pygta5.

mantoone avatar mantoone commented on July 24, 2024 1

from pygta5.

Caleb-J773 avatar Caleb-J773 commented on July 24, 2024

Okay that fixed it kinda but now there's a new error. It can't actually find any npy files when they are there.

[Errno 2] No such file or directory: 'J:/phase10-random-padded/training_data-1778.npy' [Errno 2] No such file or directory: 'J:/phase10-random-padded/training_data-1276.npy' I tried changing up the directory it was listing to my pc but it still can't find any training files.

from pygta5.

mantoone avatar mantoone commented on July 24, 2024

Where did you save the files? It works fine for me, but I did need to change the paths in the scripts.

from pygta5.

Caleb-J773 avatar Caleb-J773 commented on July 24, 2024

I made a new folder and saved it to my desktop
C:\Users\User1\Desktop\drivers

from pygta5.

mantoone avatar mantoone commented on July 24, 2024

If you want to save the recorded data there change the line https://github.com/Sentdex/pygta5/blob/master/1.%20collect_data.py#L101
file_name = 'X:/pygta5/phase7-larger-color/training_data-{}.npy'.format(starting_value)
to
file_name = 'C:/Users/User1/Desktop/drivers/training_data-{}.npy'.format(starting_value)

from pygta5.

Caleb-J773 avatar Caleb-J773 commented on July 24, 2024

Okay but it's also doing the same errors to the other files, like training data and testing data. but im sure testing data is just acting like that cause well training data file isn't working, i'll try your step

from pygta5.

Caleb-J773 avatar Caleb-J773 commented on July 24, 2024

Alright this isn't working Training data is just refusing to work, There must be something wrong with the current code.
[Errno 2] No such file or directory: 'C:/Users/User1/Desktop/drivers/training_data-1127.npy'
[Errno 2] No such file or directory: 'C:/Users/User1/Desktop/drivers/training_data-172.npy'
[Errno 2] No such file or directory: 'C:/Users/User1/Desktop/drivers/training_data-1575.npy'
[Errno 2] No such file or directory: 'C:/Users/User1/Desktop/drivers/training_data-249.npy'
[Errno 2] No such file or directory: 'C:/Users/User1/Desktop/drivers/training_data-874.npy'
[Errno 2] No such file or directory: 'C:/Users/User1/Desktop/drivers/training_data-119.npy'
training_data-2.npy 500

(It skips -1 )

It's not even training anymore.

from pygta5.

mantoone avatar mantoone commented on July 24, 2024

Did you check that the folder contains those files? I needed to adjust the FILE_I_END variable. Take a look at https://github.com/Sentdex/pygta5/blob/master/Versions/v0.03/2.%20train_model.py#L11

If you have data until training_data-100.npy, change it to FILE_I_END = 100

from pygta5.

Caleb-J773 avatar Caleb-J773 commented on July 24, 2024

The folder has training data 1 and 2 , that's it
just for the start

from pygta5.

mantoone avatar mantoone commented on July 24, 2024

Try FILE_I_END = 2

from pygta5.

Caleb-J773 avatar Caleb-J773 commented on July 24, 2024

Traceback (most recent call last): File "C:\Users\User1\Desktop\drivers\test_model.py", line 245, in <module> main() File "C:\Users\User1\Desktop\drivers\test_model.py", line 148, in main delta_count_last = motion_detection(t_minus, t_now, t_plus) File "C:\Users\User1\Desktop\drivers\motion.py", line 46, in motion_detection dst = cv2.addWeighted(screen,1.0, delta_view,0.6,0) NameError: name 'screen' is not defined
Test_model is erroring out now. I have everything installed and just verified, Python has all the requirements satisfied

Also doing what you told me above allowed me to train finally, but running into this problem ^^

from pygta5.

Caleb-J773 avatar Caleb-J773 commented on July 24, 2024

Okay now it's giving this error
Traceback (most recent call last):
File "test_model.py", line 245, in
main()
File "test_model.py", line 190, in main
motion_log.append(delta_count)
NameError: name 'delta_count' is not defined

from pygta5.

mantoone avatar mantoone commented on July 24, 2024

I suppose delta_count should be delta_count_last on the line:
https://github.com/Sentdex/pygta5/blob/master/3.%20test_model.py#L190

from pygta5.

Caleb-J773 avatar Caleb-J773 commented on July 24, 2024

Okay well that somehow worked but it's still not training. I waited 1 hour for it to train and it "trained" yet the file never updated. and just started to repeat.

from pygta5.

mantoone avatar mantoone commented on July 24, 2024

What was the output from the "2. train_model.py" script? Did you add the same MODEL_NAME to the test_model script?

from pygta5.

Caleb-J773 avatar Caleb-J773 commented on July 24, 2024

I added the same model name, There's no error other then MODEL SAVED. then it just repeats the same training data over and over

from pygta5.

mantoone avatar mantoone commented on July 24, 2024

The model is saved every 10th epoch. It should finish automatically when it's done. By default after 30 epochs (30 passes over the data).

from pygta5.

DanMossa avatar DanMossa commented on July 24, 2024

Hey @mantoone . I'm also having the same error. I changed

MODEL_NAME = 'anything'

LOAD_MODEL = False

And I only have up to
training_data-200.npy

So I set FILE_I_END = 200

And now I get

training/training_data-37.npy
training_data-37.npy 500
---------------------------------
Run id: anything
Log directory: log/
---------------------------------
Training samples: 450
Validation samples: 50
--
Cannot feed value of shape (64, 17) for Tensor 'targets/Y:0', which has shape '(?, 9)'
training/training_data-69.npy
training_data-69.npy 500
---------------------------------
Run id: anything
Log directory: log/
---------------------------------
Training samples: 450
Validation samples: 50
--
Cannot feed value of shape (64, 17) for Tensor 'targets/Y:0', which has shape '(?, 9)'
training/training_data-190.npy
training_data-190.npy 500
---------------------------------
Run id: anything
Log directory: log/
---------------------------------
Training samples: 450
Validation samples: 50
--
Cannot feed value of shape (64, 17) for Tensor 'targets/Y:0', which has shape '(?, 9)'
training/training_data-112.npy
training_data-112.npy 500
---------------------------------
Run id: anything
Log directory: log/
---------------------------------
Training samples: 450
Validation samples: 50
--
Cannot feed value of shape (64, 17) for Tensor 'targets/Y:0', which has shape '(?, 9)'
training/training_data-157.npy
training_data-157.npy 500
---------------------------------
Run id: anything
Log directory: log/
---------------------------------
Training samples: 450
Validation samples: 50
--
Cannot feed value of shape (64, 17) for Tensor 'targets/Y:0', which has shape '(?, 9)'
training/training_data-58.npy
training_data-58.npy 500
---------------------------------
Run id: anything
Log directory: log/
---------------------------------
Training samples: 450
Validation samples: 50
--
Cannot feed value of shape (64, 17) for Tensor 'targets/Y:0', which has shape '(?, 9)'
training/training_data-104.npy
training_data-104.npy 500

Over and over until I stop it

from pygta5.

DanMossa avatar DanMossa commented on July 24, 2024

@mantooneoops I did change it.

Thanks mate

from pygta5.

mantoone avatar mantoone commented on July 24, 2024

from pygta5.

frossaren avatar frossaren commented on July 24, 2024

@mantoone It would be nice if you did a pull request on your fix for screen not defined in motion. I think many people have the same problem

from pygta5.

mantoone avatar mantoone commented on July 24, 2024

@frossaren There it is now: #64

from pygta5.

frossaren avatar frossaren commented on July 24, 2024

from pygta5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.