FIRST-Tech-Challenge / fmltc

FIRST Machine Learning Toolchain
Other
38 stars 14 forks source link

Convert images from TF evaluation to compressed jpegs #299

Closed lizlooney closed 1 year ago

lizlooney commented 1 year ago

In cf_dataset_producer.py: Added a comment explaining why we convert the frame_data_image using PIL.Image. Removed special code for jpg format since we use png for the dataset.

In cf_model_trainer.py: Added code to convert the image we get back from TensorFlow evaluation to JPEG with lower quality. The JPEG images are about 25% of the size of the ones from TensorFlow.

github-actions[bot] commented 1 year ago

Terraform plan Succeeded for Workspace: default

Show Output ```diff An execution plan has been generated and is shown below. Resource actions are indicated with the following symbols: ! update in-place -/+ destroy and then create replacement Terraform will perform the following actions: # module.dev.google_app_engine_standard_app_version.fmltc-app-v1 will be updated in-place ! resource "google_app_engine_standard_app_version" "fmltc-app-v1" { id = "apps/ftc-ml-firstinspires-dev/services/default/versions/v1" name = "apps/ftc-ml-firstinspires-dev/services/default/versions/v1" # (9 unchanged attributes hidden) ! automatic_scaling { ! min_pending_latency = "0.100s" -> "0.1s" # (4 unchanged attributes hidden) # (1 unchanged block hidden) } ! deployment { ! zip { ! source_url = "https://storage.googleapis.com/ftc-ml-firstinspires-dev-gae-source/60003ce62c0419212b3e3baf867bac83.zip" -> "https://storage.googleapis.com/ftc-ml-firstinspires-dev-gae-source/2e8c31cc4438b409da5261fdc43c3486.zip" # (1 unchanged attribute hidden) } } - handlers { - auth_fail_action = "AUTH_FAIL_ACTION_REDIRECT" -> null - login = "LOGIN_OPTIONAL" -> null - security_level = "SECURE_OPTIONAL" -> null - url_regex = ".*" -> null - script { - script_path = "auto" -> null } } # (8 unchanged blocks hidden) } # module.dev.google_cloudfunctions_function.perform-action will be updated in-place ! resource "google_cloudfunctions_function" "perform-action" { id = "projects/ftc-ml-firstinspires-dev/locations/us-central1/functions/perform_action" ! max_instances = 3000 -> 0 name = "perform_action" ! source_archive_object = "22dad6b5a9692daf06bdfc6ce9bf83de.zip" -> "d92cb7d6f8574e6e3dffc4a6dc5e24b5.zip" # (12 unchanged attributes hidden) # (2 unchanged blocks hidden) } # module.dev.google_storage_bucket_object.app-server-archive must be replaced -/+ resource "google_storage_bucket_object" "app-server-archive" { ! content_type = "application/zip" -> (known after apply) ! crc32c = "Ff8Uew==" -> (known after apply) ! detect_md5hash = "YAA85iwEGSErPjuvhnusgw==" -> "different hash" # forces replacement - event_based_hold = false -> null ! id = "ftc-ml-firstinspires-dev-gae-source-60003ce62c0419212b3e3baf867bac83.zip" -> (known after apply) + kms_key_name = (known after apply) ! md5hash = "YAA85iwEGSErPjuvhnusgw==" -> (known after apply) ! media_link = "https://storage.googleapis.com/download/storage/v1/b/ftc-ml-firstinspires-dev-gae-source/o/60003ce62c0419212b3e3baf867bac83.zip?generation=1675819095981241&alt=media" -> (known after apply) - metadata = {} -> null ! name = "60003ce62c0419212b3e3baf867bac83.zip" -> "2e8c31cc4438b409da5261fdc43c3486.zip" # forces replacement ! output_name = "60003ce62c0419212b3e3baf867bac83.zip" -> (known after apply) ! self_link = "https://www.googleapis.com/storage/v1/b/ftc-ml-firstinspires-dev-gae-source/o/60003ce62c0419212b3e3baf867bac83.zip" -> (known after apply) ! storage_class = "STANDARD" -> (known after apply) - temporary_hold = false -> null # (2 unchanged attributes hidden) } # module.dev.google_storage_bucket_object.cloud-function-archive must be replaced -/+ resource "google_storage_bucket_object" "cloud-function-archive" { ! content_type = "application/zip" -> (known after apply) ! crc32c = "spuefQ==" -> (known after apply) ! detect_md5hash = "ItrWtalpLa8Gvfxs6b+D3g==" -> "different hash" # forces replacement - event_based_hold = false -> null ! id = "ftc-ml-firstinspires-dev-gcf-source-22dad6b5a9692daf06bdfc6ce9bf83de.zip" -> (known after apply) + kms_key_name = (known after apply) ! md5hash = "ItrWtalpLa8Gvfxs6b+D3g==" -> (known after apply) ! media_link = "https://storage.googleapis.com/download/storage/v1/b/ftc-ml-firstinspires-dev-gcf-source/o/22dad6b5a9692daf06bdfc6ce9bf83de.zip?generation=1675819095968771&alt=media" -> (known after apply) - metadata = {} -> null ! name = "22dad6b5a9692daf06bdfc6ce9bf83de.zip" -> "d92cb7d6f8574e6e3dffc4a6dc5e24b5.zip" # forces replacement ! output_name = "22dad6b5a9692daf06bdfc6ce9bf83de.zip" -> (known after apply) ! self_link = "https://www.googleapis.com/storage/v1/b/ftc-ml-firstinspires-dev-gcf-source/o/22dad6b5a9692daf06bdfc6ce9bf83de.zip" -> (known after apply) ! storage_class = "STANDARD" -> (known after apply) - temporary_hold = false -> null # (2 unchanged attributes hidden) } # module.dev.module.serverless-connector.google_vpc_access_connector.connector_beta["central-serverless"] must be replaced -/+ resource "google_vpc_access_connector" "connector_beta" { ! id = "projects/ftc-ml-firstinspires-dev/locations/us-central1/connectors/central-serverless" -> (known after apply) ! max_instances = 7 -> (known after apply) ! min_instances = 2 -> (known after apply) name = "central-serverless" - network = "ml-redis-vpc-dev" -> null # forces replacement ! self_link = "projects/ftc-ml-firstinspires-dev/locations/us-central1/connectors/central-serverless" -> (known after apply) ! state = "READY" -> (known after apply) # (5 unchanged attributes hidden) ! subnet { name = "serverless-subnet" ! project_id = "ftc-ml-firstinspires-dev" -> (known after apply) } } Plan: 3 to add, 2 to change, 3 to destroy. ```