@@ -181,44 +181,70 @@ def set_img_exif_dict(image_id="img_id_1"):
181
181
global user_input_data
182
182
if "date_taken" in user_input_data :
183
183
date_taken = user_input_data ['date_taken' ]
184
- copyright = "© AIRI Lab. All Rights Reserved."
184
+ # copyright = "© AIRI Lab. All Rights Reserved." #decision to remove
185
185
camera_maker = "AIRI Lab"
186
186
camera_model = "AIRI Model 1.0"
187
- user_id = "AIRI tester"
188
- if "user_id" in user_input_data :
189
- user_id = user_input_data ['user_id' ]
190
187
generation_id = "gen_id_1"
191
188
if "generation_id" in user_input_data :
192
189
generation_id = user_input_data ['generation_id' ]
193
- keywords = f"Generated in AIRI platform. airilab.com. Generation ID: { generation_id } , Image ID: { image_id } "
194
- title = f"{ user_id } _airilab.com_{ image_id } " #####
195
- description = f"An image processed by the AIRI platform. airilab.com. Generation ID: { generation_id } , Image ID: { image_id } "
190
+
191
+ user_id = "AIRI tester"
192
+ if "user_id" in user_input_data :
193
+ user_id = user_input_data ['user_id' ]
194
+ oem_id = "gid_1"
195
+ if "oem_id" in user_input_data :
196
+ oem_id = user_input_data ['oem_id' ]
197
+ team_id = "tid_1"
198
+ if "team_id" in user_input_data :
199
+ team_id = user_input_data ['team_id' ]
200
+ project_id = "pid_1"
201
+ if "project_id" in user_input_data :
202
+ project_id = user_input_data ['project_id' ]
203
+
204
+ user_name = "un_1"
205
+ if "user_name" in user_input_data :
206
+ user_name = user_input_data ['user_name' ]
207
+ oem_name = "on_1"
208
+ if "oem_name" in user_input_data :
209
+ oem_name = user_input_data ['oem_name' ]
210
+ team_name = "tn_1"
211
+ if "team_name" in user_input_data :
212
+ team_name = user_input_data ['team_name' ]
213
+ project_name = "pn_1"
214
+ if "project_name" in user_input_data :
215
+ project_name = user_input_data ['project_name' ]
216
+
217
+ title_field = f"{ oem_id } /{ team_id } /{ project_id } /{ user_id } _airilab.com_{ image_id } "
218
+ artist_field = f"{ oem_name } /{ team_name } /{ project_name } /{ user_name } "
219
+
220
+ keywords = f"Generated in AIRI platform. airilab.com. Generation ID: { generation_id } , Image ID: { image_id } " # not showing
221
+ description = f"An image processed by the AIRI platform. airilab.com. Generation ID: { generation_id } , Image ID: { image_id } " # not showing
196
222
software = "AIRI Platform v1.0"
197
223
# imagenum = "imagenum?"
198
224
# seed = "seed?"
199
225
exif_dict = {
200
226
"0th" : {
201
- piexif .ImageIFD .ImageDescription : title .encode ('utf-8' ),
227
+ piexif .ImageIFD .ImageDescription : title_field .encode ('utf-8' ), #标题
202
228
piexif .ImageIFD .Make : camera_maker .encode ('utf-8' ),
203
229
piexif .ImageIFD .Model : camera_model .encode ('utf-8' ),
204
230
# piexif.ImageIFD.Copyright: copyright.encode('utf-8'), #decision to remove
205
- piexif .ImageIFD .Artist : user_id .encode ('utf-8' ),
231
+ piexif .ImageIFD .Artist : artist_field .encode ('utf-8' ), #作者
206
232
piexif .ImageIFD .ProcessingSoftware : software .encode ('utf-8' ),
207
233
piexif .ImageIFD .Software : software .encode ('utf-8' ),
208
234
piexif .ImageIFD .DateTime : date_taken .encode ('utf-8' ),
209
235
piexif .ImageIFD .HostComputer : software .encode ('utf-8' ),
210
236
# piexif.ImageIFD.ImageID: imageid.encode('utf-8'), #bad
211
237
# piexif.ImageIFD.ImageNumber: imagenum.encode('utf-8'), #bad
212
- piexif .ImageIFD .ImageHistory : keywords .encode ('utf-8' ),
238
+ piexif .ImageIFD .ImageHistory : keywords .encode ('utf-8' ), # not showing
213
239
# piexif.ImageIFD.ImageResources: description.encode('utf-8'),#bad
214
240
# piexif.ImageIFD.Noise: seed.encode('utf-8'),#bad
215
241
piexif .ImageIFD .Predictor : camera_model .encode ('utf-8' ),
216
- piexif .ImageIFD .OriginalRawFileData : keywords .encode ('utf-8' ),
242
+ piexif .ImageIFD .OriginalRawFileData : keywords .encode ('utf-8' ), # not showing
217
243
# piexif.ImageIFD.OriginalRawFileName: imageid.encode('utf-8'),#bad
218
244
piexif .ImageIFD .ProfileCopyright : copyright .encode ('utf-8' ),
219
245
piexif .ImageIFD .ProfileEmbedPolicy : software .encode ('utf-8' ),
220
246
piexif .ImageIFD .Rating : "5" .encode ('utf-8' ),
221
- piexif .ImageIFD .ProfileName : user_id .encode ('utf-8' ),
247
+ piexif .ImageIFD .ProfileName : artist_field .encode ('utf-8' ), # not showing
222
248
# piexif.ImageIFD.XPAuthor: user_id.encode('utf-8'),#bad
223
249
# piexif.ImageIFD.XPTitle: title.encode('utf-8'),#bad
224
250
# piexif.ImageIFD.XPKeywords: keywords.encode('utf-8'),#bad
@@ -227,15 +253,15 @@ def set_img_exif_dict(image_id="img_id_1"):
227
253
},
228
254
"Exif" : {
229
255
piexif .ExifIFD .DateTimeOriginal : date_taken .encode ('utf-8' ),
230
- piexif .ExifIFD .CameraOwnerName : user_id .encode ('utf-8' ),
256
+ piexif .ExifIFD .CameraOwnerName : artist_field .encode ('utf-8' ), # not showing
231
257
piexif .ExifIFD .DateTimeDigitized : date_taken .encode ('utf-8' ),
232
258
piexif .ExifIFD .DeviceSettingDescription : camera_model .encode ('utf-8' ),
233
- piexif .ExifIFD .FileSource : keywords .encode ('utf-8' ),
259
+ piexif .ExifIFD .FileSource : keywords .encode ('utf-8' ), # not showing
234
260
# piexif.ExifIFD.ImageUniqueID: imageid.encode('utf-8'),#bad
235
261
piexif .ExifIFD .LensMake : camera_maker .encode ('utf-8' ),
236
262
piexif .ExifIFD .LensModel : camera_model .encode ('utf-8' ),
237
- piexif .ExifIFD .MakerNote : description .encode ('utf-8' ),
238
- piexif .ExifIFD .UserComment : description .encode ('utf-8' ),
263
+ piexif .ExifIFD .MakerNote : description .encode ('utf-8' ), # not showing
264
+ piexif .ExifIFD .UserComment : description .encode ('utf-8' ), # not showing
239
265
}
240
266
}
241
267
0 commit comments