| | |
| | | only_finished = not query_serializer.validated_data['download_all_tasks'] |
| | | download_resources = query_serializer.validated_data['download_resources'] |
| | | interpolate_key_frames = query_serializer.validated_data['interpolate_key_frames'] |
| | | |
| | | # COCO 格式特殊处理:强制下载资源并规范化图片URL |
| | | if export_type == 'COCO': |
| | | download_resources = True |
| | | logger.debug(f'COCO export: forced download_resources=True') |
| | | |
| | | # 调试日志: API 层参数 |
| | | logger.info(f'[Export API Debug] ========== Export Request Received ==========') |
| | | logger.info(f'[Export API Debug] Project ID: {project.id}') |
| | | logger.info(f'[Export API Debug] export_type: {export_type}') |
| | | logger.info(f'[Export API Debug] download_resources: {download_resources}') |
| | | logger.info(f'[Export API Debug] only_finished: {only_finished}') |
| | | logger.info(f'[Export API Debug] Request GET params: {dict(request.GET)}') |
| | | |
| | | tasks_ids = request.GET.getlist('ids[]') |
| | | |
| | |
| | | query = query.filter(annotations__isnull=False).distinct() |
| | | |
| | | task_ids = query.values_list('id', flat=True) |
| | | |
| | | logger.info(f'[Export API Debug] Total tasks to export: {len(task_ids)}') |
| | | |
| | | logger.debug('Serialize tasks for export') |
| | | tasks = [] |
| | |
| | | serializer.is_valid(raise_exception=True) |
| | | export_type = serializer.validated_data['export_type'] |
| | | download_resources = serializer.validated_data.get('download_resources') |
| | | |
| | | # COCO 格式特殊处理:强制下载资源 |
| | | if export_type == 'COCO': |
| | | download_resources = True |
| | | logger.debug(f'COCO export conversion: forced download_resources=True') |
| | | |
| | | converted_format, created = ConvertedFormat.objects.exclude( |
| | | status=ConvertedFormat.Status.FAILED |