Repository Analysis

facebookresearch/sam2

The repository provides code for running inference with the Meta Segment Anything Model 2 (SAM 2), links for downloading the trained model checkpoints, and example notebooks that show how to use the model.

7.2 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of facebookresearch/sam2, a Jupyter Notebook project with 19,520 GitHub stars. SynthScan v2.0 examined 40,255 lines of code across 294 source files, recording 221 pattern matches distributed across 14 syntactic categories. The overall adjusted score of 7.2 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

7.2
Adjusted Score
7.2
Raw Score
100%
Time Factor
2026-05-30
Last Push
19.5K
Stars
Jupyter Notebook
Language
40.3K
Lines of Code
294
Files
221
Pattern Hits
2026-07-14
Scan Date
0.02
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 6MEDIUM 15LOW 200

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 221 distinct pattern matches across 14 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers87 hits · 87 pts
SeverityFileLineSnippetContext
LOW…mo/frontend/src/common/loading/UploadLoadingScreen.tsx49function UploadLoadingScreenChangeVideoTrigger({CODE
LOWdemo/frontend/src/common/utils/ImageUtils.ts16export function convertVideoFrameToImageData(CODE
LOW…ntend/src/common/components/MobileFirstClickBanner.tsx62function MobileVideoGalleryModalTrigger({CODE
LOW…components/options/MoreOptionsToolbarBottomActions.tsx29export default function MoreOptionsToolbarBottomActions({onTabChange}: Props) {CODE
LOW…common/components/video/VideoFilmstripWithPlayback.tsx41export default function VideoFilmstripWithPlayback() {CODE
LOW…ntend/src/common/components/video/editor/ImageUtils.ts16export function convertVideoFrameToImageData(CODE
LOW…src/common/components/video/editor/DemoVideoEditor.tsx194 async function handleOptimisticPointUpdate(newPoints: SegmentationPoint[]) {CODE
LOW…components/gallery/DefaultVideoGalleryModalTrigger.tsx20export default function DefaultVideoGalleryModalTrigger({CODE
LOW…rc/common/components/gallery/DemoVideoGalleryModal.tsx122 function handleOpenVideoGalleryModal() {CODE
LOW…common/components/toolbar/useListenToStreamingState.ts23export default function useListenToStreamingState(): {CODE
LOW…mon/components/toolbar/ToolbarBottomActionsWrapper.tsx34export default function ToolbarBottomActionsWrapper({CODE
LOW…components/annotations/ClearAllPointsInVideoButton.tsx37export default function ClearAllPointsInVideoButton({onRestart}: Props) {CODE
LOW…components/annotations/ObjectsToolbarBottomActions.tsx31export default function ObjectsToolbarBottomActions({onTabChange}: Props) {CODE
LOW…/components/annotations/MobileObjectsToolbarHeader.tsx20export default function MobileObjectsToolbarHeader() {CODE
LOW…mon/components/effects/EffectsToolbarBottomActions.tsx29export default function EffectsToolbarBottomActions({onTabChange}: Props) {CODE
LOW…mon/components/effects/EffectsToolbarBottomActions.tsx30 function handleSwitchToMoreOptionsTab() {CODE
LOW…mmon/components/session/useCloseSessionBeforeUnload.ts32export default function useCloseSessionBeforeUnload() {CODE
LOW…o/frontend/src/common/error/ErrorSerializationUtils.ts21export function registerSerializableConstructors() {CODE
LOWdemo/frontend/src/graphql/RelayEnvironmentProvider.tsx36export default function OnevisionRelayEnvironmentProvider({CODE
LOWdemo/backend/server/app.py90def gen_track_with_mask_stream(CODE
LOWdemo/backend/server/inference/predictor.py357 def cancel_propagate_in_video(CODE
LOWdemo/backend/server/data/schema.py246 def cancel_propagate_in_video(CODE
LOWdemo/backend/server/data/schema.py269def _get_start_sec_duration_sec(CODE
LOWtools/vos_inference.py249def vos_separate_inference_per_object(CODE
LOWsav_dataset/utils/sav_utils.py101 def get_frames_and_annotations(CODE
LOWtraining/train.py117def add_pythonpath_to_sys_path():CODE
LOWtraining/optimizer.py41 def _validate_optimizer_schedulers(self):CODE
LOWtraining/optimizer.py112def name_constraints_to_parameters(CODE
LOWtraining/optimizer.py131def map_scheduler_cfgs_to_param_groups(CODE
LOWtraining/optimizer.py172def validate_param_group_params(param_groups: List[Dict], model: nn.Module):CODE
LOWtraining/optimizer.py194def unix_module_cls_pattern_to_parameter_names(CODE
LOWtraining/optimizer.py227def unix_param_pattern_to_parameter_names(CODE
LOWtraining/optimizer.py253def _unix_pattern_to_parameter_names(CODE
LOWtraining/optimizer.py275def get_module_cls_to_param_names(CODE
LOWtraining/optimizer.py422def layer_decay_param_modifier(CODE
LOWtraining/trainer.py253 def _infer_distributed_backend_if_none(self, distributed_conf, accelerator):CODE
LOWtraining/trainer.py262 def _setup_torch_dist_and_backend(self, cuda_conf, distributed_conf) -> None:CODE
LOWtraining/trainer.py291 def _setup_ddp_distributed_training(self, distributed_conf, accelerator):CODE
LOWtraining/trainer.py422 def _load_resuming_checkpoint(self, ckpt_path: str):CODE
LOWtraining/trainer.py447 def is_intermediate_val_epoch(self, epoch):CODE
LOWtraining/trainer.py891 def _log_meters_and_save_best_ckpts(self, phases: List[str]):CODE
LOWtraining/trainer.py1033 def _log_loss_detailed_and_return_core_loss(self, loss, loss_str, step):CODE
LOWtraining/dataset/transforms.py37def get_size_with_aspect_ratio(image_size, size, max_size=None):CODE
LOWtraining/utils/train_utils.py52def register_omegaconf_resolvers():CODE
LOWtraining/utils/train_utils.py66def setup_distributed_backend(backend, timeout_mins):CODE
LOWtraining/utils/train_utils.py81def get_machine_local_and_dist_rank():CODE
LOWtraining/utils/train_utils.py130def is_dist_avail_and_initialized():CODE
LOWtraining/utils/distributed.py186def convert_to_distributed_tensor(tensor: torch.Tensor) -> Tuple[torch.Tensor, str]:CODE
LOWtraining/utils/distributed.py212def is_distributed_training_run() -> bool:CODE
LOWtraining/utils/distributed.py383def init_distributed_data_parallel_model(CODE
LOWtraining/utils/distributed.py504def all_gather_batch_with_grad(tensors):CODE
LOWtraining/utils/distributed.py571def is_dist_avail_and_initialized():CODE
LOWtraining/utils/checkpoint_utils.py30def unix_pattern_to_parameter_names(CODE
LOWtraining/utils/checkpoint_utils.py47def filter_params_matching_unix_pattern(CODE
LOWtraining/utils/checkpoint_utils.py68def exclude_params_matching_unix_pattern(CODE
LOWtraining/utils/checkpoint_utils.py99def assert_skipped_parameters_are_frozen(model: nn.Module, patterns: List[str]):CODE
LOWtraining/utils/checkpoint_utils.py123def with_check_parameter_frozen(CODE
LOWtraining/utils/checkpoint_utils.py247def load_checkpoint_and_apply_kernels(STRING
LOWtraining/utils/checkpoint_utils.py297def check_load_state_dict_errors(STRING
LOWtraining/utils/checkpoint_utils.py330def load_state_dict_into_model(STRING
27 more matches not shown…
Deep Nesting24 hits · 24 pts
SeverityFileLineSnippetContext
LOWdemo/backend/server/inference/predictor.py270CODE
LOWtools/vos_inference.py249CODE
LOWsav_dataset/utils/sav_benchmark.py156CODE
LOWsav_dataset/utils/sav_benchmark.py316CODE
LOWsav_dataset/utils/sav_benchmark.py237CODE
LOWtraining/optimizer.py422CODE
LOWtraining/optimizer.py52CODE
LOWtraining/trainer.py583CODE
LOWtraining/trainer.py703CODE
LOWtraining/trainer.py891CODE
LOWtraining/dataset/transforms.py104CODE
LOWtraining/dataset/transforms.py272CODE
LOWtraining/dataset/transforms.py354CODE
LOWtraining/dataset/vos_dataset.py79CODE
LOWtraining/dataset/vos_sampler.py42CODE
LOWtraining/dataset/vos_segment_loader.py24CODE
LOWtraining/utils/train_utils.py29CODE
LOWsam2/sam2_video_predictor_legacy.py426CODE
LOWsam2/sam2_video_predictor.py480CODE
LOWsam2/sam2_video_predictor.py546CODE
LOWsam2/utils/amg.py46CODE
LOWsam2/utils/amg.py61CODE
LOWsam2/modeling/sam2_base.py497CODE
LOWsam2/modeling/backbones/hieradet.py301CODE
Excessive Try-Catch Wrapping16 hits · 22 pts
SeverityFileLineSnippetContext
LOWsetup.py104 except Exception as e:CODE
LOWsetup.py122 except Exception as e:CODE
LOWsetup.py129 except Exception as e:CODE
LOWsetup.py136 except Exception as e:CODE
LOWsetup.py148except Exception as e:CODE
MEDIUMsetup.py119def finalize_options(self):CODE
MEDIUMsetup.py126def build_extensions(self):CODE
MEDIUMsetup.py133def get_ext_filename(self, ext_name):CODE
LOWtraining/train.py37 except Exception as e:CODE
LOWtraining/train.py99 except Exception as e:CODE
LOWtraining/dataset/vos_dataset.py64 except Exception as e:CODE
LOWtraining/dataset/sam2_datasets.py61 except Exception as e:CODE
LOWsam2/utils/transforms.py105 except Exception as e:CODE
LOWsam2/utils/misc.py141 except Exception as e:CODE
LOWsam2/utils/misc.py326 except Exception as e:CODE
MEDIUMsam2/utils/misc.py137def _load_frames():CODE
Cross-File Repetition4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHsam2/automatic_mask_generator.py0load a pretrained model from the hugging face hub. arguments: model_id (str): the hugging face repository id. **kwargs: STRING
HIGHsam2/sam2_video_predictor_legacy.py0load a pretrained model from the hugging face hub. arguments: model_id (str): the hugging face repository id. **kwargs: STRING
HIGHsam2/sam2_video_predictor.py0load a pretrained model from the hugging face hub. arguments: model_id (str): the hugging face repository id. **kwargs: STRING
HIGHsam2/sam2_image_predictor.py0load a pretrained model from the hugging face hub. arguments: model_id (str): the hugging face repository id. **kwargs: STRING
Verbosity Indicators13 hits · 20 pts
SeverityFileLineSnippetContext
LOWtraining/dataset/transforms.py423 # Step 1: downsize the images and paste them into a mosaicCOMMENT
LOWtraining/dataset/transforms.py467 # Step 2: downsize the masks and paste them into the target grid of the mosaicCOMMENT
LOWsam2/sam2_video_predictor_legacy.py1065 # Step 0: clear the input on those frames where this object id has point or mask inputCOMMENT
LOWsam2/sam2_video_predictor_legacy.py1080 # Step 1: Update the object id mapping (note that it must be done after Step 0,COMMENT
LOWsam2/sam2_video_predictor_legacy.py1094 # Step 2: For per-object tensor storage, we shift their obj_idx in the dict keys.COMMENT
LOWsam2/sam2_video_predictor_legacy.py1110 # Step 3: For packed tensor storage, we index the remaining ids and rebuild the per-object slices.COMMENT
LOWsam2/sam2_video_predictor_legacy.py1132 # Step 4: Further collect the outputs on those frames in `obj_input_frames_inds`, whichCOMMENT
LOWsam2/sam2_video_predictor.py890 # Step 0: clear the input on those frames where this object id has point or mask inputCOMMENT
LOWsam2/sam2_video_predictor.py905 # Step 1: Update the object id mapping (note that it must be done after Step 0,COMMENT
LOWsam2/sam2_video_predictor.py919 # Step 2: For per-object tensor storage, we shift their obj_idx in the dict keys.COMMENT
LOWsam2/sam2_video_predictor.py934 # Step 3: Further collect the outputs on those frames in `obj_input_frames_inds`, whichCOMMENT
LOWsam2/modeling/sam2_base.py521 # Step 1: condition the visual features of the current frame on previous memoriesCOMMENT
LOWsam2/modeling/sam2_base.py663 # Step 2: Concatenate the memories and forward through the transformer encoderCOMMENT
Structural Annotation Overuse13 hits · 20 pts
SeverityFileLineSnippetContext
LOWtraining/dataset/transforms.py423 # Step 1: downsize the images and paste them into a mosaicCOMMENT
LOWtraining/dataset/transforms.py467 # Step 2: downsize the masks and paste them into the target grid of the mosaicCOMMENT
LOWsam2/sam2_video_predictor_legacy.py1065 # Step 0: clear the input on those frames where this object id has point or mask inputCOMMENT
LOWsam2/sam2_video_predictor_legacy.py1080 # Step 1: Update the object id mapping (note that it must be done after Step 0,COMMENT
LOWsam2/sam2_video_predictor_legacy.py1094 # Step 2: For per-object tensor storage, we shift their obj_idx in the dict keys.COMMENT
LOWsam2/sam2_video_predictor_legacy.py1110 # Step 3: For packed tensor storage, we index the remaining ids and rebuild the per-object slices.COMMENT
LOWsam2/sam2_video_predictor_legacy.py1132 # Step 4: Further collect the outputs on those frames in `obj_input_frames_inds`, whichCOMMENT
LOWsam2/sam2_video_predictor.py890 # Step 0: clear the input on those frames where this object id has point or mask inputCOMMENT
LOWsam2/sam2_video_predictor.py905 # Step 1: Update the object id mapping (note that it must be done after Step 0,COMMENT
LOWsam2/sam2_video_predictor.py919 # Step 2: For per-object tensor storage, we shift their obj_idx in the dict keys.COMMENT
LOWsam2/sam2_video_predictor.py934 # Step 3: Further collect the outputs on those frames in `obj_input_frames_inds`, whichCOMMENT
LOWsam2/modeling/sam2_base.py521 # Step 1: condition the visual features of the current frame on previous memoriesCOMMENT
LOWsam2/modeling/sam2_base.py663 # Step 2: Concatenate the memories and forward through the transformer encoderCOMMENT
Decorative Section Separators6 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMtraining/scripts/sav_frame_extraction_submitit.py20 # ------------COMMENT
MEDIUMtraining/scripts/sav_frame_extraction_submitit.py22 # ------------COMMENT
MEDIUMtraining/scripts/sav_frame_extraction_submitit.py40 # ------------COMMENT
MEDIUMtraining/scripts/sav_frame_extraction_submitit.py42 # ------------COMMENT
MEDIUMtraining/scripts/sav_frame_extraction_submitit.py64 # ------------COMMENT
MEDIUMtraining/scripts/sav_frame_extraction_submitit.py66 # ------------COMMENT
Over-Commented Block14 hits · 14 pts
SeverityFileLineSnippetContext
LOW…ntend/src/common/components/video/VideoWorkerBridge.ts501 // listener: (ev: WorkerEventMap[K]) => unknown,COMMENT
LOW…ntend/src/common/components/video/VideoWorkerBridge.ts521 // }COMMENT
LOWtraining/__init__.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWtraining/dataset/__init__.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWtraining/utils/__init__.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWtraining/model/__init__.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWtraining/model/sam2.py41 # - if `rand_init_cond_frames` below is True, we randomly sample 1~num_init_cond_frames initial conditioning fraCOMMENT
LOWcheckpoints/download_ckpts.sh21# sam2_hiera_t_url="${SAM2_BASE_URL}/sam2_hiera_tiny.pt"COMMENT
LOWsam2/utils/__init__.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWsam2/modeling/sam2_base.py41 # (instead of using the transformer encoder)COMMENT
LOWsam2/modeling/sam2_base.py61 memory_temporal_stride_for_eval=1,COMMENT
LOWsam2/modeling/__init__.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWsam2/modeling/sam/__init__.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWsam2/modeling/backbones/__init__.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
Unused Imports13 hits · 13 pts
SeverityFileLineSnippetContext
LOWdemo/backend/server/app.py22CODE
LOWdemo/backend/server/data/data_types.py6CODE
LOWdemo/backend/server/data/data_types.py12CODE
LOWdemo/backend/server/data/schema.py10CODE
LOWtraining/optimizer.py11CODE
LOWtraining/dataset/vos_raw_dataset.py8CODE
LOWtraining/dataset/vos_raw_dataset.py14CODE
LOWtraining/dataset/sam2_datasets.py9CODE
LOWtraining/utils/data_utils.py14CODE
LOWtraining/model/sam2.py13CODE
LOWtraining/model/sam2.py13CODE
LOWsam2/automatic_mask_generator.py127CODE
LOWsam2/sam2_video_predictor.py7CODE
Self-Referential Comments5 hits · 13 pts
SeverityFileLineSnippetContext
MEDIUMtraining/dataset/transforms.py274 # Create a color jitter transformation paramsCOMMENT
MEDIUMtraining/dataset/transforms.py359 # Create a random affine transformationCOMMENT
MEDIUMcheckpoints/download_ckpts.sh19# Define the URLs for SAM 2 checkpointsCOMMENT
MEDIUMcheckpoints/download_ckpts.sh39# Define the URLs for SAM 2.1 checkpointsCOMMENT
MEDIUMsam2/sam2_image_predictor.py185 """This function is very similar to predict(...), however it is used for batched mode, when the model is expecteSTRING
Modern Structural Boilerplate9 hits · 11 pts
SeverityFileLineSnippetContext
LOWdemo/backend/server/app_conf.py10logger = logging.getLogger(__name__)CODE
LOWdemo/backend/server/app.py27logger = logging.getLogger(__name__)CODE
LOWdemo/backend/server/inference/predictor.py40logger = logging.getLogger(__name__)CODE
LOWdemo/backend/server/data/store.py13def set_videos(videos: Dict[str, Video]) -> None:CODE
LOWtraining/trainer.py257 def _setup_env_variables(self, env_variables_conf) -> None:CODE
LOWtraining/trainer.py262 def _setup_torch_dist_and_backend(self, cuda_conf, distributed_conf) -> None:CODE
LOWtraining/dataset/sam2_datasets.py129 def _set_dataset_epoch(self, dataset, epoch: int) -> None:CODE
LOWtraining/utils/distributed.py368def set_cuda_device_index(idx: int) -> None:CODE
LOWtraining/utils/distributed.py374def set_cpu_device() -> None:CODE
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHtraining/optimizer.py115Return parameters which match the intersection of parameter constraints. Note that this returns the parameters themSTRING
HIGHtraining/optimizer.py135Produce parameter groups corresponding to all the scheduler configs. Takes all the scheduler configs, each of whichSTRING
Redundant / Tautological Comments6 hits · 9 pts
SeverityFileLineSnippetContext
LOWtraining/trainer.py958 # Check if there are any duplicatesCOMMENT
LOWtraining/dataset/vos_raw_dataset.py90 # Check if it's not in excluded_filesCOMMENT
LOWtraining/dataset/vos_raw_dataset.py182 # Check if it's not in excluded_files and it existsCOMMENT
LOWsam2/build_sam.py17# Check if the user is running Python from the parent directory of the sam2 repoCOMMENT
LOWsam2/utils/amg.py242 # Check if boxes has a channel dimensionCOMMENT
LOWsam2/utils/amg.py251 # Check if points has a channel dimensionCOMMENT
AI Structural Patterns9 hits · 9 pts
SeverityFileLineSnippetContext
LOWtraining/trainer.py148CODE
LOWtraining/model/sam2.py26CODE
LOWsam2/automatic_mask_generator.py37CODE
LOWsam2/modeling/sam2_base.py23CODE
LOWsam2/modeling/sam/transformer.py248CODE
LOWsam2/modeling/sam/transformer.py311CODE
LOWsam2/modeling/sam/mask_decoder.py16CODE
LOWsam2/modeling/backbones/image_encoder.py42CODE
LOWsam2/modeling/backbones/hieradet.py174CODE