#72: Verify actual data type pointer
This commit is contained in:
parent
50058d5d2e
commit
54178c1101
@ -32,7 +32,7 @@ for camera in IMAGES_CAMERAS_FOLDER:
|
||||
random.shuffle(imagesCamerasFileNames[camera])
|
||||
|
||||
# Limit number of images per camera with the one having the less images.
|
||||
minimumNumberOfImagesCameras = min([len(imagesCamerasFileNames[camera]) for camera in IMAGES_CAMERAS_FOLDER])
|
||||
minimumNumberOfImagesCameras = 4#min([len(imagesCamerasFileNames[camera]) for camera in IMAGES_CAMERAS_FOLDER])
|
||||
for camera in IMAGES_CAMERAS_FOLDER:
|
||||
imagesCamerasFileNames[camera] = imagesCamerasFileNames[camera][:minimumNumberOfImagesCameras]
|
||||
print(camera, imagesCamerasFileNames[camera])
|
||||
@ -143,11 +143,11 @@ for computeExtremes in tqdm(([True] if minColor is None or maxColor is None else
|
||||
cameraIterativeMean.add(imagePrnuEstimateNpArray)
|
||||
else:
|
||||
# Still use `cameraIterativeMean` to simplify the implementation.
|
||||
# TODO: cameraIterativeMean.mean = mean([image_training_j_camera - cameraIterativeMean.mean for j in range(l)])
|
||||
cameraIterativeMean.mean = 42
|
||||
cameraIterativeMean.mean = np.mean([cameraTrainingImage - mergeSingleColorChannelImagesAccordingToBayerFilter({color: cameraColorMeans[camera][color].mean for color in Color}) for cameraTrainingImage in [multipleColorsImage]], axis = 0)#[:cameraTrainingImageIndex + 1]])
|
||||
print(f'{cameraIterativeMean.mean = }')
|
||||
print(f'{camerasIterativeMean[camera].mean = }')
|
||||
exit(1)
|
||||
if cameraIterativeMean.mean[0, 0] != 0:
|
||||
exit(1)
|
||||
# If we are considering the last camera and (not `PREDICT_ONLY_ON_WHOLE_TRAINING_SET` or we are considering the last training image), then we proceeded an additional image for all cameras and we can predict the accuracy at this learning step.
|
||||
if cameraIndex == numberOfCameras - 1 and (not PREDICT_ONLY_ON_WHOLE_TRAINING_SET or cameraTrainingImageIndex == numberOfTrainingImages - 1):
|
||||
numberOfTrainingImagesAccuracy = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user