# Samples

Street View Insights can help you analyze imagery datasets using Vertex AI Colab Enterprise. The following examples showcase various capabilities.

## Environment setup

These modules are designed to be run in **Vertex AI Colab Enterprise** . Follow the instructions below to import the tutorial notebooks into your environment:

1. **Import Notebook:** In Colab Enterprise, select **Colab Enterprise \> Import notebook** and choose the "URL" option.
2. **Copy \& Paste:** Copy the **Import URI** provided within each module card below and paste it into the import dialog.
3. **Rename File (Recommended):** To avoid conflicts, consider renaming the imported notebook file, for example by appending your username to the start of the filename (e.g., `{USERNAME}_filename.ipynb`).

## Basic modules

These modules cover the fundamental workflows for getting started with Street View Insights.

### [1. Understand your dataset](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/Understand_your_dataset)

Introductory notebook to explore and visualize the imagery dataset structure and associated metadata. **Import URI:**

```
https://github.com/googlemaps-samples/insights-samples/blob/main/street_view_insights/cropped/notebooks/Understand_your_dataset/Understand_your_dataset.ipynb
```
[View on GitHub](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/Understand_your_dataset)

### [2. Utility pole analysis](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/Utility_pole_analysis)

Core analysis workflows for identifying and categorizing utility poles based on their visual features. **Import URI:**

```
https://github.com/googlemaps-samples/insights-samples/blob/main/street_view_insights/cropped/notebooks/Utility_pole_analysis/utility_pole_basic_analysis.ipynb
```
[View on GitHub](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/Utility_pole_analysis)

### [3. Classify road signs](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/classify_road_signs)

Classify road signs found in imagery, such as Stop, Yield, and Speed Limit signs. **Import URI:**

```
https://github.com/googlemaps-samples/insights-samples/blob/main/street_view_insights/cropped/notebooks/classify_road_signs/classify_road_signs_and_save_in_bq.ipynb
```
[View on GitHub](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/classify_road_signs)

## Advanced modules

These modules cover more complex analyses and techniques, including AI-powered features like few-shot learning and code execution.

### [4. Object detection with few-shot learning](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/Object_detection_with_few_shot_learning)

Detect objects in images by training a model on just a few examples---ideal for identifying rare or custom objects.

**See:** [Few-Shot Examples](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/few-shot-examples)
**Import URI:**

```
https://github.com/googlemaps-samples/insights-samples/blob/main/street_view_insights/cropped/notebooks/Object_detection_with_few_shot_learning/utility_pole_analysis_with_few_Shot_learning.ipynb
```
[View on GitHub](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/Object_detection_with_few_shot_learning)

### [5. Attachment detection](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/bbox_detection_of_attachments)

Bounding box (bbox) detection for various pole attachments, such as transformers, crossarms, and insulators.

**See:** [Bounding Box Detection](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/bounding-box-detection)
**Import URI:**

```
https://github.com/googlemaps-samples/insights-samples/blob/main/street_view_insights/cropped/notebooks/bbox_detection_of_attachments/bbox_detection_of_attachment.ipynb
```
[View on GitHub](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/bbox_detection_of_attachments)

### [6. Lean angle detection](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/Lean_angle_detection_of_pole)

Advanced analysis to calculate the lean angle of poles from imagery, which can be used to assess pole stability.

**See:** [Code Execution](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/code-execution)
**Import URI:**

```
https://github.com/googlemaps-samples/insights-samples/blob/main/street_view_insights/cropped/notebooks/Lean_angle_detection_of_pole/Utility_pole_lean_angle_detection.ipynb
```
[View on GitHub](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/Lean_angle_detection_of_pole)

### [7. Utility pole height measurement](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/Utility_pole_measure_height)

Measure the height of utility poles from imagery using object detection and geometric analysis.

**See:** [Structure Prompts](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/structure-prompts)
**Import URI:**

```
https://github.com/googlemaps-samples/insights-samples/blob/main/street_view_insights/cropped/notebooks/Utility_pole_measure_height/Utility_pole_measure_height.ipynb
```
[View on GitHub](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/Utility_pole_measure_height)

### [8. Evaluation metrics](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/eval)

Evaluate model performance and analysis results using industry-standard computer vision metrics.

**See:** [Configure Judge Model](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/configure-judge-model)
**Import URI:**

```
https://github.com/googlemaps-samples/insights-samples/blob/main/street_view_insights/cropped/notebooks/eval/utility_pole_eval_with_llm_judge.ipynb
```
[View on GitHub](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/eval)

### [9. Image quality analysis](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/Image_quality_analysis)

Assess image quality based on factors like blur and lighting to ensure suitability for computer vision tasks.

**See:** [Code Execution](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/code-execution)
**Import URI:**

```
https://github.com/googlemaps-samples/insights-samples/blob/main/street_view_insights/cropped/notebooks/Image_quality_analysis/Image_quality_inspector.ipynb
```
[View on GitHub](https://github.com/googlemaps-samples/insights-samples/tree/main/street_view_insights/cropped/notebooks/Image_quality_analysis)

## Support

These Street View Insights code samples are offered under open source licenses. They are not governed by the Google Maps Platform Support [Technical Support Services Guidelines](https://cloud.google.com/maps-platform/terms/tssg), the [SLA](https://cloud.google.com/maps-platform/terms/sla), or the [Deprecation Policy](https://cloud.google.com/maps-platform/terms) (however, any Google Maps Platform services used by the libraries remain subject to the Google Maps Platform Terms of Service).

If you find a bug, or have a feature request, file an issue on GitHub. If you would like to get answers to technical questions from other Google Maps Platform developers, ask through one of our [developer community channels](https://developers.google.com/maps/developer-community). If you'd like to contribute, check the contributing guides in the library's repository.