浏览代码

Merge branch 'coco_perception_output_hybrid' into h-i

/h-i
Mohsen Kamalzadeh 3 年前
当前提交
e7d52b65
共有 6 个文件被更改,包括 8 次插入9 次删除
  1. 2
      com.unity.perception/Runtime/GroundTruth/Exporters/Coco/CocoExporter.cs
  2. 6
      com.unity.perception/Runtime/GroundTruth/Exporters/CocoHybrid/CocoHybridExporter.cs
  3. 2
      com.unity.perception/Runtime/GroundTruth/Exporters/IDatasetExporter.cs
  4. 3
      com.unity.perception/Runtime/GroundTruth/Exporters/PerceptionFormat/PerceptionExporter.cs
  5. 2
      com.unity.perception/Runtime/GroundTruth/Exporters/PerceptionNew/PerceptionNewExporter.cs
  6. 2
      com.unity.perception/Runtime/GroundTruth/SimulationState_Json.cs

2
com.unity.perception/Runtime/GroundTruth/Exporters/Coco/CocoExporter.cs


};
}
public async Task ProcessPendingCaptures(List<SimulationState.PendingCapture> pendingCaptures, SimulationState simState)
public async Task ProcessPendingCaptures(List<SimulationState.PendingCapture> pendingCaptures, SimulationState simState, int captureFileIndex)
{
var boxJson = string.Empty;
var keypointJson = string.Empty;

6
com.unity.perception/Runtime/GroundTruth/Exporters/CocoHybrid/CocoHybridExporter.cs


m_Perception.OnAnnotationRegistered(annotationId, values);
}
public async Task ProcessPendingCaptures(List<SimulationState.PendingCapture> pendingCaptures, SimulationState simState)
public async Task ProcessPendingCaptures(List<SimulationState.PendingCapture> pendingCaptures, SimulationState simState, int captureFileIndex)
var cocoTask = m_Coco.ProcessPendingCaptures(pendingCaptures, simState);
var perceptionTask = m_Perception.ProcessPendingCaptures(pendingCaptures, simState);
var cocoTask = m_Coco.ProcessPendingCaptures(pendingCaptures, simState, captureFileIndex);
var perceptionTask = m_Perception.ProcessPendingCaptures(pendingCaptures, simState, captureFileIndex);
await cocoTask;
await perceptionTask;
}

2
com.unity.perception/Runtime/GroundTruth/Exporters/IDatasetExporter.cs


void OnAnnotationRegistered<TSpec>(Guid annotationId, TSpec[] values);
Task ProcessPendingCaptures(List<SimulationState.PendingCapture> pendingCaptures, SimulationState simState);
Task ProcessPendingCaptures(List<SimulationState.PendingCapture> pendingCaptures, SimulationState simState, int captureFileIndex);
Task OnCaptureReported(int frame, int width, int height, string filename);
}

3
com.unity.perception/Runtime/GroundTruth/Exporters/PerceptionFormat/PerceptionExporter.cs


{
const Formatting k_Formatting = Formatting.Indented;
string outputDirectory = string.Empty;
int captureFileIndex = 0;
public string GetRgbCaptureFilename(params(string, object)[] additionalSensorValues)
{

Manager.Instance.ConsumerFileProduced(path);
}
public Task ProcessPendingCaptures(List<SimulationState.PendingCapture> pendingCaptures, SimulationState simState)
public Task ProcessPendingCaptures(List<SimulationState.PendingCapture> pendingCaptures, SimulationState simState, int captureFileIndex)
{
//lazily allocate for fast zero-write frames
var capturesJArray = new JArray();

2
com.unity.perception/Runtime/GroundTruth/Exporters/PerceptionNew/PerceptionNewExporter.cs


List<Task> m_PendingTasks = new List<Task>();
public Task ProcessPendingCaptures(List<SimulationState.PendingCapture> pendingCaptures, SimulationState simState)
public Task ProcessPendingCaptures(List<SimulationState.PendingCapture> pendingCaptures, SimulationState simState, int captureFileIndex)
{
foreach (var cap in pendingCaptures)
{

2
com.unity.perception/Runtime/GroundTruth/SimulationState_Json.cs


void Write(List<PendingCapture> pendingCaptures, SimulationState simulationState, int captureFileIndex)
{
GetActiveReporter()?.ProcessPendingCaptures(pendingCaptures, simulationState);
GetActiveReporter()?.ProcessPendingCaptures(pendingCaptures, simulationState, captureFileIndex);
#if false
simulationState.m_SerializeCapturesAsyncSampler.Begin();

正在加载...
取消
保存