Skip to content

Releases: doguilmak/InferenceVision

v1.2

31 Aug 14:25
203f27f
Compare
Choose a tag to compare

Migration from Version 1.1 to 1.2

Version: 1.2

Summary of Changes:

1. Added Precision Configuration:

  • Introduced the coord_precision parameter in the __init__ method, allowing configuration of the number of decimal places for geographic coordinates. The default is 9 decimal places.

2. Error Handling:

  • Added error handling for opening the TIFF file with a try-except block to raise a ValueError if the file cannot be opened.
  • Added error handling for model inference with a try-except block to raise a RuntimeError if the model prediction fails or any other exception occurs during processing.

3. Enhanced Geographic Coordinates Formatting:

  • Geographic coordinates are now formatted according to the coord_precision parameter, providing more control over output precision.

4. Improved Output Information:

  • Updated the CSV column name from "Probability" to "Confidence Score".
  • Updated print statements to use a consistent format for confidence scores and bounding box centers, including improved formatting for bounding box center coordinates.

5. Code Cleanup and Documentation:

  • Improved code comments and docstrings for clarity and consistency.
  • Added example usage for the new coord_precision parameter in documentation.

Detailed Changes:

  • Constructor (__init__ method):

    • Added coord_precision parameter:
      def __init__(self, tif_path, model_path, coord_precision=9):
    • Added error handling for TIFF file opening:
      try:
          with rasterio.open(self.tif_path) as dataset:
              self.image_width = dataset.width
              self.image_height = dataset.height
      except rasterio.errors.RasterioIOError as e:
          raise ValueError(f"Error opening TIFF file {self.tif_path}: {e}")
  • Process Image Method:

    • Added error handling for model loading and inference:

      try:
          model = YOLO(self.model_path)
          results = model.predict(self.tif_path)
      except Exception as e:
          raise RuntimeError(f"Error during model inference: {e}")
    • Updated geographic coordinates formatting to use coord_precision:

      formatted_geographic_coords = np.array([
          [f'{lat:.{self.coord_precision}f}', f'{lon:.{self.coord_precision}f}']
          for lat, lon in geographic_coords
      ])
    • Updated CSV column name and print statements:

      "Confidence Score": box.conf[0].item()
    • Added error handling for image processing:

      except Exception as e:
          raise RuntimeError(f"Error processing the image: {e}")

v1.1

16 Aug 16:33
7ad2446
Compare
Choose a tag to compare

Migration from Version 1.0 to 1.1

Version: 1.1

Summary of Changes:

1. Image Dimensions Handling

  • New Feature: Automatic extraction of image dimensions (image_width, image_height) from the TIFF file during initialization.
    • Benefit: This removes the need to manually specify the image dimensions when creating an InferenceVision instance.

2. Improved Documentation

  • Enhancement: Added detailed docstrings to all class methods, improving clarity and usability.
    • Benefit: Users can now better understand each method’s purpose, input parameters, and expected outputs, making the class easier to use and integrate.

Migration Guide from v1.0 to v1.1

To upgrade from InferenceVision v1.0 to v1.1, follow these simple steps:

1. Initialization Changes

  • v1.0: When creating an InferenceVision instance, you had to provide the image dimensions (image_width and image_height) manually.
  • v1.1: Image dimensions are automatically extracted from the TIFF file, so you no longer need to pass image_width and image_height.

Example Migration:

# v1.0 Initialization
inference = InferenceVision(tif_path="path/to/image.tif", model_path="path/to/model.pt", image_width=1024, image_height=768)

# v1.1 Initialization (no need for image dimensions)
inference = InferenceVision(tif_path="path/to/image.tif", model_path="path/to/model.pt")

v1.0

02 Jun 09:57
7cb70aa
Compare
Choose a tag to compare

We are excited to announce the release of InferenceVision version 1.0! This release represents a significant advancement in geospatial analysis, offering powerful capabilities for object detection and geographic coordinate calculation.

In version 1.0, it is enabling automated identification and localization of objects within satellite or aerial imagery for YOLO models trained via Ultralytics. Additionally, our robust algorithms accurately calculate geographic coordinates (latitude and longitude) for detected objects relative to a given bounding polygon, facilitating precise geospatial analysis.

With InferenceVision version 1.0, users can streamline their geospatial workflows, reduce manual effort, and achieve higher accuracy and efficiency in identifying and locating objects within geographic areas.

Key features of this release include:

  • Object detection using YOLO algorithm
  • Calculation of geographic coordinates for detected objects
  • Integration with geographic information systems (GIS) for visualization and analysis

We believe that InferenceVision version 1.0 will empower users to tackle complex geospatial challenges effectively. We encourage you to explore the capabilities of this release and provide feedback to help us improve and enhance future versions.