In this post I will be writing about following:
- Connecting the Google Cloud Vision API to C#,
- benefits of using this API,
- why I choose the Vision API,
- code written to make my software working,
- bugs that I need to solve in future versions
Connecting API to C#
To use Google Cloud API's we need to configure and download account credential '*.JSON' file. To work with the Google Vision API we need also to reconfigure our windows settings by adding path of JSON file to our environmental variables, which you can see below
As we finish adding our environmental variable we can go further to the next step, which is preparing our programming language to work with API, in this case C#. Firstly, I have downloaded NuGet Google Cloud package to work it
Secondly, after we configured everything successful we can import Google package to call it after in code. To do that in C# we need following 'using' statement
With this last step I am fully configured to start working with Google Cloud Vision API in my code.
Benefits of using Google Cloud
Using this software developed by Google we can gain useful experience, but this is not the only advantage. Further, we gaining access to cloud dashboard and this feature is beneficial as we can follow all API calls, bugs and overall we can track the traffic in the application.
Why I choose Google Cloud Vision API
I choose this service, because it allows me to work quickly with Artificial Intelligence and that was the key point for me when I was deciding to make this project. From logging into the Dashboard and configuring API to make a working basic software it took me around 3 working hours. With my knowledge so far making software like this can potentially took 1-3 months and probably would not be fully working. Furthermore, if I will be willing to add more features in future I know that would be simple with this API. These are the main reasons why I choose Vision API over making my own standalone AI.
Code written in C#
This code have minor defects, which I am aware of. However, as this is the first version and this program will be running in isolated environment I do not need to implement catching exceptions and other important things that should normally be here. As I mentioned before it was important for me to finish my first version as soon as possible and also to have a decent comments in code.
Bugs to solve
During testing my application I found following bugs:
As we finish adding our environmental variable we can go further to the next step, which is preparing our programming language to work with API, in this case C#. Firstly, I have downloaded NuGet Google Cloud package to work it
Secondly, after we configured everything successful we can import Google package to call it after in code. To do that in C# we need following 'using' statement
With this last step I am fully configured to start working with Google Cloud Vision API in my code.
Benefits of using Google Cloud
Using this software developed by Google we can gain useful experience, but this is not the only advantage. Further, we gaining access to cloud dashboard and this feature is beneficial as we can follow all API calls, bugs and overall we can track the traffic in the application.
Why I choose Google Cloud Vision API
I choose this service, because it allows me to work quickly with Artificial Intelligence and that was the key point for me when I was deciding to make this project. From logging into the Dashboard and configuring API to make a working basic software it took me around 3 working hours. With my knowledge so far making software like this can potentially took 1-3 months and probably would not be fully working. Furthermore, if I will be willing to add more features in future I know that would be simple with this API. These are the main reasons why I choose Vision API over making my own standalone AI.
Code written in C#
This code have minor defects, which I am aware of. However, as this is the first version and this program will be running in isolated environment I do not need to implement catching exceptions and other important things that should normally be here. As I mentioned before it was important for me to finish my first version as soon as possible and also to have a decent comments in code.
Bugs to solve
During testing my application I found following bugs:
- Google responses are limited to 10 whilst there should be more,
- application getting stuck while it gets responses from Google Cloud
Furthermore, I found that Google API is not always as that accurate as I wish it to be and for that reason I was forced to implement adding labels whether label contain following elements:
- fruit,
- food,
- plant,
- tree
instead of just fruit.
To conclude, I am happy with easiness of configuring Google Vision API to work with C# and with features that this service provides for developers. Moreover, I explained the benefits of using API like this and I covered why to choose API over making own AI software from beginning. Also I shared my code and presented bugs in my code.
A very detailed and in-depth blog post that shows your progress with images as well as description. You have also added a nice bit of reflection at the end which identifies areas of success and progression as well as some issues that need resolving. Great work.
ReplyDelete