endoreg-db 0.4.2__py3-none-any.whl → 0.4.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of endoreg-db might be problematic. Click here for more details.

@@ -14,7 +14,6 @@ from django.core.files import File
14
14
  from endoreg_db.models import ModelMeta, ModelType, LabelSet
15
15
  import json
16
16
  from pathlib import Path
17
- from icecream import ic
18
17
 
19
18
  class Command(BaseCommand):
20
19
  """
@@ -1,7 +1,6 @@
1
1
  from ...models import LabelSet, ImageClassificationAnnotation
2
2
  from django.db.models import Q, F
3
3
  from django.db import models
4
- from icecream import ic
5
4
  from tqdm import tqdm
6
5
  from collections import defaultdict
7
6
 
@@ -7,7 +7,6 @@ from tempfile import TemporaryDirectory
7
7
  import re
8
8
  from datetime import datetime
9
9
  from typing import Dict, List
10
- from icecream import ic
11
10
  import numpy as np
12
11
 
13
12
  N_FRAMES_MEAN_OCR = 2
@@ -126,9 +125,10 @@ def extract_text_from_rois(image_path, processor:EndoscopyProcessor):
126
125
  extracted_texts[roi_name] = processed_text
127
126
 
128
127
  else:
129
- ic(roi_name)
130
- ic(roi)
131
- ic("No values for this ROI")
128
+ pass
129
+ # ic(roi_name)
130
+ # ic(roi)
131
+ # ic("No values for this ROI")
132
132
 
133
133
  return extracted_texts
134
134
 
@@ -146,8 +146,8 @@ def get_most_frequent_values(rois_texts: Dict[str, List[str]]) -> Dict[str, str]
146
146
  most_frequent = {}
147
147
  for key in rois_texts.keys():
148
148
  counter = Counter([text for text in rois_texts[key] if text])
149
- ic(key)
150
- ic(counter)
149
+ # ic(key)
150
+ # ic(counter)
151
151
  most_frequent[key], _ = counter.most_common(1)[0] if counter else (None, None)
152
152
  return most_frequent
153
153
 
@@ -164,7 +164,7 @@ def process_video(video_path, processor):
164
164
  """
165
165
  # Create a temporary directory to store frames
166
166
  with TemporaryDirectory() as temp_dir:
167
- ic(temp_dir)
167
+ # ic(temp_dir)
168
168
  # Capture the video
169
169
  video = cv2.VideoCapture(video_path)
170
170
  success, frame_number = True, 0
@@ -182,7 +182,7 @@ def process_video(video_path, processor):
182
182
 
183
183
  # Extract text from ROIs
184
184
  extracted_texts = extract_text_from_rois(frame_path, processor)
185
- ic(extracted_texts)
185
+ # ic(extracted_texts)
186
186
 
187
187
  # Store the extracted text from each ROI
188
188
  for key, text in extracted_texts.items():
endoreg_db/utils/ocr.py CHANGED
@@ -6,7 +6,6 @@ from tempfile import TemporaryDirectory
6
6
  import re
7
7
  from datetime import datetime
8
8
  from typing import Dict, List
9
- from icecream import ic
10
9
  import numpy as np
11
10
  from endoreg_db.utils.cropping import crop_and_insert
12
11
 
@@ -123,9 +122,7 @@ def extract_text_from_rois(image_path, processor):
123
122
  extracted_texts[roi_name] = processed_text
124
123
 
125
124
  else:
126
- ic(roi_name)
127
- ic(roi)
128
- ic("No values for this ROI")
125
+ pass
129
126
 
130
127
  return extracted_texts
131
128
 
@@ -142,8 +139,6 @@ def get_most_frequent_values(rois_texts: Dict[str, List[str]]) -> Dict[str, str]
142
139
  most_frequent = {}
143
140
  for key in rois_texts.keys():
144
141
  counter = Counter([text for text in rois_texts[key] if text])
145
- ic(key)
146
- ic(counter)
147
142
  most_frequent[key], _ = counter.most_common(1)[0] if counter else (None, None)
148
143
  return most_frequent
149
144
 
@@ -160,7 +155,6 @@ def process_video(video_path, processor):
160
155
  """
161
156
  # Create a temporary directory to store frames
162
157
  with TemporaryDirectory() as temp_dir:
163
- ic(temp_dir)
164
158
  # Capture the video
165
159
  video = cv2.VideoCapture(video_path)
166
160
  success, frame_number = True, 0
@@ -178,7 +172,6 @@ def process_video(video_path, processor):
178
172
 
179
173
  # Extract text from ROIs
180
174
  extracted_texts = extract_text_from_rois(frame_path, processor)
181
- ic(extracted_texts)
182
175
 
183
176
  # Store the extracted text from each ROI
184
177
  for key, text in extracted_texts.items():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: endoreg-db
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: EndoReg Db Django App
5
5
  License: GNU3
6
6
  Author: Thomas J. Lux
@@ -9,6 +9,7 @@ Classifier: License :: Other/Proprietary License
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: Programming Language :: Python :: 3.11
11
11
  Classifier: Programming Language :: Python :: 3.12
12
+ Requires-Dist: agl-report-reader (==0.3.2)
12
13
  Requires-Dist: django (>=5.1,<6.0)
13
14
  Requires-Dist: django-bootstrap5 (>=23.4,<24.0)
14
15
  Requires-Dist: djangorestframework (>=3.14.0,<4.0.0)
@@ -142,7 +142,7 @@ endoreg_db/management/commands/load_profession_data.py,sha256=oF3OF7zRqxA-SVpMW6
142
142
  endoreg_db/management/commands/load_report_reader_flag.py,sha256=pvqRgtcjaYTgx2Ce7HYnNzsUB48yJe9lXTk-lzfJUPI,1371
143
143
  endoreg_db/management/commands/load_unit_data.py,sha256=tcux-iL-ByT2ApgmHEkLllZSEA3AGMK5l-ze2Mtty1Y,1319
144
144
  endoreg_db/management/commands/load_user_groups.py,sha256=D7SK2FvZEHoE4TIXNGCjDw5_12MH9bpGZvoS7eEv0Os,1031
145
- endoreg_db/management/commands/register_ai_model.py,sha256=e5hgEyLS-E98XWzINcZ79mgtHvZltmbmAmLYaNrcfQs,2544
145
+ endoreg_db/management/commands/register_ai_model.py,sha256=ni_YBlEuCuhMymRE1376e64x6S1CcQkNH7XaJ_DhP4A,2520
146
146
  endoreg_db/management/commands/reset_celery_schedule.py,sha256=U-m_FNRTw6LAwJoT9RUE4qrhmQXm7AyFToPcHYyJpIE,386
147
147
  endoreg_db/migrations/0001_initial.py,sha256=tIXFN6sFZ2VUIP-TaFSGcobrgARkia0SIOiKN0iokvU,95312
148
148
  endoreg_db/migrations/0002_anonymizedimagelabel_anonymousimageannotation_and_more.py,sha256=ABUOr5ZMUHkRQ0FDUhqNaVAvq5K8HOOdyVo1TJ8YMkQ,2605
@@ -272,7 +272,7 @@ endoreg_db/models/rules/ruleset.py,sha256=XaY30qfXuXaUhaDmgfyUhPBnQ4EE1owixZ3mDW
272
272
  endoreg_db/models/unit.py,sha256=5-LrmM3vVTElsNqztVDDBE9e9xpYIfz5-AD30H630oU,836
273
273
  endoreg_db/queries/__init__.py,sha256=3yhFtU_yY2L8rK2--8WkjcyI0q94QPpTtv5w_v8rZRY,83
274
274
  endoreg_db/queries/annotations/__init__.py,sha256=76O3dAIzuSye09VNPGSNPnqPEtgXZcBAGXKdh89y0ts,95
275
- endoreg_db/queries/annotations/legacy.py,sha256=1uHubRWItrBzvw_5nwJfc4oa6shWWJcG5J68oVgiFvY,6442
275
+ endoreg_db/queries/annotations/legacy.py,sha256=KOHWLDf3CLvIT9GpQi3ps4bUi3JDJUhJXH4gvw9T47E,6418
276
276
  endoreg_db/queries/get/__init__.py,sha256=id0oVNTEjzzUpkvTp0E4tClFN91EeKOyEuSAYsIlIQo,147
277
277
  endoreg_db/queries/get/annotation.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
278
278
  endoreg_db/queries/get/center.py,sha256=SeVxpzZUErk_jjv0RaurDar2i_28FWQ6RarxFHblnGw,1155
@@ -303,12 +303,12 @@ endoreg_db/utils/cropping.py,sha256=wMLo5sCFdZAEVBe3RbCH26eQjRe8q3th4K3ZKDd9fww,
303
303
  endoreg_db/utils/dataloader.py,sha256=rps-zZ-5QsEetYunxChbZvxZSQHOH9LU4N6a7o8Q0fs,4035
304
304
  endoreg_db/utils/file_operations.py,sha256=3mUY6jARIm927XK0nJoDO7fRp5quoSqPr95jDJERmr0,884
305
305
  endoreg_db/utils/hashs.py,sha256=mLae54Vj7h5Q-9_MWtEB_KKE7x9qALpClgZyX5DB9Ek,1069
306
- endoreg_db/utils/legacy_ocr.py,sha256=c2EBP-9egUYyfsQ1n0QoZY2wKndWoKdEXrB-MQZ0Xn4,7633
307
- endoreg_db/utils/ocr.py,sha256=jkdT1bl-LSCjZ2PvxlX1AG2TmhdMclayxUPrdZWs7UE,7322
306
+ endoreg_db/utils/legacy_ocr.py,sha256=lzZb8om4pfEJ5i7fuamW1XaVjO1Fybne7QCdVUxz8O8,7640
307
+ endoreg_db/utils/ocr.py,sha256=LvyABxX5OZhIeXw2pI6af8_xTj7nHQQoKGh5kNsrv7o,7136
308
308
  endoreg_db/utils/uuid.py,sha256=T4HXqYtKwXFqE5kPyvlgWHyllBBF6LL6N48nl9TpwBk,53
309
309
  endoreg_db/utils/video_metadata.py,sha256=HDyXxAeNQOK3cGzQ06xosmObzEnJBARuKjwz9vmmRIM,2613
310
310
  endoreg_db/views.py,sha256=xc1IQHrsij7j33TUbo-_oewy3vs03pw_etpBWaMYJl0,63
311
- endoreg_db-0.4.2.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
312
- endoreg_db-0.4.2.dist-info/METADATA,sha256=T6Dqv1TD5kZ6V9GHtPSJKN7mh8WG3l6XM_Trj4TxPyc,955
313
- endoreg_db-0.4.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
314
- endoreg_db-0.4.2.dist-info/RECORD,,
311
+ endoreg_db-0.4.3.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
312
+ endoreg_db-0.4.3.dist-info/METADATA,sha256=hRkpATMqgQmowCk4y7KQlxzihdFvJXtOsqdsVvmLhUM,998
313
+ endoreg_db-0.4.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
314
+ endoreg_db-0.4.3.dist-info/RECORD,,