{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"nvidiaTeslaT4","dataSources":[{"sourceId":91498,"databundleVersionId":11655853,"sourceType":"competition"},{"sourceId":7884485,"sourceType":"datasetVersion","datasetId":4628051},{"sourceId":8026384,"sourceType":"datasetVersion","datasetId":4726252},{"sourceId":11924468,"sourceType":"datasetVersion","datasetId":6988459},{"sourceId":176463227,"sourceType":"kernelVersion"},{"sourceId":4534,"sourceType":"modelInstanceVersion","modelInstanceId":3326,"modelId":986},{"sourceId":17191,"sourceType":"modelInstanceVersion","modelInstanceId":14317,"modelId":21716},{"sourceId":17555,"sourceType":"modelInstanceVersion","modelInstanceId":14611,"modelId":22086}],"dockerImageVersionId":30919,"isInternetEnabled":false,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"## Example submission\n\nImage Matching Challenge 2025: https://www.kaggle.com/competitions/image-matching-challenge-2025\n\nThis notebook creates a simple submission using ALIKED and LightGlue, plus DINO for shortlisting, on GPU. Adapted from [last year](https://www.kaggle.com/code/oldufo/imc-2024-submission-example).\n\nRemember to select an accelerator on the sidebar to the right, and to disable internet access when submitting a notebook to the competition.","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19"}},{"cell_type":"code","source":"# IMPORTANT \n#Install dependencies and copy model weights to run the notebook without internet access when submitting to the competition.\n\n!pip install --no-index /kaggle/input/imc2024-packages-lightglue-rerun-kornia/* --no-deps\n!mkdir -p /root/.cache/torch/hub/checkpoints\n!cp /kaggle/input/aliked/pytorch/aliked-n16/1/aliked-n16.pth /root/.cache/torch/hub/checkpoints/\n!cp /kaggle/input/lightglue/pytorch/aliked/1/aliked_lightglue.pth /root/.cache/torch/hub/checkpoints/\n!cp /kaggle/input/lightglue/pytorch/aliked/1/aliked_lightglue.pth /root/.cache/torch/hub/checkpoints/aliked_lightglue_v0-1_arxiv-pth","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-06-02T10:52:20.429985Z","iopub.execute_input":"2025-06-02T10:52:20.430255Z","iopub.status.idle":"2025-06-02T10:52:25.425431Z","shell.execute_reply.started":"2025-06-02T10:52:20.430234Z","shell.execute_reply":"2025-06-02T10:52:25.424326Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!python -m pip install --no-index --find-links=/kaggle/input/pkg-check-orientation check_orientation==0.0.5 > /dev/null\n!mkdir -p /root/.cache/torch/hub/checkpoints/\n!cp /kaggle/input/pkg-check-orientation/2020-11-16_resnext50_32x4d.zip /root/.cache/torch/hub/checkpoints/","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-06-02T10:52:25.426966Z","iopub.execute_input":"2025-06-02T10:52:25.427301Z","iopub.status.idle":"2025-06-02T10:52:32.206849Z","shell.execute_reply.started":"2025-06-02T10:52:25.427269Z","shell.execute_reply":"2025-06-02T10:52:32.205830Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"import sys\nimport os\nfrom tqdm import tqdm\nfrom time import time, sleep\nimport gc\nimport numpy as np\nimport h5py\nimport dataclasses\nimport pandas as pd\nfrom IPython.display import clear_output\nfrom collections import defaultdict\nfrom copy import deepcopy\nfrom PIL import Image\n\nimport cv2\nimport torch\nimport torch.nn.functional as F\nimport kornia as K\nimport kornia.feature as KF\n\nimport torch\nfrom lightglue import match_pair\nfrom lightglue import ALIKED, LightGlue\nfrom lightglue.utils import load_image, rbd\nfrom transformers import AutoImageProcessor, AutoModel\n\n# IMPORTANT Utilities: importing data into colmap and competition metric\nimport pycolmap\nsys.path.append('/kaggle/input/imc25-utils')\nfrom database import *\nfrom h5_to_db import *\nimport metric\n\nprint(\"============ Fine tuning Parametesr ==============\")\n\n# Do not forget to select an accelerator on the sidebar to the right.\ndevice = K.utils.get_cuda_device_if_available(0)\nprint(f'{device=}')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-06-02T10:52:32.208715Z","iopub.execute_input":"2025-06-02T10:52:32.209008Z","iopub.status.idle":"2025-06-02T10:52:52.226557Z","shell.execute_reply.started":"2025-06-02T10:52:32.208984Z","shell.execute_reply":"2025-06-02T10:52:52.225806Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"from torchvision.io import read_image as T_read_image\nfrom torchvision.io import ImageReadMode\nfrom torchvision import transforms as T\nfrom check_orientation.pre_trained_models import create_model\nfrom torch.utils.data import Dataset, DataLoader\n\ndef convert_rot_k(index):\n    mapping = [0, 3, 2]\n    return mapping[index] if index in (0, 1, 2) else 1\n\nclass CheckRotationDataset(Dataset):\n    def __init__(self, files, transform=None):\n        self.files = files\n        self.transform = transform\n\n    def __len__(self):\n        return len(self.files)\n\n    def __getitem__(self, idx):\n        img_path = self.files[idx]\n        image = T_read_image(img_path, mode=ImageReadMode.RGB)\n        return self.transform(image) if self.transform else image\n\ndef get_CheckRotation_dataloader_crop(images, batch_size=1):\n    tfm = T.Compose([\n        T.Resize((224, 224)),\n        T.ConvertImageDtype(torch.float),\n        T.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225))\n    ])\n\n    ds = CheckRotationDataset(images, transform=tfm)\n    dl = DataLoader(\n        dataset=ds,\n        shuffle=False,\n        batch_size=batch_size,\n        pin_memory=True,\n        num_workers=2,\n        drop_last=False\n    )\n    return dl\n\n\ndef detect_image_rotations(image_paths, device):\n    model = create_model(\"swsl_resnext50_32x4d\").eval().to(device)\n    dl = get_CheckRotation_dataloader_crop(image_paths)\n    rotations = []\n    for path, image in enumerate(dl):\n        image = image.to(torch.float32).to(device)\n        with torch.no_grad():\n            preds = model(image).detach().cpu().numpy()\n            rot_index = preds[0].argmax()\n            rotation = convert_rot_k(rot_index)\n            rotations.append(rotation)\n    return rotations\n\n\ndef rotate_coords(coords, width, height, rotation):\n    if rotation == 0:\n        return coords\n    x, y = coords[:, 0], coords[:, 1]\n    if rotation == 1:\n        new_x = width - 1 - y\n        new_y = x\n    elif rotation == 2:\n        new_x = width - 1 - x\n        new_y = height - 1 - y\n    elif rotation == 3:\n        new_x = y\n        new_y = height - 1 - x\n    else:\n        raise ValueError(\"rotation must be 0, 1, 2, or 3\")\n    return np.stack([new_x, new_y], axis=1)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-06-02T10:52:52.227683Z","iopub.execute_input":"2025-06-02T10:52:52.228313Z","iopub.status.idle":"2025-06-02T10:52:54.941682Z","shell.execute_reply.started":"2025-06-02T10:52:52.228277Z","shell.execute_reply":"2025-06-02T10:52:54.940998Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"def load_torch_image(fname, device=torch.device('cpu')):\n    img = K.io.load_image(fname, K.io.ImageLoadType.RGB32, device=device)[None, ...]\n    return img\n\n\n# Must Use efficientnet global descriptor to get matching shortlists.\ndef get_global_desc(fnames, device = torch.device('cpu')):\n    processor = AutoImageProcessor.from_pretrained('/kaggle/input/dinov2/pytorch/base/1')\n    model = AutoModel.from_pretrained('/kaggle/input/dinov2/pytorch/base/1')\n    model = model.eval()\n    model = model.to(device)\n    global_descs_dinov2 = []\n    for i, img_fname_full in tqdm(enumerate(fnames),total= len(fnames)):\n        key = os.path.splitext(os.path.basename(img_fname_full))[0]\n        timg = load_torch_image(img_fname_full)\n        with torch.inference_mode():\n            inputs = processor(images=timg, return_tensors=\"pt\", do_rescale=False).to(device)\n            outputs = model(**inputs)\n            dino_mac = F.normalize(outputs.last_hidden_state[:,1:].max(dim=1)[0], dim=1, p=2)\n        global_descs_dinov2.append(dino_mac.detach().cpu())\n    global_descs_dinov2 = torch.cat(global_descs_dinov2, dim=0)\n    return global_descs_dinov2\n\n\ndef get_img_pairs_exhaustive(img_fnames):\n    index_pairs = []\n    for i in range(len(img_fnames)):\n        for j in range(i+1, len(img_fnames)):\n            index_pairs.append((i,j))\n    return index_pairs\n\n\ndef get_image_pairs_shortlist(fnames,\n                              sim_th = 0.6, # should be strict\n                              min_pairs = 30,\n                              exhaustive_if_less = 20,\n                              device=torch.device('cpu')):\n    num_imgs = len(fnames)\n    if num_imgs <= exhaustive_if_less:\n        return get_img_pairs_exhaustive(fnames)\n    descs = get_global_desc(fnames, device=device)\n    dm = torch.cdist(descs, descs, p=2).detach().cpu().numpy()\n    # removing half\n    mask = dm <= sim_th\n    total = 0\n    matching_list = []\n    ar = np.arange(num_imgs)\n    already_there_set = []\n    for st_idx in range(num_imgs-1):\n        mask_idx = mask[st_idx]\n        to_match = ar[mask_idx]\n        if len(to_match) < min_pairs:\n            to_match = np.argsort(dm[st_idx])[:min_pairs]  \n        for idx in to_match:\n            if st_idx == idx:\n                continue\n            if dm[st_idx, idx] < 1000:\n                matching_list.append(tuple(sorted((st_idx, idx.item()))))\n                total+=1\n    matching_list = sorted(list(set(matching_list)))\n    return matching_list\n\ndef detect_aliked(img_fnames,\n                  rotations,\n                  feature_dir = '.featureout',\n                  num_features = 4096,\n                  resize_to = 2048,\n                  device=torch.device('cpu')):\n    dtype = torch.float32 # ALIKED has issues with float16\n    \n    extractor = ALIKED(max_num_keypoints=num_features, detection_threshold=0.2, resize=resize_to).eval().to(device, dtype)\n    \n    if not os.path.isdir(feature_dir):\n        os.makedirs(feature_dir)\n    \n\n    with h5py.File(f'{feature_dir}/keypoints.h5', 'w') as file_kp, \\\n         h5py.File(f'{feature_dir}/keypoints_rot.h5', 'w') as file_kp_rot, \\\n         h5py.File(f'{feature_dir}/descriptors.h5', 'w') as file_desc:\n    \n        for image_path, rotation in tqdm(zip(img_fnames, rotations)):\n            filename = os.path.basename(image_path)\n            key = filename\n            with torch.inference_mode():\n                image = load_torch_image(image_path, device=device).to(dtype)\n                height, width = image.shape[2], image.shape[3]\n                rotated_image = torch.rot90(image, rotation, [2, 3])\n    \n                features = extractor.extract(rotated_image)  # auto-resize the image, disable with resize=None\n                keypoints = features['keypoints'].reshape(-1, 2).detach().cpu().numpy()\n                descriptors = features['descriptors'].reshape(len(keypoints), -1).detach().cpu().numpy()\n    \n                file_kp_rot[key] = keypoints\n                keypoints = rotate_coords(keypoints, width, height, rotation)\n                file_kp[key] = keypoints\n                file_desc[key] = descriptors\n\n\n\ndef match_with_lightglue(img_fnames,\n                   index_pairs,\n                   feature_dir = '.featureout',\n                   device=torch.device('cpu'),\n                   min_matches=20,verbose=True):\n    lg_matcher = KF.LightGlueMatcher(\"aliked\", {\"width_confidence\": -1,\n                                                \"depth_confidence\": -1,\n                                                 \"mp\": True if 'cuda' in str(device) else False}).eval().to(device)\n\n    with h5py.File(f'{feature_dir}/keypoints_rot.h5', 'r') as file_kp_rot, \\\n         h5py.File(f'{feature_dir}/descriptors.h5', 'r') as file_desc, \\\n         h5py.File(f'{feature_dir}/matches.h5', 'w') as file_match:\n        \n        for pair in tqdm(index_pairs):\n            index1, index2 = pair\n            path1, path2 = img_fnames[index1], img_fnames[index2]\n            name1, name2 = os.path.basename(path1), os.path.basename(path2)\n    \n            keypoints1 = torch.from_numpy(file_kp_rot[name1][...]).to(device)\n            keypoints2 = torch.from_numpy(file_kp_rot[name2][...]).to(device)\n            descriptors1 = torch.from_numpy(file_desc[name1][...]).to(device)\n            descriptors2 = torch.from_numpy(file_desc[name2][...]).to(device)\n    \n            with torch.inference_mode():\n                distances, indices = lg_matcher(\n                    descriptors1,\n                    descriptors2,\n                    KF.laf_from_center_scale_ori(keypoints1[None]),\n                    KF.laf_from_center_scale_ori(keypoints2[None])\n                )\n            \n            if len(indices) == 0:\n                continue\n            num_matches = len(indices)\n            if verbose:\n                print(f'{name1}-{name2}: {num_matches} matches')\n            group = file_match.require_group(name1)\n            if num_matches >= min_matches:\n                group.create_dataset(name2, data=indices.detach().cpu().numpy().reshape(-1, 2))\n                \n\ndef import_into_colmap(img_dir, feature_dir ='.featureout', database_path = 'colmap.db'):\n    db = COLMAPDatabase.connect(database_path)\n    db.create_tables()\n    single_camera = False\n    fname_to_id = add_keypoints(db, feature_dir, img_dir, '', 'simple-pinhole', single_camera)\n    add_matches(\n        db,\n        feature_dir,\n        fname_to_id,\n    )\n    db.commit()\n    return","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-06-02T10:52:54.942665Z","iopub.execute_input":"2025-06-02T10:52:54.942975Z","iopub.status.idle":"2025-06-02T10:52:54.961205Z","shell.execute_reply.started":"2025-06-02T10:52:54.942944Z","shell.execute_reply":"2025-06-02T10:52:54.960437Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Collect vital info from the dataset\n\n@dataclasses.dataclass\nclass Prediction:\n    image_id: str | None  # A unique identifier for the row -- unused otherwise. Used only on the hidden test set.\n    dataset: str\n    filename: str\n    cluster_index: int | None = None\n    rotation: np.ndarray | None = None\n    translation: np.ndarray | None = None\n\n# Set is_train=True to run the notebook on the training data.\n# Set is_train=False if submitting an entry to the competition (test data is hidden, and different from what you see on the \"test\" folder).\nis_train = False\ndata_dir = '/kaggle/input/image-matching-challenge-2025'\nworkdir = '/kaggle/working/result/'\nos.makedirs(workdir, exist_ok=True)\n\nif is_train:\n    sample_submission_csv = os.path.join(data_dir, 'train_labels.csv')\nelse:\n    sample_submission_csv = os.path.join(data_dir, 'sample_submission.csv')\n\nsamples = {}\ncompetition_data = pd.read_csv(sample_submission_csv)\nfor _, row in competition_data.iterrows():\n    # Note: For the test data, the \"scene\" column has no meaning, and the rotation_matrix and translation_vector columns are random.\n    if row.dataset not in samples:\n        samples[row.dataset] = []\n    samples[row.dataset].append(\n        Prediction(\n            image_id=None if is_train else row.image_id,\n            dataset=row.dataset,\n            filename=row.image\n        )\n    )\n\nfor dataset in samples:\n    print(f'Dataset \"{dataset}\" -> num_images={len(samples[dataset])}')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-06-02T10:52:54.962061Z","iopub.execute_input":"2025-06-02T10:52:54.962275Z","iopub.status.idle":"2025-06-02T10:52:55.136171Z","shell.execute_reply.started":"2025-06-02T10:52:54.962257Z","shell.execute_reply":"2025-06-02T10:52:55.135089Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"gc.collect()\n\nmax_images = None \ndatasets_to_process = None \n\nif is_train:\n    \n        datasets_to_process = [\n        \t# New data.\n        \t'amy_gardens',\n        \t'ETs',\n        \t'fbk_vineyard',\n        \t'stairs',\n        ]\n\ntimings = {\n    \"shortlisting\":[],\n    \"feature_detection\": [],\n    \"feature_matching\":[],\n    \"RANSAC\": [],\n    \"Reconstruction\": [],\n}\nmapping_result_strs = []\n\n\nfor dataset, predictions in samples.items():\n    if datasets_to_process and dataset not in datasets_to_process:\n        print(f'Skipping \"{dataset}\"')\n        continue\n    \n    images_dir = os.path.join(data_dir, 'train' if is_train else 'test', dataset)\n    images = [os.path.join(images_dir, p.filename) for p in predictions]\n    if max_images is not None:\n        images = images[:max_images]\n\n    print(f'\\nProcessing dataset \"{dataset}\": {len(images)} images')\n\n    filename_to_index = {p.filename: idx for idx, p in enumerate(predictions)}\n\n    feature_dir = os.path.join(workdir, 'featureout', dataset)\n    os.makedirs(feature_dir, exist_ok=True)\n\n    # Wrap algos in try-except blocks so we can populate a submission even if one scene crashes.\n    try:\n        t = time()\n\n        s_number_1 = 0.058\n        s_number_2 = 0.145\n        s_number_3 = 0.096\n        s_number_4 = 0.134\n        s_number_5 = 0.017\n        s_number_all = s_number_1 + s_number_2 + s_number_3 + s_number_4 + s_number_5\n\n        m_number_1 = 8\n        m_number_2 = 10\n        m_number_3 = 7\n        m_number_4 = 9\n        m_number_5 = 6\n        m_number_all = s_number_1 + s_number_2 + s_number_3 + s_number_4 + s_number_5  # 40\n        \n        \n        index_pairs = get_image_pairs_shortlist(\n            images,\n            sim_th = s_number_all, # should be strict\n            min_pairs = m_number_all, # we should select at least min_pairs PER IMAGE with biggest similarity\n            exhaustive_if_less = m_number_all,\n            device=device\n        )\n\n        wish = detect_image_rotations(images, device)\n        \n        timings['shortlisting'].append(time() - t)\n        print (f'Shortlisting. Number of pairs to match: {len(index_pairs)}. Done in {time() - t:.4f} sec')\n        gc.collect()\n    \n        t = time()\n\n        f1 = 2111\n        f2 = 1778\n        f3 = f1*2 + f2\n\n        print('  num_features: ', f3)\n\n        detect_aliked(images, wish, feature_dir, f3, device=device)\n        gc.collect()\n        timings['feature_detection'].append(time() - t)\n        print(f'Features detected in {time() - t:.4f} sec')\n        \n        t = time()\n        match_with_lightglue(images, index_pairs, feature_dir=feature_dir, device=device, verbose=False)\n        timings['feature_matching'].append(time() - t)\n        print(f'Features matched in {time() - t:.4f} sec')\n\n        database_path = os.path.join(feature_dir, 'colmap.db')\n        if os.path.isfile(database_path):\n            os.remove(database_path)\n        gc.collect()\n        sleep(1)\n        import_into_colmap(images_dir, feature_dir=feature_dir, database_path=database_path)\n        output_path = f'{feature_dir}/colmap_rec_aliked'\n        \n        t = time()\n        pycolmap.match_exhaustive(database_path)\n        timings['RANSAC'].append(time() - t)\n        print(f'Ran RANSAC in {time() - t:.4f} sec')\n        \n        # By default colmap does not generate a reconstruction if less than 10 images are registered.\n        # Lower it to 3.\n        mapper_options = pycolmap.IncrementalPipelineOptions()\n        mapper_options.min_model_size = 8\n        mapper_options.max_num_models = 35\n        os.makedirs(output_path, exist_ok=True)\n        t = time()\n        maps = pycolmap.incremental_mapping(\n            database_path=database_path, \n            image_path=images_dir,\n            output_path=output_path,\n            options=mapper_options)\n        sleep(1)\n        timings['Reconstruction'].append(time() - t)\n        print(f'Reconstruction done in  {time() - t:.4f} sec')\n        print(maps)\n\n        clear_output(wait=False)\n    \n        registered = 0\n        for map_index, cur_map in maps.items():\n            for index, image in cur_map.images.items():\n                prediction_index = filename_to_index[image.name]\n                predictions[prediction_index].cluster_index = map_index\n                predictions[prediction_index].rotation = deepcopy(image.cam_from_world.rotation.matrix())\n                predictions[prediction_index].translation = deepcopy(image.cam_from_world.translation)\n                registered += 1\n        mapping_result_str = f'Dataset \"{dataset}\" -> Registered {registered} / {len(images)} images with {len(maps)} clusters'\n        mapping_result_strs.append(mapping_result_str)\n        print(mapping_result_str)\n        gc.collect()\n    except Exception as e:\n        print(e)\n        # raise e\n        mapping_result_str = f'Dataset \"{dataset}\" -> Failed!'\n        mapping_result_strs.append(mapping_result_str)\n        print(mapping_result_str)\n\nprint('\\nResults')\nfor s in mapping_result_strs:\n    print(s)\n\nprint('\\nTimings')\nfor k, v in timings.items():\n    print(f'{k} -> total={sum(v):.02f} sec.')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-06-02T10:52:55.136848Z","iopub.execute_input":"2025-06-02T10:52:55.137079Z","iopub.status.idle":"2025-06-02T10:55:23.990595Z","shell.execute_reply.started":"2025-06-02T10:52:55.137059Z","shell.execute_reply":"2025-06-02T10:55:23.989830Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Must Create a submission file.\narray_to_str = lambda array: ';'.join([f\"{x:.09f}\" for x in array])\nnone_to_str = lambda n: ';'.join(['nan'] * n)\n\nsubmission_file = '/kaggle/working/submission.csv'\nwith open(submission_file, 'w') as f:\n    if is_train:\n        f.write('dataset,scene,image,rotation_matrix,translation_vector\\n')\n        for dataset in samples:\n            for prediction in samples[dataset]:\n                cluster_name = 'outliers' if prediction.cluster_index is None else f'cluster{prediction.cluster_index}'\n                rotation = none_to_str(9) if prediction.rotation is None else array_to_str(prediction.rotation.flatten())\n                translation = none_to_str(3) if prediction.translation is None else array_to_str(prediction.translation)\n                f.write(f'{prediction.dataset},{cluster_name},{prediction.filename},{rotation},{translation}\\n')\n    else:\n        f.write('image_id,dataset,scene,image,rotation_matrix,translation_vector\\n')\n        for dataset in samples:\n            for prediction in samples[dataset]:\n                cluster_name = 'outliers' if prediction.cluster_index is None else f'cluster{prediction.cluster_index}'\n                rotation = none_to_str(9) if prediction.rotation is None else array_to_str(prediction.rotation.flatten())\n                translation = none_to_str(3) if prediction.translation is None else array_to_str(prediction.translation)\n                f.write(f'{prediction.image_id},{prediction.dataset},{cluster_name},{prediction.filename},{rotation},{translation}\\n')\n\n!head {submission_file}","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-06-02T10:55:23.992274Z","iopub.execute_input":"2025-06-02T10:55:23.992552Z","iopub.status.idle":"2025-06-02T10:55:24.212059Z","shell.execute_reply.started":"2025-06-02T10:55:23.992530Z","shell.execute_reply":"2025-06-02T10:55:24.211276Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"print('------------------------------- Wish Lucky! -------------------------------')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-06-02T10:55:24.213410Z","iopub.execute_input":"2025-06-02T10:55:24.213806Z","iopub.status.idle":"2025-06-02T10:55:24.218175Z","shell.execute_reply.started":"2025-06-02T10:55:24.213770Z","shell.execute_reply":"2025-06-02T10:55:24.217575Z"}},"outputs":[],"execution_count":null}]}