<jupyter_start><jupyter_text>This file is intended to generate new data for alignment model trainingMake sure to set the exposure parameter to the desired value.Images will be saved into the alignment_images directory. Run the following cell once at the beginning:<jupyter_code>import os
import sys
import scipy.misc
sys.path.append('C:\\Program Files\\Micro-Manager-2.0beta')

import smartscope.source.sc_utils as sc_utils
import smartscope.source.alignment as alignment

save_dir = 'alignment_images'
os.makedirs(save_dir, exist_ok=True)

n=0
exposure = 1<jupyter_output>Using TensorFlow backend.<jupyter_text>Run this cell to capture new images<jupyter_code>frame = sc_utils.get_frame(exposure)

new_frame = sc_utils.convert_frame_to_mrcnn_format(frame)
scipy.misc.imsave(save_dir + '/image'+str(n)+'.jpg', new_frame)
n = n+1<jupyter_output>C:\Users\cell_ml\Miniconda3\envs\smartscope\lib\site-packages\ipykernel_launcher.py:5: DeprecationWarning: `imsave` is deprecated!
`imsave` is deprecated in SciPy 1.0.0, and will be removed in 1.2.0.
Use ``imageio.imwrite`` instead.
  """
{'fraction_non_alphanumeric': 0.0988909426987061, 'fraction_numerical': 0.012014787430683918, 'mean_word_length': 6.3175675675675675, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '115841', 'license': 'MIT', 'n_tokens_mistral': 381, 'n_tokens_neox': 365, 'n_words': 94, 'path': 'SmartScope/smartscope/notebook/data_generation/alignment_training_data_capture.ipynb', 'repo_name': 'calebsanfo/IncubatorImaging', 'size': '1082'}