jthomas / ai-speed-camera

Detect and record speeds for cars in video.
54 stars 5 forks source link

New user asking for support to help get this up and running as a project #2

Open 2owls-elts opened 2 years ago

2owls-elts commented 2 years ago

HI folks, I stumbled across your project on Twitter, and love the idea - I'm new to programming but learn fast, and would like to use your skills to monitor the speed of traffic next to our rural home in Aberdeenshire. As I'm new to programming ( well new after a 30 year hiatus.. lots has changed) Im stuck with what are probably typical noob questions. I'm hoping that I can leverage some of your time to help me get off the ground :

My first stumbling block is to do with google cloud, I'm set up with data in a bucket, but cannot fathom how to get your code into a json file. Ive found a variety of learning resources on line to show how to create one, but not any that I can see how to add your data. Can you advise or point me a t a resource please? Thanks in advance for your time, I'll always try and find my own solutions before I ask you folks here.

Cheers,

Elt

jthomas commented 2 years ago

@2owls-elts :wave:

Do you mean you're stuck on creating the request.json file with the data bucket contents?

{
  "inputUri": "gs://<BUCKET_NAME>/<VIDEO_FILE>.mp4",
  "features": ["OBJECT_TRACKING"]
}

JSON files are just text files with the ".json" extension. You can use a normal plain text editor to create a new file, copy the contents listed above (changing the URL) and then just save it as a ".json" file. Does that help?

2owls-elts commented 2 years ago

HI @jthomas ,

Yes that's right - I told you that I was a noob :)

OK thanks for pointing that out to me - makes perfect sense and I'll create this - I assume that it should reside in the same folder as the scripts (e.g. c:/users/speedcam) for it to work?

jthomas commented 2 years ago

Yes that's correct.

marianore-beepboop commented 2 years ago

I had some issues authenticating with gcloud and therefore couldn't run the CURL commands and ended up utilizing the method explorer in Google's web. Worked well. I guess most of the complication is setting up GCP, but still great project!

2owls-elts commented 2 years ago

I had some issues authenticating with gcloud and therefore couldn't run the CURL commands and ended up utilizing the method explorer in Google's web. Worked well. I guess most of the complication is setting up GCP, but still great project!

I'm struggling with Cloud too - any chance that you could share your methodology please?

marianore-beepboop commented 2 years ago

I had some issues authenticating with gcloud and therefore couldn't run the CURL commands and ended up utilizing the method explorer in Google's web. Worked well. I guess most of the complication is setting up GCP, but still great project!

I'm struggling with Cloud too - any chance that you could share your methodology please?

You basically follow the repo instructions but instead of running the API commands with CURL you run them with the Google API Explorer in this website and this other website (on the right tab, you have to login first and have some permissions). You use the response of the first API POST for the second API GET request parameters and then copy this response to the results.json file to then at last run the python -m ai_speed_camera ... command.