Sad Tux - Windows bias detected
This page contains Windows bias

About This Page

This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.

Bias Analysis

Detected Bias Types
windows_first
windows_tools
Summary
The documentation is generally Linux-focused, with instructions and examples primarily for Linux containers and development environments. However, there are subtle signs of Windows bias: the sample images are sourced from a repository named 'Cognitive-CustomVision-Windows', and the quickstart links list 'Linux device' before 'Windows device', but both are mentioned. There are no explicit PowerShell or Windows command-line examples, but references to Windows (e.g., the repo name) and the inclusion of Windows setup options in prerequisites indicate some residual Windows-centric patterns.
Recommendations
  • Provide sample images from a cross-platform or Linux-named repository, or clarify that the 'Cognitive-CustomVision-Windows' repo is suitable for all platforms.
  • Ensure that any references to Windows tools, paths, or repositories are balanced with Linux equivalents or are clearly marked as cross-platform.
  • If mentioning both Linux and Windows device setup, consider listing Linux first (as is done here), and ensure parity in instructions and troubleshooting for both platforms.
  • Explicitly state that all steps and code are cross-platform unless otherwise noted, and provide links to both Linux and Windows quickstarts equally.
  • Audit for any hidden assumptions (e.g., file paths, line endings, case sensitivity) that may be Windows-specific and clarify or generalize as needed.
GitHub Create Pull Request

Scan History

Date Scan Status Result
2026-01-14 00:00 #250 in_progress Clean Clean
2026-01-13 00:00 #246 completed Clean Clean
2026-01-11 00:00 #240 completed Clean Clean
2026-01-10 00:00 #237 completed Clean Clean
2026-01-09 00:34 #234 completed Clean Clean
2026-01-08 00:53 #231 completed Clean Clean
2026-01-06 18:15 #225 cancelled Clean Clean
2025-09-16 00:00 #113 completed Clean Clean
2025-09-15 00:00 #112 completed Clean Clean
2025-09-14 00:00 #111 completed Clean Clean
2025-09-13 00:00 #110 completed Clean Clean
2025-09-12 00:00 #109 completed Clean Clean
2025-09-11 00:00 #108 completed Clean Clean
2025-09-10 00:00 #107 completed Clean Clean
2025-09-09 00:00 #106 completed Clean Clean
2025-09-08 00:00 #105 completed Clean Clean
2025-09-07 00:00 #104 completed Clean Clean
2025-09-06 00:00 #103 completed Clean Clean
2025-09-05 00:00 #102 completed Clean Clean
2025-09-04 00:00 #101 completed Clean Clean
2025-09-03 00:00 #100 completed Clean Clean
2025-08-29 00:01 #95 completed Clean Clean
2025-08-27 00:01 #93 cancelled Clean Clean
2025-08-22 00:01 #88 completed Clean Clean
2025-08-17 00:01 #83 cancelled Clean Clean
2025-07-13 21:37 #48 completed Biased Biased
2025-07-12 23:44 #41 cancelled Biased Biased
2025-07-09 13:09 #3 cancelled Clean Clean
2025-07-08 04:23 #2 cancelled Biased Biased

Flagged Code Snippets

   Replace **\<registryName\>** with the name of your Azure container registry, and replace **\<AcrUsername\>** and **\<AcrPassword\>** with the username and password for your registry. You can find these values in the **Access keys** section of your Azure container registry in the Azure portal.

1. Find the **modules** section, which contains three modules: the two you created, *classifier* and *cameracapture*, and a third included by default, *tempSensor*. 

1. Delete the **tempSensor** module with all of its parameters. This module provides sample data for test scenarios, but it's not needed in this deployment. 

1. If you named the image classification module something other than **classifier**, check the name now and ensure that it's all lowercase. The cameracapture module calls the classifier module using a requests library that formats all requests in lowercase, and IoT Edge is case-sensitive. 

1. For each system module **edgeAgent** and **edgeHub**, change the *createOptions* value to a stringified version. For example:

    
2. Return to your Custom Vision project and select **Add images**.

3. Browse to the git repo that you cloned locally, and navigate to the first image folder, **Cognitive-CustomVision-Windows / Samples / Images / Hemlock**. Select all 10 images in the folder, and then select **Open**.

4. Add the tag **hemlock** to this group of images, and then press **enter** to apply the tag.

5. Select **Upload 10 files**.

   ![Upload hemlock tagged files to Custom Vision](./media/tutorial-deploy-custom-vision/upload-hemlock.png)

6. When the images are uploaded successfully, select **Done**.

7. Select **Add images** again.

8. Browse to the second image folder, **Cognitive-CustomVision-Windows / Samples / Images / Japanese Cherry**. Select all 10 images in the folder and then **Open**.

9. Add the tag **japanese cherry** to this group of images and press **enter** to apply the tag.

10. Select **Upload 10 files**. When the images are uploaded successfully, select **Done**.

11. After tagging and uploading both sets of images, select **Train** to train the classifier.

### Export your classifier

1. After training your classifier, select **Export** on the Performance page of the classifier.

   ![Export your trained image classifier](./media/tutorial-deploy-custom-vision/export.png)

2. Select **DockerFile** for the platform. 

3. Select **Linux** for the version.  

4. Select **Export**. 

5. After the export completes, select **Download** and save the .zip package locally on your computer. Extract all files from the package. Use these files to create an IoT Edge module that contains the image classification server. 

When you reach this point, you've finished creating and training your Custom Vision project. You'll use the exported files in the next section, but you're done with the Custom Vision web page. 

## Create an IoT Edge solution

You now have the files for a container version of your image classifier on your development machine. In this section, you set up the image classifier container to run as an IoT Edge module. You also create a second module that posts requests to the classifier and sends the results as messages to IoT Hub. 

### Create a new solution

A solution is a logical way of developing and organizing multiple modules for a single IoT Edge deployment. A solution contains code for one or more modules and the deployment manifest that declares how to configure them on an IoT Edge device.  Create the solution using the *Azure IoT Edge Dev Tool* command-line (CLI) development tool. The simplest way to use the tool is to [Run the IoT Edge Dev Container with Docker](https://github.com/Azure/iotedgedev/blob/main/docs/environment-setup/run-devcontainer-docker.md).

1. Create a directory named **classifier** and change to the directory.

    
7. Save the **requirements.txt** file.

### Add a test image to the container

Instead of using a real camera to provide an image feed for this scenario, we're going to use a single test image. A test image is included in the GitHub repo that you downloaded for the training images earlier in this tutorial. 

1. Navigate to the test image, located at **Cognitive-CustomVision-Windows** / **Samples** / **Images** / **Test**. 

2. Copy **test_image.jpg** 

3. Browse to your IoT Edge solution directory and paste the test image in the **modules** / **cameracapture** folder. The image should be in the same folder as the main.py file that you edited in the previous section. 

4. In Visual Studio Code, open the **Dockerfile.amd64** file for the cameracapture module.

5. After the line that establishes the working directory, `WORKDIR /app`, add the following line of code:

   
## Deploy modules to device

Verify that built container images are stored in your container registry. Then, deploy them to a device using the deployment manifest **deployment.template.json** prepared for your scenario. 

Use the [IoT Edge Azure CLI set-modules](/cli/azure/iot/edge#az-iot-edge-set-modules) command to deploy the modules to the Azure IoT Hub. For example, to deploy the modules defined in the *deployment.template.json* file to IoT Hub \<IotHubName\> for the IoT Edge device \<DeviceName\>, use the following command. Replace the values for **hub-name**, **device-id**, and **login** IoT Hub connection string with your own.