endoreg-db 0.4.0__py3-none-any.whl → 0.4.2__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.

@@ -43,3 +43,5 @@
43
43
  endoscope_sn_y: 670
44
44
  endoscope_sn_width: 280
45
45
  endoscope_sn_height: 35
46
+
47
+
@@ -0,0 +1,55 @@
1
+ # Generated by Django 4.2.15 on 2024-08-28 11:05
2
+
3
+ import django.core.files.storage
4
+ import django.core.validators
5
+ from django.db import migrations, models
6
+ import django.db.models.deletion
7
+
8
+
9
+ class Migration(migrations.Migration):
10
+
11
+ dependencies = [
12
+ ('endoreg_db', '0001_initial'),
13
+ ]
14
+
15
+ operations = [
16
+ migrations.CreateModel(
17
+ name='AnonymizedImageLabel',
18
+ fields=[
19
+ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
20
+ ('name', models.CharField(max_length=255, unique=True)),
21
+ ('description', models.TextField(blank=True, null=True)),
22
+ ],
23
+ ),
24
+ migrations.CreateModel(
25
+ name='AnonymousImageAnnotation',
26
+ fields=[
27
+ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
28
+ ('image_name', models.CharField(max_length=255)),
29
+ ('slug', models.SlugField(blank=True, null=True, unique=True)),
30
+ ('polyp_count', models.IntegerField()),
31
+ ('comments', models.CharField(max_length=255)),
32
+ ('gender', models.CharField(max_length=255)),
33
+ ('name_image_url', models.CharField(max_length=255)),
34
+ ('date_created', models.DateTimeField(auto_now_add=True)),
35
+ ('label', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='endoreg_db.label')),
36
+ ],
37
+ ),
38
+ migrations.AlterField(
39
+ model_name='rawpdffile',
40
+ name='file',
41
+ field=models.FileField(storage=django.core.files.storage.FileSystemStorage(location='/home/agl-admin/agl-validator-backend/agl_validator_backend/erc_data/raw_pdf'), upload_to='raw_pdf/', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['pdf'])]),
42
+ ),
43
+ migrations.CreateModel(
44
+ name='DroppedName',
45
+ fields=[
46
+ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
47
+ ('name', models.CharField(max_length=255)),
48
+ ('gender', models.CharField(max_length=255)),
49
+ ('x', models.FloatField()),
50
+ ('y', models.FloatField()),
51
+ ('name_image_url', models.CharField(max_length=255)),
52
+ ('annotation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dropped_names', to='endoreg_db.anonymousimageannotation')),
53
+ ],
54
+ ),
55
+ ]
@@ -0,0 +1,39 @@
1
+ # Generated by Django 4.2.15 on 2024-08-29 07:15
2
+
3
+ from django.db import migrations, models
4
+ import django.db.models.deletion
5
+
6
+
7
+ class Migration(migrations.Migration):
8
+
9
+ dependencies = [
10
+ ('endoreg_db', '0002_anonymizedimagelabel_anonymousimageannotation_and_more'),
11
+ ]
12
+
13
+ operations = [
14
+ migrations.AddField(
15
+ model_name='anonymousimageannotation',
16
+ name='original_image_url',
17
+ field=models.CharField(default='https://example.com/placeholder.jpg', max_length=255),
18
+ ),
19
+ migrations.AddField(
20
+ model_name='anonymousimageannotation',
21
+ name='processed',
22
+ field=models.BooleanField(default=False),
23
+ ),
24
+ migrations.AddField(
25
+ model_name='droppedname',
26
+ name='box_coordinates',
27
+ field=models.CharField(blank=True, max_length=255, null=True),
28
+ ),
29
+ migrations.AlterField(
30
+ model_name='anonymousimageannotation',
31
+ name='comments',
32
+ field=models.TextField(blank=True, null=True),
33
+ ),
34
+ migrations.AlterField(
35
+ model_name='anonymousimageannotation',
36
+ name='label',
37
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='endoreg_db.anonymizedimagelabel'),
38
+ ),
39
+ ]
@@ -0,0 +1,20 @@
1
+ # Generated by Django 4.2.14 on 2024-09-04 19:48
2
+
3
+ import django.core.files.storage
4
+ import django.core.validators
5
+ from django.db import migrations, models
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+
10
+ dependencies = [
11
+ ('endoreg_db', '0003_anonymousimageannotation_original_image_url_and_more'),
12
+ ]
13
+
14
+ operations = [
15
+ migrations.AlterField(
16
+ model_name='rawpdffile',
17
+ name='file',
18
+ field=models.FileField(storage=django.core.files.storage.FileSystemStorage(location='/home/agl-admin/agl_anonymizer/agl_anonymizer/erc_data/raw_pdf'), upload_to='raw_pdf/', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['pdf'])]),
19
+ ),
20
+ ]
@@ -0,0 +1,40 @@
1
+ # Generated by Django 4.2.15 on 2024-09-17 11:46
2
+
3
+ import django.core.files.storage
4
+ import django.core.validators
5
+ from django.db import migrations, models
6
+ import django.db.models.deletion
7
+ import django.utils.timezone
8
+
9
+
10
+ class Migration(migrations.Migration):
11
+
12
+ dependencies = [
13
+ ('endoreg_db', '0004_alter_rawpdffile_file'),
14
+ ]
15
+
16
+ operations = [
17
+ migrations.CreateModel(
18
+ name='UploadedFile',
19
+ fields=[
20
+ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
21
+ ('original_file', models.FileField(upload_to='uploads/original/')),
22
+ ('upload_date', models.DateTimeField(default=django.utils.timezone.now)),
23
+ ('description', models.TextField(blank=True, null=True)),
24
+ ],
25
+ ),
26
+ migrations.AlterField(
27
+ model_name='rawpdffile',
28
+ name='file',
29
+ field=models.FileField(storage=django.core.files.storage.FileSystemStorage(location='/mnt/hdd-sensitive/Pseudo/import/pdf'), upload_to='raw_pdf/', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['pdf'])]),
30
+ ),
31
+ migrations.CreateModel(
32
+ name='AnonymizedFile',
33
+ fields=[
34
+ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
35
+ ('anonymized_file', models.FileField(upload_to='uploads/anonymized/')),
36
+ ('anonymization_date', models.DateTimeField(default=django.utils.timezone.now)),
37
+ ('original_file', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='anonymized_file', to='endoreg_db.uploadedfile')),
38
+ ],
39
+ ),
40
+ ]
@@ -39,11 +39,7 @@ from .patient_examination import PatientExamination
39
39
 
40
40
  from .label import Label, LabelType, LabelSet
41
41
 
42
- from .annotation import (
43
- ImageClassificationAnnotation,
44
- LegacyBinaryClassificationAnnotationTask,
45
- BinaryClassificationAnnotationTask,
46
- )
42
+ from .annotation import *
47
43
 
48
44
  from .legacy_data import (
49
45
  LegacyImage,
@@ -74,3 +70,4 @@ from .hardware import (
74
70
  )
75
71
 
76
72
  from .questionnaires import TtoQuestionnaire
73
+ from .annotation import AnonymousImageAnnotation, AnonymizedImageLabel, DroppedName
@@ -1,2 +1,3 @@
1
1
  from .image_classification import ImageClassificationAnnotation
2
- from .binary_classification_annotation_task import LegacyBinaryClassificationAnnotationTask, BinaryClassificationAnnotationTask
2
+ from .binary_classification_annotation_task import LegacyBinaryClassificationAnnotationTask, BinaryClassificationAnnotationTask
3
+ from .anonymized_image_annotation import AnonymousImageAnnotation, DroppedName, AnonymizedImageLabel, AnonymizedFile, UploadedFile
@@ -0,0 +1,60 @@
1
+ from django.db import models
2
+ from django.utils.text import slugify
3
+
4
+ class AnonymizedImageLabel(models.Model):
5
+ name = models.CharField(max_length=255, unique=True) # Ensuring label names are unique
6
+ description = models.TextField(blank=True, null=True) # Optional description field
7
+
8
+ def __str__(self):
9
+ return self.name
10
+
11
+ class AnonymousImageAnnotation(models.Model):
12
+ label = models.ForeignKey(AnonymizedImageLabel, on_delete=models.CASCADE)
13
+ image_name = models.CharField(max_length=255)
14
+ original_image_url = models.CharField(max_length=255, default='https://example.com/placeholder.jpg') # Field for the original image
15
+ slug = models.SlugField(unique=True, blank=True, null=True)
16
+ polyp_count = models.IntegerField()
17
+ comments = models.TextField(blank=True, null=True) # Comments can be longer
18
+ gender = models.CharField(max_length=255) # Overall gender (if applicable)
19
+ name_image_url = models.CharField(max_length=255)
20
+ date_created = models.DateTimeField(auto_now_add=True)
21
+ processed = models.BooleanField(default=False) # Track if this annotation has been processed
22
+
23
+ def save(self, *args, **kwargs):
24
+ if not self.slug:
25
+ self.slug = slugify(f"{self.label}-{self.image_name}")
26
+ super().save(*args, **kwargs)
27
+
28
+ def __str__(self):
29
+ return f"{self.image_name} - {self.label}"
30
+
31
+ class DroppedName(models.Model):
32
+ annotation = models.ForeignKey(AnonymousImageAnnotation, related_name='dropped_names', on_delete=models.CASCADE)
33
+ name = models.CharField(max_length=255)
34
+ gender = models.CharField(max_length=255) # Gender of the individual name
35
+ x = models.FloatField()
36
+ y = models.FloatField()
37
+ name_image_url = models.CharField(max_length=255)
38
+ box_coordinates = models.CharField(max_length=255, blank=True, null=True) # Store box coordinates if needed
39
+
40
+ def __str__(self):
41
+ return f"{self.name} ({self.gender}) at ({self.x}, {self.y})"
42
+
43
+ from django.db import models
44
+ from django.utils import timezone
45
+
46
+ class UploadedFile(models.Model):
47
+ original_file = models.FileField(upload_to='uploads/original/')
48
+ upload_date = models.DateTimeField(default=timezone.now)
49
+ description = models.TextField(blank=True, null=True)
50
+
51
+ def __str__(self):
52
+ return self.original_file.name
53
+
54
+ class AnonymizedFile(models.Model):
55
+ original_file = models.OneToOneField(UploadedFile, on_delete=models.CASCADE, related_name='anonymized_file')
56
+ anonymized_file = models.FileField(upload_to='uploads/anonymized/')
57
+ anonymization_date = models.DateTimeField(default=timezone.now)
58
+
59
+ def __str__(self):
60
+ return f"Anonymized version of {self.original_file.original_file.name}"
@@ -67,7 +67,7 @@ class RawPdfFile(models.Model):
67
67
  cls,
68
68
  file_path,
69
69
  center_name,
70
- pdf_type_name,
70
+ pdf_type_name, # to be depreceated / changed since we now import all pdfs from same directory
71
71
  destination_dir,
72
72
  save=True,
73
73
  ):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: endoreg-db
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: EndoReg Db Django App
5
5
  License: GNU3
6
6
  Author: Thomas J. Lux
@@ -9,15 +9,13 @@ 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.0,<0.4.0)
13
- Requires-Dist: django (>=4.2,<4.3)
12
+ Requires-Dist: django (>=5.1,<6.0)
14
13
  Requires-Dist: django-bootstrap5 (>=23.4,<24.0)
15
14
  Requires-Dist: djangorestframework (>=3.14.0,<4.0.0)
16
15
  Requires-Dist: ffmpeg-python (>=0.2.0,<0.3.0)
17
- Requires-Dist: icecream (>=2.1.3,<3.0.0)
18
16
  Requires-Dist: opencv-python (>=4.9.0.80,<5.0.0.0)
19
17
  Requires-Dist: pandas (>=2.2.2,<3.0.0)
20
- Requires-Dist: pillow (>=10.2.0,<11.0.0)
18
+ Requires-Dist: pillow (>=10,<11)
21
19
  Requires-Dist: pytesseract (>=0.3.10,<0.4.0)
22
20
  Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
23
21
  Requires-Dist: scipy (>=1.14.0,<2.0.0)
@@ -37,7 +37,7 @@ endoreg_db/data/distribution/numeric/.init,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
37
37
  endoreg_db/data/distribution/single_categorical/patient.yaml,sha256=R7beZDRqdOWNaFu-8Bd88E6j3eBc9mqhOW_265EA0e0,156
38
38
  endoreg_db/data/emission_factor/green_endoscopy_dashboard_EmissionFactor.yaml,sha256=bBLmr3_uSLXdsbtRa9707WK1Z7Xy8TpBGKOfzWcfC_M,2968
39
39
  endoreg_db/data/endoscope_type/data.yaml,sha256=k8uF94svJsU02O-ceaLnQBoozJ6cT3iY_s_aKrvJZqg,242
40
- endoreg_db/data/endoscopy_processor/data.yaml,sha256=iu02flPMyz0YKjqDWS5KLp8We6DSsHtJcGvJMWvCV-s,1044
40
+ endoreg_db/data/endoscopy_processor/data.yaml,sha256=Q72v9DhWjt9zsa0fC-Xty8nWzRcqeyHJpYq-w5UmwXQ,1049
41
41
  endoreg_db/data/event/cardiology.yaml,sha256=c2SfXXU8_hOBibNqidxxkZoEaKGGh0UWUTYudjG-Sqo,804
42
42
  endoreg_db/data/event/neurology.yaml,sha256=AdpGHQxfBAOuUbKQ234T1MtE3bfHdgKA47HUoyFB5KE,282
43
43
  endoreg_db/data/event/surgery.yaml,sha256=hyZWxg8LUNOwf3iybVj0Muta7pUdWhZXmLuuOh7hjek,428
@@ -145,14 +145,19 @@ endoreg_db/management/commands/load_user_groups.py,sha256=D7SK2FvZEHoE4TIXNGCjDw
145
145
  endoreg_db/management/commands/register_ai_model.py,sha256=e5hgEyLS-E98XWzINcZ79mgtHvZltmbmAmLYaNrcfQs,2544
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
+ endoreg_db/migrations/0002_anonymizedimagelabel_anonymousimageannotation_and_more.py,sha256=ABUOr5ZMUHkRQ0FDUhqNaVAvq5K8HOOdyVo1TJ8YMkQ,2605
149
+ endoreg_db/migrations/0003_anonymousimageannotation_original_image_url_and_more.py,sha256=bTb9_FfQBNHYLq1tKw1qmem9xsecRv-z1-aWcl9ig4k,1319
150
+ endoreg_db/migrations/0004_alter_rawpdffile_file.py,sha256=B1LxaapxDnzs08ScrXh1pM_KC2hHHyEHGce_0Ciaex8,712
151
+ endoreg_db/migrations/0005_uploadedfile_alter_rawpdffile_file_anonymizedfile.py,sha256=yhQhScntZgPdMpci2aWfGk3qzvSUS9asDfMFyMlIL2U,1776
148
152
  endoreg_db/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
149
- endoreg_db/models/__init__.py,sha256=wc1ZyDUNb-sKMZ4P7x_PAb0WtzDhYAq8y19AV8rC7dQ,1552
153
+ endoreg_db/models/__init__.py,sha256=EH4g6EvT8AbEtcVcTj8AUtjGP3sQtQw7M34I_g_IGP4,1512
150
154
  endoreg_db/models/ai_model/__init__.py,sha256=rh5npLRGml5iiRocx359gsaA82pGJTW7wdVAfnbZP6w,106
151
155
  endoreg_db/models/ai_model/active_model.py,sha256=r7SE3yg54kbjfOkk0Ei0rgs_Wo3ikx88rcEELqvRzGc,343
152
156
  endoreg_db/models/ai_model/model_meta.py,sha256=YyYW8dScpAceHePnbrnRpgVBYDByi9x7u5Ydh03OJuo,869
153
157
  endoreg_db/models/ai_model/model_type.py,sha256=mg1bEuzAjIte25N4TzD0yDhmUQYayJpyrRn2hB6b6eg,638
154
158
  endoreg_db/models/ai_model/utils.py,sha256=Vh6_3lbDuFhSVCaaZKKm0CjoGA5Man6gWYe46HUXmbA,270
155
- endoreg_db/models/annotation/__init__.py,sha256=jM8ISS4hWciC9cFUCMo6fSkmCGUptWkX5lM46zNre2I,191
159
+ endoreg_db/models/annotation/__init__.py,sha256=TnRp_hJ4YomxKN6N1yBzGHStY9SnY_HLPCjJKLdZmu8,323
160
+ endoreg_db/models/annotation/anonymized_image_annotation.py,sha256=1mZadIzYsEZN_zz_SMehGgiIvMbhHpiFMO2tfmbOL54,2716
156
161
  endoreg_db/models/annotation/binary_classification_annotation_task.py,sha256=CpvyDxLSJcoJyajtUsDGBt881SNSFcG8lvuQ01knMNM,3292
157
162
  endoreg_db/models/annotation/image_classification.py,sha256=Og1tRo1QKBMztwfdbFryUWghnGdsTqQdepn9rOcmVMc,1387
158
163
  endoreg_db/models/case_template/__init__.py,sha256=vtq-7Gvpv01l9CuQvBFQugXCKELx9wg2z5HkysrZCNM,369
@@ -174,7 +179,7 @@ endoreg_db/models/data_file/import_classes/__init__.py,sha256=f5f6dwDU8spd94dpDF
174
179
  endoreg_db/models/data_file/import_classes/processing_functions/__init__.py,sha256=uathXg8ckLb_XBTRipdHrBXFpZpvKzuouk7lwRN0aqE,932
175
180
  endoreg_db/models/data_file/import_classes/processing_functions/pdf.py,sha256=lEd1V_kS8758XuRZ0gj7bVhY5DgTfpEyeDgX3zWHuzE,716
176
181
  endoreg_db/models/data_file/import_classes/processing_functions/video.py,sha256=ij3fMdqnZnX1FrS-hscy_pfaYIkxDFKVL7SVjCqCUxs,8530
177
- endoreg_db/models/data_file/import_classes/raw_pdf.py,sha256=ZyzgaZ9K-9zd764XhwkyoGlgNkhnbkySiZi9ahKKFgg,6691
182
+ endoreg_db/models/data_file/import_classes/raw_pdf.py,sha256=pwN0b6y7m8xA7wd189lR-v6JuGdyO4y1ZhhYKilIn94,6770
178
183
  endoreg_db/models/data_file/import_classes/raw_video.py,sha256=j2WLaqxVm86Oq_zKPRAncq3QavmAMP0p3ThalGjieaQ,12444
179
184
  endoreg_db/models/data_file/metadata/__init__.py,sha256=Hcv1L5xDnONyERwn4jnj-vI4maYMAEZ9iFPQ8baNrl0,144
180
185
  endoreg_db/models/data_file/metadata/pdf_meta.py,sha256=Ipi1LZo36UqP43trHfNY4hamyRWjenxiPg2f_W3di-k,2183
@@ -303,7 +308,7 @@ endoreg_db/utils/ocr.py,sha256=jkdT1bl-LSCjZ2PvxlX1AG2TmhdMclayxUPrdZWs7UE,7322
303
308
  endoreg_db/utils/uuid.py,sha256=T4HXqYtKwXFqE5kPyvlgWHyllBBF6LL6N48nl9TpwBk,53
304
309
  endoreg_db/utils/video_metadata.py,sha256=HDyXxAeNQOK3cGzQ06xosmObzEnJBARuKjwz9vmmRIM,2613
305
310
  endoreg_db/views.py,sha256=xc1IQHrsij7j33TUbo-_oewy3vs03pw_etpBWaMYJl0,63
306
- endoreg_db-0.4.0.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
307
- endoreg_db-0.4.0.dist-info/METADATA,sha256=qfRcSnmSZG91amcEzej2Prp5fGzzY0bseWZTCkMXoDA,1054
308
- endoreg_db-0.4.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
309
- endoreg_db-0.4.0.dist-info/RECORD,,
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,,