#72: Verify actual data type pointer
This commit is contained in:
@@ -32,7 +32,7 @@ for camera in IMAGES_CAMERAS_FOLDER:
|
|||||||
random.shuffle(imagesCamerasFileNames[camera])
|
random.shuffle(imagesCamerasFileNames[camera])
|
||||||
|
|
||||||
# Limit number of images per camera with the one having the less images.
|
# 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:
|
for camera in IMAGES_CAMERAS_FOLDER:
|
||||||
imagesCamerasFileNames[camera] = imagesCamerasFileNames[camera][:minimumNumberOfImagesCameras]
|
imagesCamerasFileNames[camera] = imagesCamerasFileNames[camera][:minimumNumberOfImagesCameras]
|
||||||
print(camera, imagesCamerasFileNames[camera])
|
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)
|
cameraIterativeMean.add(imagePrnuEstimateNpArray)
|
||||||
else:
|
else:
|
||||||
# Still use `cameraIterativeMean` to simplify the implementation.
|
# Still use `cameraIterativeMean` to simplify the implementation.
|
||||||
# TODO: cameraIterativeMean.mean = mean([image_training_j_camera - cameraIterativeMean.mean for j in range(l)])
|
cameraIterativeMean.mean = np.mean([cameraTrainingImage - mergeSingleColorChannelImagesAccordingToBayerFilter({color: cameraColorMeans[camera][color].mean for color in Color}) for cameraTrainingImage in [multipleColorsImage]], axis = 0)#[:cameraTrainingImageIndex + 1]])
|
||||||
cameraIterativeMean.mean = 42
|
|
||||||
print(f'{cameraIterativeMean.mean = }')
|
print(f'{cameraIterativeMean.mean = }')
|
||||||
print(f'{camerasIterativeMean[camera].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 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):
|
if cameraIndex == numberOfCameras - 1 and (not PREDICT_ONLY_ON_WHOLE_TRAINING_SET or cameraTrainingImageIndex == numberOfTrainingImages - 1):
|
||||||
numberOfTrainingImagesAccuracy = 0
|
numberOfTrainingImagesAccuracy = 0
|
||||||
|
Reference in New Issue
Block a user