UCI-SAP-Capstone-2024 / Proof-of-Performance-Validation

0 stars 0 forks source link

How can we find the right promotion? #5

Closed Nike1421 closed 4 months ago

Nike1421 commented 4 months ago

We have to use the image data as well as existing metadata to determine the promotion.

puneater commented 4 months ago

Goal:

  1. Explore all the metadata present in an image and filter out the useful ones
robschu commented 4 months ago

Output: Go through example promotions and products. Write a list of potentially useful properties to filter promotions by.

puneater commented 4 months ago

I just wrote a python script using Pillow library to get to know what all metadata is present in the image. Here is a result of what all I get from an image I have on my local system:

{'ImageWidth': 3264,
 'ImageLength': 2448,
 'GPSInfo': {1: 'N',
  2: (26.0, 40.0, 27.96564),
  3: 'E',
  4: (75.0, 21.0, 50.36544)},
 'ResolutionUnit': 2,
 'ExifOffset': 238,
 'Make': 'samsung',
 'Model': 'SM-M307F',
 'Software': 'M307FXXU4CVD1',
 'Orientation': 1,
 'DateTime': '2022:10:21 15:30:21',
 'YCbCrPositioning': 1,
 'XResolution': 72.0,
 'YResolution': 72.0,
 'ExifVersion': b'0220',
 'ShutterSpeedValue': 0.0008298755186721991,
 'ApertureValue': 2.27,
 'DateTimeOriginal': '2022:10:21 15:30:21',
 'DateTimeDigitized': '2022:10:21 15:30:21',
 'BrightnessValue': 21.02,
 'ExposureBiasValue': 0.0,
 'MaxApertureValue': 2.27,
 'MeteringMode': 2,
 'Flash': 0,
 'FocalLength': 1.42,
 'ColorSpace': 1,
 'ExifImageWidth': 3264,
 'DigitalZoomRatio': 1.0,
 'FocalLengthIn35mmFilm': 13,
 'SceneCaptureType': 0,
 'OffsetTime': '+05:30',
 'OffsetTimeOriginal': '+05:30',
 'ExifImageHeight': 2448,
 'ExposureTime': 0.0008298755186721991,
 'FNumber': 2.2,
 'ImageUniqueID': 'L08LLMF00PM',
 'ExposureProgram': 2,
 'ISOSpeedRatings': 40,
 'ExposureMode': 0,
 'WhiteBalance': 0}

Out of these the following can be used for our Project:

ImageWidth and ImageLength: These would be helpful when we preprocess our images and make it to a resolution that is required by the model. This is given in pixels, like screen resolution.

GPSInfo: This will helpful to locate the retailer's store to get to know the active promotions there. It has latitude reference (N), longitude reference (E), and co-ordinates in degrees, minutes and seconds.

Make and Model: The device that is used to capture the image, might be helpful to log devices. Can verify if a certain type of issue is occuring in image coming from one type of device.

DateTime: This is a very important feature as it will be used to know the exact moment the photo is clicked. Using this we can know what active promotions are going on in that period. This feature will also be useful when we are doing fraud detection. DateTimeOriginal tag can also be used. This will give the local time of the place where the photo was clicked.

OffsetTime and OffsetTimeOriginal: To double check the location and to know the local timezone of the retailer to match with the correct location.