Skip to content

groundlight/getting_started

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting started with Groundlight

Welcome! This is a small "Hello World" example for Groundlight. Please clone this repo, and this readme will walk you through how to get your first Groundlight application up and running!

Your First Groundlight Application

This example application uses Groundlight to answer the question: "Is the door open?". The application takes a picture from a camera connected to your computer every 10 seconds, and sends it to Groundlight for processing.

  1. Create a free Groundlight account at https://app.groundlight.ai/.
  2. Create an API token by clicking on your account name in the top right corner, and then clicking on "API Tokens". Alternatively, you can click here to go to the page directly.
  3. Paste your API token into the GROUNDLIGHT_API_TOKEN variable in the .env file (make sure you do not check this file into version control, as it contains your secret API token).
  4. Ensure your computer has a camera, either a built in webcam or a USB camera. The application will automatically detect your camera. If you are on a Mac, the application might detect your iPhone as your primary webcam. See the notes in setup.py for how to change this to your built in webcam, if desired.
  5. Install python dependencies by running pip install -r requirements.txt.
  6. Aim your camera at a door.
  7. Run python main.py to start the application.
  8. Test out the application by opening and closing the door. You should see the application print out whether the door is open or closed every 10 seconds.
  9. Explore your results in more depth in the Groundlight web app!

Learning More - Additional Resources

  1. Read over the code in main.py and try modifying the query to solve a different problem. It's as simple as changing the query_text and detector_name variables.
  2. Read our guide to Getting Started with Groundlight here.
  3. Read our SDK documentation here.
  4. Ask us questions! We would love to help you get started. See here for how to contact us.

[Optional] Deploy on Raspberry Pi

If you have a Raspberry Pi with a camera, you can deploy this application on your Raspberry Pi. This is a great way to get started with Groundlight, as you can deploy your application in a low cost, low power environment.

  1. Flash your Raspberry Pi with the latest version of our Raspberry Pi Image. You can find instructions here.
  2. Clone this repo on your Raspberry Pi (git clone [email protected]:groundlight/getting_started.git)
  3. Follow the instructions above, in the Your First Groundlight Application section.

Contact us

If you have any questions, please reach out to us by filing a GitHub issue, emailing us at [email protected] or by messaging us via the chat widget in the bottom right hand corner of the Groundlight web app.

About

Getting started with Groundlight

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages