Comments (25)
set
MODEL_NAME = 'anything'
LOAD_MODEL = False
from pygta5.
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.
from pygta5.
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.
Where did you save the files? It works fine for me, but I did need to change the paths in the scripts.
from pygta5.
I made a new folder and saved it to my desktop
C:\Users\User1\Desktop\drivers
from pygta5.
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.
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.
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.
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.
The folder has training data 1 and 2 , that's it
just for the start
from pygta5.
Try FILE_I_END = 2
from pygta5.
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.
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.
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.
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.
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.
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.
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.
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.
@mantooneoops I did change it.
Thanks mate
from pygta5.
from pygta5.
@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.
@frossaren There it is now: #64
from pygta5.
from pygta5.
Related Issues (20)
- what is FILE_I_END in trainmodel.py HOT 1
- About multiclass classification
- gta5 models HOT 1
- ModuleNotFoundError: No module named 'tensorflow.contrib' HOT 7
- Expected shape of ndim=4, got ndim=3, test_model.py HOT 3
- is it possible to upload a pretrained model? HOT 1
- saves trained data as events.out.tfevents.1591947296.PREDATOR
- ValueError: Cannot feed value of shape (64, 4) for Tensor 'targets/Y:0', which has shape '(?, 3)' HOT 2
- "Failed to interpret file %s as a pickle" % repr(file)) HOT 3
- ModuleNotFoundError: No module named 'tflearn'
- Can someone share the trained data? Thank you HOT 2
- There is no such a thing as BalanceData.py ? HOT 2
- tensorflow/core/framework/op_kernel.cc:1763] OP_REQUIRES failed at conv_grad_filter_ops.cc:1095 : Not found: No algorithm worked!
- Can someone upload the trained model for Googlenet? HOT 4
- Keystrokes not resigtering in another game. HOT 2
- Input/output error & Duplicate node name in graph'Accuracy'
- Any HOT 1
- Create data set not working
- Audio issues while switching cameras - help needed
- ModuleNotFoundError: No module named 'alexnet' on part 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygta5.