hamuchiwa / AutoRCCar

OpenCV Python Neural Network Autonomous RC Car
BSD 2-Clause "Simplified" License
3.33k stars 1.48k forks source link

PLEASE HELP - TRAINING ISSUE #187

Open jhadkaterji opened 5 years ago

jhadkaterji commented 5 years ago

I am trying to follow this for a project and am having a serious issue.

I run the training model process and guide through the track several times. Then, when it comes time to have the car drive itself, it only wants to go right. It will just go right forever.

I saw somebody else have this problem but no solution presented. Please help!!

Devanshice020 commented 5 years ago

have you trained the car only for right?

jhadkaterji commented 5 years ago

@Devanshice020

No I have not. I have ran the training with a track the looks like this:(attached images).

IMG_5788 IMG_5787

The way I trained it is by running the data collection, and driving my car through it with the keyboard - (mostly driving it forward for a while until i hit the turn where i start to drive it right). Then i take that saved npz file and run the model and it creates it giving me an accuracy percentage.

Whenever I do this and have the car try to run on its own, it just goes right forever. No matter what the camera sees.

I even tried using data from a very recent thread: ( https://drive.google.com/file/d/1kcK2YEr8PdTN50MhcPSfWqxI0GHSEC-a/view )

And still the car was not doing the right thing. I have no idea what the issue could be. Please help!

Devanshice020 commented 5 years ago

how many frames have you collected?

jhadkaterji commented 5 years ago

@Devanshice020 I collected around 300 frames and also tried with somebody else's data (354 frames) and the car still would only go right, in a donut.

Devanshice020 commented 5 years ago

first only collect and train for forward if it works then start training for right, left.

jhadkaterji commented 5 years ago

@Devanshice020 I have done this. When I trained the car to only go forward, it would go forward. Then, as I changed the track, I noticed that as soon as there was a single frame that involved right, it would go only right

Devanshice020 commented 5 years ago

try for atleast 1000 frames for each collection for different paths than it will work properly.

Siraj95Abudaber commented 5 years ago

@jhadkaterji i have the same problem !!!! how much is your training accuracy ? @Devanshice020 could you explain how ? and what is the problem exactly ??

PuriHa commented 5 years ago

I encountered the same problem as you. And I take the time to fix the problem for almost a month And finally it can’t be. I am frustrated.

jhadkaterji commented 5 years ago

@Devanshice020 @PuriHa @Sirajabudabe It is so frustrating! I just want to know what I am doing wrong! I have come so far. Somebody, anybody please help us!

Siraj95Abudaber commented 5 years ago

@hamuchiwa any ideas what is the problem ??

Siraj95Abudaber commented 5 years ago

@PuriHa how did you solve it ??

PuriHa commented 5 years ago

I don’t know. My problem is The rc car doesn’t follow the track. unstable, Which I don’t understand why. Please help me @hamuchiwa It’s my a Bachelor's degree project. And I only have 2 weeks left.

Devanshice020 commented 5 years ago

@PuriHa What is your training and validation accuracy?

hamuchiwa commented 5 years ago

@Sirajabudabe @PuriHa If the opencv model doesn't work for you, try to create a CNN in Tensorflow/Keras. I have included an example in #173 in case you haven't tried yet.

jhadkaterji commented 5 years ago

@hamuchiwa I have went to your post and can not see that that CNN in tensor flow. Are you sure you linked the correct post?

hamuchiwa commented 5 years ago

@jhadkaterji https://github.com/hamuchiwa/AutoRCCar/issues/173#issuecomment-478619182

MyFirstRoboticProject commented 5 years ago

Make the track as narrow as possible and make your corners more extreme (at an angle more than 75 degrees)

Devanshice020 commented 5 years ago

Have you trained the car successfully @MyFirstRoboticProject

jhadkaterji commented 5 years ago

No I have not. I have even trained over 1000 frames. I’m not sure what I could be doing wrong. I must be training incorrectly. It just goes forward and doesn't turn now.

On Apr 5, 2019, at 12:25 AM, Devanshice020 notifications@github.com wrote:

Have you trained the car successfully @MyFirstRoboticProject https://github.com/MyFirstRoboticProject — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hamuchiwa/AutoRCCar/issues/187#issuecomment-480143895, or mute the thread https://github.com/notifications/unsubscribe-auth/Atly7dYlGZGqoYZ8RfqjjO69hTlN04NAks5vdtAggaJpZM4cWbjq.

MyFirstRoboticProject commented 5 years ago

I trained my car to 93% validation accuracy. But due to 3 sec lag in video it doesn't turn right or left when it needs to. When I disable the controller and move it manually towards the corner and stop there it then changes from forward to right, so my training is correct. The issue is the camera delay. If that is fixed my project is complete.

MyFirstRoboticProject commented 5 years ago

And yeah you don't need 1000 samples or otherwise the system will get overtrained. About 200 samples was enough for me, but those samples must be carefully taken and balanced (about equal number of forward, right and left direction frames).

Devanshice020 commented 5 years ago

have you changed anything in this code? @MyFirstRoboticProject

MyFirstRoboticProject commented 5 years ago

Nothing really

Devanshice020 commented 5 years ago

have you followed any edge detection algorithm? @MyFirstRoboticProject

Devanshice020 commented 5 years ago

Ohk, thank you @MyFirstRoboticProject

Devanshice020 commented 5 years ago

How did you captured the image? can you please provide any picture of your track for left turn, right turn. i think the problem is with the camera angle but i am pretty sure that i had tilted the camera to make easy for the camera to view just the tracks but still i ask you how did you kept the camera and pls provide some sample data of yours i mean the images that are captured. @MyFirstRoboticProject

thanks in advance.

MyFirstRoboticProject commented 5 years ago

Don't tilt the camera to just view the tracks! I think you should read zheng wang's blog again. The upper half of the image frame is not considered in training only the lower half, so you can keep your camera almost vertical

Siraj95Abudaber commented 5 years ago

@MyFirstRoboticProject could you please upload your training_data file , I tried everything and the accuracy wont go above 70% !!

Siraj95Abudaber commented 5 years ago

@jhadkaterji Did you find solution to this problem ??

Siraj95Abudaber commented 4 years ago

@MyFirstRoboticProject can you please contact me on my e-mail : serajabudaber@gmail.com

sham1406 commented 3 months ago

I am trying to follow this for a project and am having a serious issue.

I run the training model process and guide through the track several times. Then, when it comes time to have the car drive itself, it only wants to go right. It will just go right forever.

I saw somebody else have this problem but no solution presented. Please help!!

I am trying to follow this for a project and am having a serious issue.

I run the training model process and guide through the track several times. Then, when it comes time to have the car drive itself, it only wants to go right. It will just go right forever.

I saw somebody else have this problem but no solution presented. Please help!!

This must be very easy. Just follow simple rules provided at Gardenation. it will help you

sham1406 commented 3 months ago

hello there if you want information regarding the issue. Do checkout Gardenation

AishaMushtaq0 commented 3 months ago

If you're seeking information about the issue, feel free to ask.

AishaMushtaq0 commented 3 months ago

Avoid tilting the camera solely to capture the tracks! I recommend revisiting Zheng Wang's blog. In training, only the lower half of the image frame is considered, so it's best to keep your camera almost vertical.

AishaMushtaq0 commented 3 months ago

have you trained the car only for right?

Amazing

AishaMushtaq0 commented 2 months ago

Got it, keep the camera almost vertical to capture the lower half of the image frame, as only that part is considered in training. I'll review Zheng Wang's blog for further guidance.

akbaraliseo commented 2 months ago

Every thing working well you need to only turn your camera

AishaMushtaq0 commented 1 month ago

Keep the camera straight; focus on the lower half for training. Check Zheng Wang's blog for details.

AishaMushtaq0 commented 1 month ago

Você está certo em verificar com antecedência! Caspio normalmente lida muito bem com a importação de bancos de dados do Access, mas há algumas considerações com caracteres especiais como '-' e '()' em nomes de campos. A Caspio pode ajustá-los durante a importação, por isso é aconselhável antecipar algumas mudanças. Quanto aos campos com o tipo de dados 'Objeto OLE', o Caspio geralmente os converte em tipos de dados adequados para sua plataforma, geralmente em Binary Large Objects (BLOBs) ou similares. É importante notar que durante a importação, pode ser necessário mapear ou ajustar algumas configurações de campo para garantir a compatibilidade, mas no geral, a funcionalidade de importação do Caspio foi projetada para agilizar o processo. Em caso de dúvida, uma importação experimental com um subconjunto dos seus dados pode fornecer informações valiosas antes de se comprometer com uma importação completa. Whatsapp GB Atuailzado

akbaraliseo commented 1 month ago

good

akbaraliseo commented 1 month ago

The Duplicate FESCO Bill service allows Faisalabad Electric Supply Company (FESCO) customers to easily obtain a copy of their electricity bill online. By entering their reference number on the FESCO website, users can quickly access and download a duplicate bill if the original is lost or misplaced. This convenient feature ensures that customers can manage their billing information without delay, providing a seamless solution for keeping track of their electricity expenses and ensuring timely payments.